Skip to contentSkip to conversation

Support for Intel iMac in applesmc

PATCH In review Roberto De Ioris 4 participants 6 messages Jul 23, 2008 – Jul 29, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support for Intel iMac in applesmc

Hi all, this patch (2.6.26 vanilla) add supports for fans and temperature sensors on intel iMac.

Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors:

cpu A
ambient
gpu
gpu diode
gpu heatsink
hd bay 1
memory controller
optical drive
power

---

drivers/hwmon/applesmc.c +0 -0
index aacc0c4..bc616c3 100644
@@ -98,6 +98,8 @@ static const char* temperature_sensors_sets[][36] = {
          "TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P",

"TM0S",

          "TM1P", "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", "TM8S",
"TM9P",
          "TM9S", "TN0H", "TS0C", NULL },

+/* Set 5: iMac */
+ { "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P",
"TO0P", "Tp0C", NULL },
};

/* List of keys used to read/write fan speeds */
@@ -1223,6 +1225,8 @@ static __initdata struct dmi_match_data

applesmc_dmi_data[] = {
        { .accelerometer = 0, .light = 0, .temperature_set = 3 },
 /* MacPro: temperature set 4 */
        { .accelerometer = 0, .light = 0, .temperature_set = 4 },

+/* iMac: temperature set 5 */
+ { .accelerometer = 0, .light = 0, .temperature_set = 5 },
};

/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1248,6 +1252,10 @@ static __initdata struct dmi_system_id

applesmc_whitelist[] = {
          DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
                (void*)&applesmc_dmi_data[4]},

+ { applesmc_dmi_match, "Apple iMac", {
+ DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"iMac") },
+ (void*)&applesmc_dmi_data[5]},

        { .ident = NULL }

};

#1 lore raw

applying these changes manually to the 2.6.25.10 source loads the applesmc on the imac 7,1 as well and recognizes the three fans...

cheers
paul

Quoted 66 lines · Roberto De Ioris

Hi all, this patch (2.6.26 vanilla) add supports for fans and temperature sensors on intel iMac.

Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors:

cpu A
ambient
gpu
gpu diode
gpu heatsink
hd bay 1
memory controller
optical drive
power

---

drivers/hwmon/applesmc.c +2 -0
index aacc0c4..bc616c3 100644
@@ -98,6 +98,8 @@ static const char* temperature_sensors_sets[][36] = {
          "TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P",
 "TM0S",
          "TM1P", "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", "TM8S",
 "TM9P",
          "TM9S", "TN0H", "TS0C", NULL },
+/* Set 5: iMac */
+       { "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P",
 "TO0P", "Tp0C", NULL },

};

/* List of keys used to read/write fan speeds */

drivers/hwmon/applesmc.c +2 -0
@@ -1223,6 +1225,8 @@ static __initdata struct dmi_match_data
 applesmc_dmi_data[] = {
        { .accelerometer = 0, .light = 0, .temperature_set = 3 },
 /* MacPro: temperature set 4 */
        { .accelerometer = 0, .light = 0, .temperature_set = 4 },
+/* iMac: temperature set 5 */
+       { .accelerometer = 0, .light = 0, .temperature_set = 5 },
 };
 

/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".

drivers/hwmon/applesmc.c +4 -1
@@ -1248,6 +1252,10 @@ static __initdata struct dmi_system_id
 applesmc_whitelist[] = {
          DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
          DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
                (void*)&applesmc_dmi_data[4]},
+       { applesmc_dmi_match, "Apple iMac", {
+         DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+         DMI_MATCH(DMI_PRODUCT_NAME,"iMac") },
+               (void*)&applesmc_dmi_data[5]},
        { .ident = NULL }
 };
 
 
 
-------------------------------------------------------------------------

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mactel-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel

#2 lore raw

PATCH 1/2 Support for Intel iMac in applesmc

In reply to Roberto De Ioris

Hi all,

Quoted 5 lines · Roberto De Ioris

Hi all, this patch (2.6.26 vanilla) add supports for fans and temperature sensors on intel iMac.

Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors:

Here is a slightly modified version (Andrew realigned the sensors list).

Mark: If the MAINTAINERS file is correct, it should go in your git tree, right?

Thanks.

This patch (2.6.26 vanilla) adds support for fans and temperature sensors on Intel iMac.

Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors:

cpu A
ambient
gpu
gpu diode
gpu heatsink
hd bay 1
memory controller
optical drive
power

---
 drivers/hwmon/applesmc.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/hwmon/applesmc.c +9 -0
index aacc0c4..52d842b 100644
@@ -98,6 +98,9 @@ static const char* temperature_sensors_sets[][36] = {
 	  "TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P", "TM0S",
 	  "TM1P", "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", "TM8S", "TM9P",
 	  "TM9S", "TN0H", "TS0C", NULL },
+/* Set 5: iMac */
+	{ "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P",
+	  "Tp0C", NULL },
 };
 
 /* List of keys used to read/write fan speeds */
@@ -1223,6 +1226,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
 	{ .accelerometer = 0, .light = 0, .temperature_set = 3 },
 /* MacPro: temperature set 4 */
 	{ .accelerometer = 0, .light = 0, .temperature_set = 4 },
+/* iMac: temperature set 5 */
+	{ .accelerometer = 0, .light = 0, .temperature_set = 5 },
 };
 
 /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1248,6 +1253,10 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
 		(void*)&applesmc_dmi_data[4]},
+	{ applesmc_dmi_match, "Apple iMac", {
+	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+	  DMI_MATCH(DMI_PRODUCT_NAME,"iMac") },
+		(void*)&applesmc_dmi_data[5]},
 	{ .ident = NULL }
 };
 

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw

PATCH 2/2 applesmc: add support for Macbook v3.

This patches adds support for Macbook v3 (sensors and accelerometer).

From: guilherme m. schroeder <[email protected]>

---
 drivers/hwmon/applesmc.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
drivers/hwmon/applesmc.c +10 -1
index 52d842b..b06b8e0 100644
@@ -101,6 +101,9 @@ static const char* temperature_sensors_sets[][36] = {
 /* Set 5: iMac */
 	{ "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P",
 	  "Tp0C", NULL },
+/* Set 6: Macbook3 set */
+	{ "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TTF0", "TW0P", "Th0H",
+	  "Th0S", "Th1H", NULL },
 };
 
 /* List of keys used to read/write fan speeds */
@@ -1228,6 +1231,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
 	{ .accelerometer = 0, .light = 0, .temperature_set = 4 },
 /* iMac: temperature set 5 */
 	{ .accelerometer = 0, .light = 0, .temperature_set = 5 },
+/* MacBook3: accelerometer and temperature set 6 */
+	{ .accelerometer = 1, .light = 0, .temperature_set = 6 },
 };
 
 /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1237,10 +1242,14 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") },
 		(void*)&applesmc_dmi_data[0]},
-	{ applesmc_dmi_match, "Apple MacBook", {
+	{ applesmc_dmi_match, "Apple MacBook (v2)", {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") },
 		(void*)&applesmc_dmi_data[1]},
+	{ applesmc_dmi_match, "Apple MacBook (v3)", {
+	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
+	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") },
+		(void*)&applesmc_dmi_data[6]},
 	{ applesmc_dmi_match, "Apple MacBook", {
 	  DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") },

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#4 lore raw

Re: [PATCH 2/2] applesmc: add support for Macbook v3.

Quoted 2 lines · On Tue, 29 Jul 2008 23:07:42 +0800 Nicolas Boichat <[email protected]> wrote:

This patches adds support for Macbook v3 (sensors and accelerometer).

Anally changed to "Add support for ...". There is no need to put the text "This patch ..." in a changelog.

Quoted 2 lines

From: guilherme m. schroeder <[email protected]>

Nope. The way to signify authorship is to put a From: line right at the very start of the email. If that line is missing, we'll fall back to using the email headers to determins the authorship.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#5 lore raw
In reply to Nicolas Boichat
Quoted 6 lines · On Tue, 29 Jul 2008 23:02:15 +0800 Nicolas Boichat <[email protected]> wrote:

Hi all,

Quoted 3 lines · Roberto De Ioris

Hi all, this patch (2.6.26 vanilla) add supports for fans and temperature sensors on intel iMac.

Quoted 6 lines
Quoted 2 lines

Tested on iMac 24" 2.8ghz (iMac8,1), it supports the following sensors:

Here is a slightly modified version (Andrew realigned the sensors list).

Mark: If the MAINTAINERS file is correct, it should go in your git tree, right?

Mark's been pretty quiet lately. I put this patch in my "to be merged into 2.6.27, by me if necessary" list.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors