aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorRiki Oktarianto <rkoktarianto@gmail.com>2008-02-05 02:41:58 -0500
committerMark M. Hoffman <mhoffman@lightlink.com>2008-02-17 15:04:14 -0500
commitcd19ba1391f93bc3741d298667c074d2d3fcc9fd (patch)
treee7e244907edf224414b80bacd24ae3cfbd9a7b16 /drivers/hwmon
parent5910a9b2b1ff6205b39e5e03fdfd0ddb2a78386a (diff)
hwmon: (applesmc) sensors set for MacBook2
On my mid-2007 MacBook2, reading Ts0P sensor always failed with this message: applesmc: wait status failed: 5 != 50. So I assume that there's no such Ts0p sensor in this model (please confirm, anyone). If there's the case, then we need a new set of sensors defined for MacBook2. Signed-off-by: Riki Oktarianto <rkoktarianto@gmail.com> Cc: Nicolas Boichat <nicolas@boichat.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/applesmc.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 0c94770b7f83..aacc0c4b809c 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -84,12 +84,15 @@ static const char* temperature_sensors_sets[][36] = {
84/* Set 0: Macbook Pro */ 84/* Set 0: Macbook Pro */
85 { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H", 85 { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
86 "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL }, 86 "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
87/* Set 1: Macbook set */ 87/* Set 1: Macbook2 set */
88 { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "TTF0", "Th0H",
89 "Th0S", "Th1H", NULL },
90/* Set 2: Macbook set */
88 { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "Th0H", "Th0S", 91 { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "Th0H", "Th0S",
89 "Th1H", "Ts0P", NULL }, 92 "Th1H", "Ts0P", NULL },
90/* Set 2: Macmini set */ 93/* Set 3: Macmini set */
91 { "TC0D", "TC0P", NULL }, 94 { "TC0D", "TC0P", NULL },
92/* Set 3: Mac Pro (2 x Quad-Core) */ 95/* Set 4: Mac Pro (2 x Quad-Core) */
93 { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", "TC0C", "TC0D", "TC0P", 96 { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", "TC0C", "TC0D", "TC0P",
94 "TC1C", "TC1D", "TC2C", "TC2D", "TC3C", "TC3D", "THTG", "TH0P", 97 "TC1C", "TC1D", "TC2C", "TC2D", "TC3C", "TC3D", "THTG", "TH0P",
95 "TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P", "TM0S", 98 "TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P", "TM0S",
@@ -1212,12 +1215,14 @@ static void applesmc_release_accelerometer(void)
1212static __initdata struct dmi_match_data applesmc_dmi_data[] = { 1215static __initdata struct dmi_match_data applesmc_dmi_data[] = {
1213/* MacBook Pro: accelerometer, backlight and temperature set 0 */ 1216/* MacBook Pro: accelerometer, backlight and temperature set 0 */
1214 { .accelerometer = 1, .light = 1, .temperature_set = 0 }, 1217 { .accelerometer = 1, .light = 1, .temperature_set = 0 },
1215/* MacBook: accelerometer and temperature set 1 */ 1218/* MacBook2: accelerometer and temperature set 1 */
1216 { .accelerometer = 1, .light = 0, .temperature_set = 1 }, 1219 { .accelerometer = 1, .light = 0, .temperature_set = 1 },
1217/* MacMini: temperature set 2 */ 1220/* MacBook: accelerometer and temperature set 2 */
1218 { .accelerometer = 0, .light = 0, .temperature_set = 2 }, 1221 { .accelerometer = 1, .light = 0, .temperature_set = 2 },
1219/* MacPro: temperature set 3 */ 1222/* MacMini: temperature set 3 */
1220 { .accelerometer = 0, .light = 0, .temperature_set = 3 }, 1223 { .accelerometer = 0, .light = 0, .temperature_set = 3 },
1224/* MacPro: temperature set 4 */
1225 { .accelerometer = 0, .light = 0, .temperature_set = 4 },
1221}; 1226};
1222 1227
1223/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". 1228/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
@@ -1229,16 +1234,20 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
1229 (void*)&applesmc_dmi_data[0]}, 1234 (void*)&applesmc_dmi_data[0]},
1230 { applesmc_dmi_match, "Apple MacBook", { 1235 { applesmc_dmi_match, "Apple MacBook", {
1231 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), 1236 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1232 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") }, 1237 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook2") },
1233 (void*)&applesmc_dmi_data[1]}, 1238 (void*)&applesmc_dmi_data[1]},
1239 { applesmc_dmi_match, "Apple MacBook", {
1240 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1241 DMI_MATCH(DMI_PRODUCT_NAME,"MacBook") },
1242 (void*)&applesmc_dmi_data[2]},
1234 { applesmc_dmi_match, "Apple Macmini", { 1243 { applesmc_dmi_match, "Apple Macmini", {
1235 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), 1244 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1236 DMI_MATCH(DMI_PRODUCT_NAME,"Macmini") }, 1245 DMI_MATCH(DMI_PRODUCT_NAME,"Macmini") },
1237 (void*)&applesmc_dmi_data[2]}, 1246 (void*)&applesmc_dmi_data[3]},
1238 { applesmc_dmi_match, "Apple MacPro2", { 1247 { applesmc_dmi_match, "Apple MacPro2", {
1239 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), 1248 DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
1240 DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") }, 1249 DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
1241 (void*)&applesmc_dmi_data[3]}, 1250 (void*)&applesmc_dmi_data[4]},
1242 { .ident = NULL } 1251 { .ident = NULL }
1243}; 1252};
1244 1253