aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuilherme M. Schroeder <guilherme.m.schroeder@gmail.com>2008-08-15 03:40:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-15 11:35:43 -0400
commitf91a79fe86a0becdf2506c189cdde154e82c787c (patch)
treee0d8c58950731fb9df1fcf0360e4bb93b7a48567 /drivers/hwmon
parent9f86f28df14e06b12908d6475ee2462f0555bf34 (diff)
applesmc: add support for Macbook
Add support for Macbook v3 (sensors and accelerometer). Signed-off-by: Nicolas Boichat <nicolas@boichat.ch> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/applesmc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 52d842b48fae..b06b8e090a27 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -101,6 +101,9 @@ static const char* temperature_sensors_sets[][36] = {
101/* Set 5: iMac */ 101/* Set 5: iMac */
102 { "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P", 102 { "TC0D", "TA0P", "TG0P", "TG0D", "TG0H", "TH0P", "Tm0P", "TO0P",
103 "Tp0C", NULL }, 103 "Tp0C", NULL },
104/* Set 6: Macbook3 set */
105 { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TTF0", "TW0P", "Th0H",
106 "Th0S", "Th1H", NULL },
104}; 107};
105 108
106/* List of keys used to read/write fan speeds */ 109/* List of keys used to read/write fan speeds */
@@ -1228,6 +1231,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
1228 { .accelerometer = 0, .light = 0, .temperature_set = 4 }, 1231 { .accelerometer = 0, .light = 0, .temperature_set = 4 },
1229/* iMac: temperature set 5 */ 1232/* iMac: temperature set 5 */
1230 { .accelerometer = 0, .light = 0, .temperature_set = 5 }, 1233 { .accelerometer = 0, .light = 0, .temperature_set = 5 },
1234/* MacBook3: accelerometer and temperature set 6 */
1235 { .accelerometer = 1, .light = 0, .temperature_set = 6 },
1231}; 1236};
1232 1237
1233/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". 1238/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1237,10 +1242,14 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
1237 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), 1242 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1238 DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") }, 1243 DMI_MATCH(DMI_PRODUCT_NAME,"MacBookPro") },
1239 (void*)&applesmc_dmi_data[0]}, 1244 (void*)&applesmc_dmi_data[0]},
1240 { applesmc_dmi_match, "Apple MacBook", { 1245 { applesmc_dmi_match, "Apple MacBook (v2)", {
1241 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), 1246 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1242 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") }, 1247 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") },
1243 (void*)&applesmc_dmi_data[1]}, 1248 (void*)&applesmc_dmi_data[1]},
1249 { applesmc_dmi_match, "Apple MacBook (v3)", {
1250 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1251 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook3") },
1252 (void*)&applesmc_dmi_data[6]},
1244 { applesmc_dmi_match, "Apple MacBook", { 1253 { applesmc_dmi_match, "Apple MacBook", {
1245 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), 1254 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1246 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") }, 1255 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") },