public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Support for Intel iMac in applesmc
@ 2008-07-23 11:55 Roberto De Ioris
  2008-07-23 23:24 ` [Mactel-linux-devel] " paul s
  2008-07-29 15:02 ` [PATCH 1/2] " Nicolas Boichat
  0 siblings, 2 replies; 6+ messages in thread
From: Roberto De Ioris @ 2008-07-23 11:55 UTC (permalink / raw)
  To: mactel-linux-devel; +Cc: linux-kernel

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

Signed-off-by: Roberto De Ioris <roberto@unbit.it>
---
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index aacc0c4..bc616c3 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -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 }
 };



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-29 23:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23 11:55 [PATCH] Support for Intel iMac in applesmc Roberto De Ioris
2008-07-23 23:24 ` [Mactel-linux-devel] " paul s
2008-07-29 15:02 ` [PATCH 1/2] " Nicolas Boichat
2008-07-29 15:07   ` [PATCH 2/2] applesmc: add support for Macbook v3 Nicolas Boichat
2008-07-29 23:57     ` Andrew Morton
2008-07-29 23:54   ` [PATCH 1/2] Support for Intel iMac in applesmc Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox