On my Macbook (non-Pro) the AppleSMC sensors feature simply does not
work due to different registers. I assume this is the case for all
non-pro models.

The attached patch makes it work and is up for discussion.

I can provide a detailed log of all smc keys if anybody is interested on
request. Particularly interesting are some keys which appear to be
somehow related to power management functionality.

Cheers

--- M.S.
Fix AppleSMC registers on non-pro Macbooks.

From: Martin Szulecki <[EMAIL PROTECTED]>


---

--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -79,11 +100,13 @@
 
 /*
  * Temperature sensors keys (sp78 - 2 bytes).
- * First set for Macbook(Pro), second for Macmini.
+ * Sets for Macbook Pro, Macbook, Macmini.
  */
 static const char* temperature_sensors_sets[][13] = {
 	{ "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
 	  "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
+	{ "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "Th0H", "Th0S",
+	  "Th1H", "Ts0P", NULL },
 	{ "TC0D", "TC0P", NULL }
 };
 
@@ -1143,9 +1423,9 @@
 /* MacBook Pro: accelerometer, backlight and temperature set 0 */
 	{ .accelerometer = 1, .light = 1, .temperature_set = 0 },
 /* MacBook: accelerometer and temperature set 0 */
-	{ .accelerometer = 1, .light = 0, .temperature_set = 0 },
-/* MacBook: temperature set 1 */
-	{ .accelerometer = 0, .light = 0, .temperature_set = 1 }
+	{ .accelerometer = 1, .light = 0, .temperature_set = 1 },
+/* MacMini: temperature set 2 */
+	{ .accelerometer = 0, .light = 0, .temperature_set = 2 }
 };
 
 /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mactel-linux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mactel-linux-users

Reply via email to