diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2009-01-24 13:42:53 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2009-01-24 13:42:53 +0100 |
| commit | b26ac497670ea0326f57611b1aabc95e59611622 (patch) | |
| tree | 93dc7d92af2c6be196e0a57ab648decb626edec3 | |
| parent | 62e2212d37d0dc5b5b72232579a4e28d84b19a49 (diff) | |
Add support for MacPro 3 temperature sensors
From: Bharath Ramesh <bramesh@vt.edu>
MacPro 3 have more temperature sensors than the previous MacPro's also
the sensor THTG has been removed. This patch add supports for the
newer temperature sensors in the MacPro3.
Signed-off-by: Bharath Ramesh <bramesh@vt.edu>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | debian/postinst | 2 | ||||
| -rw-r--r-- | debian/postrm | 2 | ||||
| -rw-r--r-- | debian/prerm | 2 | ||||
| -rwxr-xr-x | debian/rules | 2 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/applesmc.c | 30 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/dkms.conf | 2 |
8 files changed, 41 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | NAME = applesmc | 1 | NAME = applesmc |
| 2 | VERSION = 0.14.2 | 2 | VERSION = 0.14.3 |
| 3 | SRC = usr/src | 3 | SRC = usr/src |
| 4 | 4 | ||
| 5 | TARBALL = $(NAME)-$(VERSION).dkms.tar.gz | 5 | TARBALL = $(NAME)-$(VERSION).dkms.tar.gz |
diff --git a/debian/changelog b/debian/changelog index 680ced9..c2c6093 100644 --- a/debian/changelog +++ b/debian/changelog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | applesmc-dkms (0.14.3) unstable; urgency=low | ||
| 2 | |||
| 3 | * Add support for MacPro 3 temperature sensors | ||
| 4 | |||
| 5 | -- Bharath Ramesh <bramesh@vt.edu> Sat, 24 Jan 2009 13:17:39 +0100 | ||
| 6 | |||
| 1 | applesmc-dkms (0.14.2) unstable; urgency=low | 7 | applesmc-dkms (0.14.2) unstable; urgency=low |
| 2 | 8 | ||
| 3 | * Fix light sensor readings on newer MacBooks | 9 | * Fix light sensor readings on newer MacBooks |
diff --git a/debian/postinst b/debian/postinst index 89c94eb..2dfb3d1 100644 --- a/debian/postinst +++ b/debian/postinst | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | set -e | 3 | set -e |
| 4 | 4 | ||
| 5 | NAME=applesmc | 5 | NAME=applesmc |
| 6 | VERSION=0.14.2 | 6 | VERSION=0.14.3 |
| 7 | 7 | ||
| 8 | case "$1" in | 8 | case "$1" in |
| 9 | configure) | 9 | configure) |
diff --git a/debian/postrm b/debian/postrm index 7f94688..18b202f 100644 --- a/debian/postrm +++ b/debian/postrm | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | NAME=applesmc | 3 | NAME=applesmc |
| 4 | VERSION=0.14.2 | 4 | VERSION=0.14.3 |
| 5 | 5 | ||
| 6 | set -e | 6 | set -e |
| 7 | 7 | ||
diff --git a/debian/prerm b/debian/prerm index a6cf719..d82a270 100644 --- a/debian/prerm +++ b/debian/prerm | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | NAME=applesmc | 3 | NAME=applesmc |
| 4 | VERSION=0.14.2 | 4 | VERSION=0.14.3 |
| 5 | 5 | ||
| 6 | set -e | 6 | set -e |
| 7 | 7 | ||
diff --git a/debian/rules b/debian/rules index 9fdb303..7a3af34 100755 --- a/debian/rules +++ b/debian/rules | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #export DH_VERBOSE=1 | 5 | #export DH_VERBOSE=1 |
| 6 | 6 | ||
| 7 | NAME=applesmc | 7 | NAME=applesmc |
| 8 | VERSION=0.14.2 | 8 | VERSION=0.14.3 |
| 9 | 9 | ||
| 10 | configure: configure-stamp | 10 | configure: configure-stamp |
| 11 | configure-stamp: | 11 | configure-stamp: |
diff --git a/usr/src/dkms_source_tree/applesmc.c b/usr/src/dkms_source_tree/applesmc.c index ebf4c03..b007023 100644 --- a/usr/src/dkms_source_tree/applesmc.c +++ b/usr/src/dkms_source_tree/applesmc.c | |||
| @@ -83,7 +83,7 @@ | |||
| 83 | /* | 83 | /* |
| 84 | * Temperature sensors keys (sp78 - 2 bytes). | 84 | * Temperature sensors keys (sp78 - 2 bytes). |
| 85 | */ | 85 | */ |
| 86 | static const char* temperature_sensors_sets[][36] = { | 86 | static const char *temperature_sensors_sets[][41] = { |
| 87 | /* Set 0: Macbook Pro */ | 87 | /* Set 0: Macbook Pro */ |
| 88 | { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H", | 88 | { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H", |
| 89 | "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL }, | 89 | "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL }, |
| @@ -135,6 +135,13 @@ static const char* temperature_sensors_sets[][36] = { | |||
| 135 | { "TB0T", "TB1S", "TB1T", "TB2S", "TB2T", "TC0D", "TN0D", "TTF0", | 135 | { "TB0T", "TB1S", "TB1T", "TB2S", "TB2T", "TC0D", "TN0D", "TTF0", |
| 136 | "TV0P", "TVFP", "TW0P", "Th0P", "Tp0P", "Tp1P", "TpFP", "Ts0P", | 136 | "TV0P", "TVFP", "TW0P", "Th0P", "Tp0P", "Tp1P", "TpFP", "Ts0P", |
| 137 | "Ts0S", NULL }, | 137 | "Ts0S", NULL }, |
| 138 | /* Set 16: Mac Pro 3,1 (2 x Quad-Core) */ | ||
| 139 | { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", "TC0C", "TC0D", "TC0P", | ||
| 140 | "TC1C", "TC1D", "TC2C", "TC2D", "TC3C", "TC3D", "TH0P", "TH1P", | ||
| 141 | "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P", "TM0S", "TM1P", | ||
| 142 | "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", "TM8S", "TM9P", "TM9S", | ||
| 143 | "TN0C", "TN0D", "TN0H", "TS0C", "Tp0C", "Tp1C", "Tv0S", "Tv1S", | ||
| 144 | NULL }, | ||
| 138 | }; | 145 | }; |
| 139 | 146 | ||
| 140 | /* List of keys used to read/write fan speeds */ | 147 | /* List of keys used to read/write fan speeds */ |
| @@ -1153,6 +1160,16 @@ static SENSOR_DEVICE_ATTR(temp34_input, S_IRUGO, | |||
| 1153 | applesmc_show_temperature, NULL, 33); | 1160 | applesmc_show_temperature, NULL, 33); |
| 1154 | static SENSOR_DEVICE_ATTR(temp35_input, S_IRUGO, | 1161 | static SENSOR_DEVICE_ATTR(temp35_input, S_IRUGO, |
| 1155 | applesmc_show_temperature, NULL, 34); | 1162 | applesmc_show_temperature, NULL, 34); |
| 1163 | static SENSOR_DEVICE_ATTR(temp36_input, S_IRUGO, | ||
| 1164 | applesmc_show_temperature, NULL, 35); | ||
| 1165 | static SENSOR_DEVICE_ATTR(temp37_input, S_IRUGO, | ||
| 1166 | applesmc_show_temperature, NULL, 36); | ||
| 1167 | static SENSOR_DEVICE_ATTR(temp38_input, S_IRUGO, | ||
| 1168 | applesmc_show_temperature, NULL, 37); | ||
| 1169 | static SENSOR_DEVICE_ATTR(temp39_input, S_IRUGO, | ||
| 1170 | applesmc_show_temperature, NULL, 38); | ||
| 1171 | static SENSOR_DEVICE_ATTR(temp40_input, S_IRUGO, | ||
| 1172 | applesmc_show_temperature, NULL, 39); | ||
| 1156 | 1173 | ||
| 1157 | static struct attribute *temperature_attributes[] = { | 1174 | static struct attribute *temperature_attributes[] = { |
| 1158 | &sensor_dev_attr_temp1_input.dev_attr.attr, | 1175 | &sensor_dev_attr_temp1_input.dev_attr.attr, |
| @@ -1190,6 +1207,11 @@ static struct attribute *temperature_attributes[] = { | |||
| 1190 | &sensor_dev_attr_temp33_input.dev_attr.attr, | 1207 | &sensor_dev_attr_temp33_input.dev_attr.attr, |
| 1191 | &sensor_dev_attr_temp34_input.dev_attr.attr, | 1208 | &sensor_dev_attr_temp34_input.dev_attr.attr, |
| 1192 | &sensor_dev_attr_temp35_input.dev_attr.attr, | 1209 | &sensor_dev_attr_temp35_input.dev_attr.attr, |
| 1210 | &sensor_dev_attr_temp36_input.dev_attr.attr, | ||
| 1211 | &sensor_dev_attr_temp37_input.dev_attr.attr, | ||
| 1212 | &sensor_dev_attr_temp38_input.dev_attr.attr, | ||
| 1213 | &sensor_dev_attr_temp39_input.dev_attr.attr, | ||
| 1214 | &sensor_dev_attr_temp40_input.dev_attr.attr, | ||
| 1193 | NULL | 1215 | NULL |
| 1194 | }; | 1216 | }; |
| 1195 | 1217 | ||
| @@ -1312,6 +1334,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = { | |||
| 1312 | { .accelerometer = 0, .light = 0, .temperature_set = 14 }, | 1334 | { .accelerometer = 0, .light = 0, .temperature_set = 14 }, |
| 1313 | /* MacBook Air 2,1: accelerometer, backlight and temperature set 15 */ | 1335 | /* MacBook Air 2,1: accelerometer, backlight and temperature set 15 */ |
| 1314 | { .accelerometer = 1, .light = 1, .temperature_set = 15 }, | 1336 | { .accelerometer = 1, .light = 1, .temperature_set = 15 }, |
| 1337 | /* MacPro3,1: temperature set 16 */ | ||
| 1338 | { .accelerometer = 0, .light = 0, .temperature_set = 16 }, | ||
| 1315 | }; | 1339 | }; |
| 1316 | 1340 | ||
| 1317 | /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". | 1341 | /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". |
| @@ -1369,6 +1393,10 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = { | |||
| 1369 | DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), | 1393 | DMI_MATCH(DMI_BOARD_VENDOR,"Apple"), |
| 1370 | DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") }, | 1394 | DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") }, |
| 1371 | &applesmc_dmi_data[4]}, | 1395 | &applesmc_dmi_data[4]}, |
| 1396 | { applesmc_dmi_match, "Apple MacPro3", { | ||
| 1397 | DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), | ||
| 1398 | DMI_MATCH(DMI_PRODUCT_NAME, "MacPro3") }, | ||
| 1399 | &applesmc_dmi_data[16]}, | ||
| 1372 | { applesmc_dmi_match, "Apple MacPro", { | 1400 | { applesmc_dmi_match, "Apple MacPro", { |
| 1373 | DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), | 1401 | DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), |
| 1374 | DMI_MATCH(DMI_PRODUCT_NAME, "MacPro") }, | 1402 | DMI_MATCH(DMI_PRODUCT_NAME, "MacPro") }, |
diff --git a/usr/src/dkms_source_tree/dkms.conf b/usr/src/dkms_source_tree/dkms.conf index a94c408..b80a8ce 100644 --- a/usr/src/dkms_source_tree/dkms.conf +++ b/usr/src/dkms_source_tree/dkms.conf | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | NAME=applesmc | 1 | NAME=applesmc |
| 2 | VERSION=0.14.2 | 2 | VERSION=0.14.3 |
| 3 | PACKAGE_NAME="$NAME" | 3 | PACKAGE_NAME="$NAME" |
| 4 | PACKAGE_VERSION="$VERSION" | 4 | PACKAGE_VERSION="$VERSION" |
| 5 | MAKE[0]="make -C ${kernel_source_dir} | 5 | MAKE[0]="make -C ${kernel_source_dir} |
