aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/thinkpad_acpi.c188
-rw-r--r--drivers/misc/thinkpad_acpi.h64
2 files changed, 125 insertions, 127 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 80ef195c9581..1683bfe15b35 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -781,16 +781,16 @@ static int video_init(void)
781 781
782 if (!vid_handle) 782 if (!vid_handle)
783 /* video switching not supported on R30, R31 */ 783 /* video switching not supported on R30, R31 */
784 video_supported = IBMACPI_VIDEO_NONE; 784 video_supported = TPACPI_VIDEO_NONE;
785 else if (acpi_evalf(vid_handle, &video_orig_autosw, "SWIT", "qd")) 785 else if (acpi_evalf(vid_handle, &video_orig_autosw, "SWIT", "qd"))
786 /* 570 */ 786 /* 570 */
787 video_supported = IBMACPI_VIDEO_570; 787 video_supported = TPACPI_VIDEO_570;
788 else if (acpi_evalf(vid_handle, &video_orig_autosw, "^VADL", "qd")) 788 else if (acpi_evalf(vid_handle, &video_orig_autosw, "^VADL", "qd"))
789 /* 600e/x, 770e, 770x */ 789 /* 600e/x, 770e, 770x */
790 video_supported = IBMACPI_VIDEO_770; 790 video_supported = TPACPI_VIDEO_770;
791 else 791 else
792 /* all others */ 792 /* all others */
793 video_supported = IBMACPI_VIDEO_NEW; 793 video_supported = TPACPI_VIDEO_NEW;
794 794
795 return 0; 795 return 0;
796} 796}
@@ -805,15 +805,15 @@ static int video_status(void)
805 int status = 0; 805 int status = 0;
806 int i; 806 int i;
807 807
808 if (video_supported == IBMACPI_VIDEO_570) { 808 if (video_supported == TPACPI_VIDEO_570) {
809 if (acpi_evalf(NULL, &i, "\\_SB.PHS", "dd", 0x87)) 809 if (acpi_evalf(NULL, &i, "\\_SB.PHS", "dd", 0x87))
810 status = i & 3; 810 status = i & 3;
811 } else if (video_supported == IBMACPI_VIDEO_770) { 811 } else if (video_supported == TPACPI_VIDEO_770) {
812 if (acpi_evalf(NULL, &i, "\\VCDL", "d")) 812 if (acpi_evalf(NULL, &i, "\\VCDL", "d"))
813 status |= 0x01 * i; 813 status |= 0x01 * i;
814 if (acpi_evalf(NULL, &i, "\\VCDC", "d")) 814 if (acpi_evalf(NULL, &i, "\\VCDC", "d"))
815 status |= 0x02 * i; 815 status |= 0x02 * i;
816 } else if (video_supported == IBMACPI_VIDEO_NEW) { 816 } else if (video_supported == TPACPI_VIDEO_NEW) {
817 acpi_evalf(NULL, NULL, "\\VUPS", "vd", 1); 817 acpi_evalf(NULL, NULL, "\\VUPS", "vd", 1);
818 if (acpi_evalf(NULL, &i, "\\VCDC", "d")) 818 if (acpi_evalf(NULL, &i, "\\VCDC", "d"))
819 status |= 0x02 * i; 819 status |= 0x02 * i;
@@ -832,10 +832,10 @@ static int video_autosw(void)
832{ 832{
833 int autosw = 0; 833 int autosw = 0;
834 834
835 if (video_supported == IBMACPI_VIDEO_570) 835 if (video_supported == TPACPI_VIDEO_570)
836 acpi_evalf(vid_handle, &autosw, "SWIT", "d"); 836 acpi_evalf(vid_handle, &autosw, "SWIT", "d");
837 else if (video_supported == IBMACPI_VIDEO_770 || 837 else if (video_supported == TPACPI_VIDEO_770 ||
838 video_supported == IBMACPI_VIDEO_NEW) 838 video_supported == TPACPI_VIDEO_NEW)
839 acpi_evalf(vid_handle, &autosw, "^VDEE", "d"); 839 acpi_evalf(vid_handle, &autosw, "^VDEE", "d");
840 840
841 return autosw & 1; 841 return autosw & 1;
@@ -848,7 +848,7 @@ static int video_switch(void)
848 848
849 if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 1)) 849 if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 1))
850 return -EIO; 850 return -EIO;
851 ret = video_supported == IBMACPI_VIDEO_570 ? 851 ret = video_supported == TPACPI_VIDEO_570 ?
852 acpi_evalf(ec_handle, NULL, "_Q16", "v") : 852 acpi_evalf(ec_handle, NULL, "_Q16", "v") :
853 acpi_evalf(vid_handle, NULL, "VSWT", "v"); 853 acpi_evalf(vid_handle, NULL, "VSWT", "v");
854 acpi_evalf(vid_handle, NULL, "_DOS", "vd", autosw); 854 acpi_evalf(vid_handle, NULL, "_DOS", "vd", autosw);
@@ -858,9 +858,9 @@ static int video_switch(void)
858 858
859static int video_expand(void) 859static int video_expand(void)
860{ 860{
861 if (video_supported == IBMACPI_VIDEO_570) 861 if (video_supported == TPACPI_VIDEO_570)
862 return acpi_evalf(ec_handle, NULL, "_Q17", "v"); 862 return acpi_evalf(ec_handle, NULL, "_Q17", "v");
863 else if (video_supported == IBMACPI_VIDEO_770) 863 else if (video_supported == TPACPI_VIDEO_770)
864 return acpi_evalf(vid_handle, NULL, "VEXP", "v"); 864 return acpi_evalf(vid_handle, NULL, "VEXP", "v");
865 else 865 else
866 return acpi_evalf(NULL, NULL, "\\VEXP", "v"); 866 return acpi_evalf(NULL, NULL, "\\VEXP", "v");
@@ -870,10 +870,10 @@ static int video_switch2(int status)
870{ 870{
871 int ret; 871 int ret;
872 872
873 if (video_supported == IBMACPI_VIDEO_570) { 873 if (video_supported == TPACPI_VIDEO_570) {
874 ret = acpi_evalf(NULL, NULL, 874 ret = acpi_evalf(NULL, NULL,
875 "\\_SB.PHS2", "vdd", 0x8b, status | 0x80); 875 "\\_SB.PHS2", "vdd", 0x8b, status | 0x80);
876 } else if (video_supported == IBMACPI_VIDEO_770) { 876 } else if (video_supported == TPACPI_VIDEO_770) {
877 int autosw = video_autosw(); 877 int autosw = video_autosw();
878 if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 1)) 878 if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", 1))
879 return -EIO; 879 return -EIO;
@@ -904,12 +904,12 @@ static int video_read(char *p)
904 len += sprintf(p + len, "status:\t\tsupported\n"); 904 len += sprintf(p + len, "status:\t\tsupported\n");
905 len += sprintf(p + len, "lcd:\t\t%s\n", enabled(status, 0)); 905 len += sprintf(p + len, "lcd:\t\t%s\n", enabled(status, 0));
906 len += sprintf(p + len, "crt:\t\t%s\n", enabled(status, 1)); 906 len += sprintf(p + len, "crt:\t\t%s\n", enabled(status, 1));
907 if (video_supported == IBMACPI_VIDEO_NEW) 907 if (video_supported == TPACPI_VIDEO_NEW)
908 len += sprintf(p + len, "dvi:\t\t%s\n", enabled(status, 3)); 908 len += sprintf(p + len, "dvi:\t\t%s\n", enabled(status, 3));
909 len += sprintf(p + len, "auto:\t\t%s\n", enabled(autosw, 0)); 909 len += sprintf(p + len, "auto:\t\t%s\n", enabled(autosw, 0));
910 len += sprintf(p + len, "commands:\tlcd_enable, lcd_disable\n"); 910 len += sprintf(p + len, "commands:\tlcd_enable, lcd_disable\n");
911 len += sprintf(p + len, "commands:\tcrt_enable, crt_disable\n"); 911 len += sprintf(p + len, "commands:\tcrt_enable, crt_disable\n");
912 if (video_supported == IBMACPI_VIDEO_NEW) 912 if (video_supported == TPACPI_VIDEO_NEW)
913 len += sprintf(p + len, "commands:\tdvi_enable, dvi_disable\n"); 913 len += sprintf(p + len, "commands:\tdvi_enable, dvi_disable\n");
914 len += sprintf(p + len, "commands:\tauto_enable, auto_disable\n"); 914 len += sprintf(p + len, "commands:\tauto_enable, auto_disable\n");
915 len += sprintf(p + len, "commands:\tvideo_switch, expand_toggle\n"); 915 len += sprintf(p + len, "commands:\tvideo_switch, expand_toggle\n");
@@ -936,10 +936,10 @@ static int video_write(char *buf)
936 enable |= 0x02; 936 enable |= 0x02;
937 } else if (strlencmp(cmd, "crt_disable") == 0) { 937 } else if (strlencmp(cmd, "crt_disable") == 0) {
938 disable |= 0x02; 938 disable |= 0x02;
939 } else if (video_supported == IBMACPI_VIDEO_NEW && 939 } else if (video_supported == TPACPI_VIDEO_NEW &&
940 strlencmp(cmd, "dvi_enable") == 0) { 940 strlencmp(cmd, "dvi_enable") == 0) {
941 enable |= 0x08; 941 enable |= 0x08;
942 } else if (video_supported == IBMACPI_VIDEO_NEW && 942 } else if (video_supported == TPACPI_VIDEO_NEW &&
943 strlencmp(cmd, "dvi_disable") == 0) { 943 strlencmp(cmd, "dvi_disable") == 0) {
944 disable |= 0x08; 944 disable |= 0x08;
945 } else if (strlencmp(cmd, "auto_enable") == 0) { 945 } else if (strlencmp(cmd, "auto_enable") == 0) {
@@ -1283,16 +1283,16 @@ static int led_init(void)
1283{ 1283{
1284 if (!led_handle) 1284 if (!led_handle)
1285 /* led not supported on R30, R31 */ 1285 /* led not supported on R30, R31 */
1286 led_supported = IBMACPI_LED_NONE; 1286 led_supported = TPACPI_LED_NONE;
1287 else if (strlencmp(led_path, "SLED") == 0) 1287 else if (strlencmp(led_path, "SLED") == 0)
1288 /* 570 */ 1288 /* 570 */
1289 led_supported = IBMACPI_LED_570; 1289 led_supported = TPACPI_LED_570;
1290 else if (strlencmp(led_path, "SYSL") == 0) 1290 else if (strlencmp(led_path, "SYSL") == 0)
1291 /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20-21 */ 1291 /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20-21 */
1292 led_supported = IBMACPI_LED_OLD; 1292 led_supported = TPACPI_LED_OLD;
1293 else 1293 else
1294 /* all others */ 1294 /* all others */
1295 led_supported = IBMACPI_LED_NEW; 1295 led_supported = TPACPI_LED_NEW;
1296 1296
1297 return 0; 1297 return 0;
1298} 1298}
@@ -1309,7 +1309,7 @@ static int led_read(char *p)
1309 } 1309 }
1310 len += sprintf(p + len, "status:\t\tsupported\n"); 1310 len += sprintf(p + len, "status:\t\tsupported\n");
1311 1311
1312 if (led_supported == IBMACPI_LED_570) { 1312 if (led_supported == TPACPI_LED_570) {
1313 /* 570 */ 1313 /* 570 */
1314 int i, status; 1314 int i, status;
1315 for (i = 0; i < 8; i++) { 1315 for (i = 0; i < 8; i++) {
@@ -1354,23 +1354,23 @@ static int led_write(char *buf)
1354 } else 1354 } else
1355 return -EINVAL; 1355 return -EINVAL;
1356 1356
1357 if (led_supported == IBMACPI_LED_570) { 1357 if (led_supported == TPACPI_LED_570) {
1358 /* 570 */ 1358 /* 570 */
1359 led = 1 << led; 1359 led = 1 << led;
1360 if (!acpi_evalf(led_handle, NULL, NULL, "vdd", 1360 if (!acpi_evalf(led_handle, NULL, NULL, "vdd",
1361 led, led_sled_arg1[ind])) 1361 led, led_sled_arg1[ind]))
1362 return -EIO; 1362 return -EIO;
1363 } else if (led_supported == IBMACPI_LED_OLD) { 1363 } else if (led_supported == TPACPI_LED_OLD) {
1364 /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */ 1364 /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */
1365 led = 1 << led; 1365 led = 1 << led;
1366 ret = ec_write(IBMACPI_LED_EC_HLMS, led); 1366 ret = ec_write(TPACPI_LED_EC_HLMS, led);
1367 if (ret >= 0) 1367 if (ret >= 0)
1368 ret = 1368 ret =
1369 ec_write(IBMACPI_LED_EC_HLBL, 1369 ec_write(TPACPI_LED_EC_HLBL,
1370 led * led_exp_hlbl[ind]); 1370 led * led_exp_hlbl[ind]);
1371 if (ret >= 0) 1371 if (ret >= 0)
1372 ret = 1372 ret =
1373 ec_write(IBMACPI_LED_EC_HLCL, 1373 ec_write(TPACPI_LED_EC_HLCL,
1374 led * led_exp_hlcl[ind]); 1374 led * led_exp_hlcl[ind]);
1375 if (ret < 0) 1375 if (ret < 0)
1376 return ret; 1376 return ret;
@@ -1467,29 +1467,29 @@ static int thermal_init(void)
1467 printk(IBM_ERR 1467 printk(IBM_ERR
1468 "ThinkPad ACPI EC access misbehaving, " 1468 "ThinkPad ACPI EC access misbehaving, "
1469 "falling back to ACPI TMPx access mode\n"); 1469 "falling back to ACPI TMPx access mode\n");
1470 thermal_read_mode = IBMACPI_THERMAL_ACPI_TMP07; 1470 thermal_read_mode = TPACPI_THERMAL_ACPI_TMP07;
1471 } else { 1471 } else {
1472 printk(IBM_ERR 1472 printk(IBM_ERR
1473 "ThinkPad ACPI EC access misbehaving, " 1473 "ThinkPad ACPI EC access misbehaving, "
1474 "disabling thermal sensors access\n"); 1474 "disabling thermal sensors access\n");
1475 thermal_read_mode = IBMACPI_THERMAL_NONE; 1475 thermal_read_mode = TPACPI_THERMAL_NONE;
1476 } 1476 }
1477 } else { 1477 } else {
1478 thermal_read_mode = 1478 thermal_read_mode =
1479 (ta2 != 0) ? 1479 (ta2 != 0) ?
1480 IBMACPI_THERMAL_TPEC_16 : IBMACPI_THERMAL_TPEC_8; 1480 TPACPI_THERMAL_TPEC_16 : TPACPI_THERMAL_TPEC_8;
1481 } 1481 }
1482 } else if (acpi_tmp7) { 1482 } else if (acpi_tmp7) {
1483 if (acpi_evalf(ec_handle, NULL, "UPDT", "qv")) { 1483 if (acpi_evalf(ec_handle, NULL, "UPDT", "qv")) {
1484 /* 600e/x, 770e, 770x */ 1484 /* 600e/x, 770e, 770x */
1485 thermal_read_mode = IBMACPI_THERMAL_ACPI_UPDT; 1485 thermal_read_mode = TPACPI_THERMAL_ACPI_UPDT;
1486 } else { 1486 } else {
1487 /* Standard ACPI TMPx access, max 8 sensors */ 1487 /* Standard ACPI TMPx access, max 8 sensors */
1488 thermal_read_mode = IBMACPI_THERMAL_ACPI_TMP07; 1488 thermal_read_mode = TPACPI_THERMAL_ACPI_TMP07;
1489 } 1489 }
1490 } else { 1490 } else {
1491 /* temperatures not supported on 570, G4x, R30, R31, R32 */ 1491 /* temperatures not supported on 570, G4x, R30, R31, R32 */
1492 thermal_read_mode = IBMACPI_THERMAL_NONE; 1492 thermal_read_mode = TPACPI_THERMAL_NONE;
1493 } 1493 }
1494 1494
1495 return 0; 1495 return 0;
@@ -1505,8 +1505,8 @@ static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s)
1505 return -EINVAL; 1505 return -EINVAL;
1506 1506
1507 switch (thermal_read_mode) { 1507 switch (thermal_read_mode) {
1508#if IBMACPI_MAX_THERMAL_SENSORS >= 16 1508#if TPACPI_MAX_THERMAL_SENSORS >= 16
1509 case IBMACPI_THERMAL_TPEC_16: 1509 case TPACPI_THERMAL_TPEC_16:
1510 for (i = 0; i < 8; i++) { 1510 for (i = 0; i < 8; i++) {
1511 if (!acpi_ec_read(0xC0 + i, &tmp)) 1511 if (!acpi_ec_read(0xC0 + i, &tmp))
1512 return -EIO; 1512 return -EIO;
@@ -1514,15 +1514,15 @@ static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s)
1514 } 1514 }
1515 /* fallthrough */ 1515 /* fallthrough */
1516#endif 1516#endif
1517 case IBMACPI_THERMAL_TPEC_8: 1517 case TPACPI_THERMAL_TPEC_8:
1518 for (i = 0; i < 8; i++) { 1518 for (i = 0; i < 8; i++) {
1519 if (!acpi_ec_read(0x78 + i, &tmp)) 1519 if (!acpi_ec_read(0x78 + i, &tmp))
1520 return -EIO; 1520 return -EIO;
1521 s->temp[i] = tmp * 1000; 1521 s->temp[i] = tmp * 1000;
1522 } 1522 }
1523 return (thermal_read_mode == IBMACPI_THERMAL_TPEC_16) ? 16 : 8; 1523 return (thermal_read_mode == TPACPI_THERMAL_TPEC_16) ? 16 : 8;
1524 1524
1525 case IBMACPI_THERMAL_ACPI_UPDT: 1525 case TPACPI_THERMAL_ACPI_UPDT:
1526 if (!acpi_evalf(ec_handle, NULL, "UPDT", "v")) 1526 if (!acpi_evalf(ec_handle, NULL, "UPDT", "v"))
1527 return -EIO; 1527 return -EIO;
1528 for (i = 0; i < 8; i++) { 1528 for (i = 0; i < 8; i++) {
@@ -1533,7 +1533,7 @@ static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s)
1533 } 1533 }
1534 return 8; 1534 return 8;
1535 1535
1536 case IBMACPI_THERMAL_ACPI_TMP07: 1536 case TPACPI_THERMAL_ACPI_TMP07:
1537 for (i = 0; i < 8; i++) { 1537 for (i = 0; i < 8; i++) {
1538 tmpi[3] = '0' + i; 1538 tmpi[3] = '0' + i;
1539 if (!acpi_evalf(ec_handle, &t, tmpi, "d")) 1539 if (!acpi_evalf(ec_handle, &t, tmpi, "d"))
@@ -1542,7 +1542,7 @@ static int thermal_get_sensors(struct ibm_thermal_sensors_struct *s)
1542 } 1542 }
1543 return 8; 1543 return 8;
1544 1544
1545 case IBMACPI_THERMAL_NONE: 1545 case TPACPI_THERMAL_NONE:
1546 default: 1546 default:
1547 return 0; 1547 return 0;
1548 } 1548 }
@@ -1848,18 +1848,18 @@ static int volume_write(char *buf)
1848/* 1848/*
1849 * FAN ACCESS MODES 1849 * FAN ACCESS MODES
1850 * 1850 *
1851 * IBMACPI_FAN_RD_ACPI_GFAN: 1851 * TPACPI_FAN_RD_ACPI_GFAN:
1852 * ACPI GFAN method: returns fan level 1852 * ACPI GFAN method: returns fan level
1853 * 1853 *
1854 * see IBMACPI_FAN_WR_ACPI_SFAN 1854 * see TPACPI_FAN_WR_ACPI_SFAN
1855 * EC 0x2f not available if GFAN exists 1855 * EC 0x2f not available if GFAN exists
1856 * 1856 *
1857 * IBMACPI_FAN_WR_ACPI_SFAN: 1857 * TPACPI_FAN_WR_ACPI_SFAN:
1858 * ACPI SFAN method: sets fan level, 0 (stop) to 7 (max) 1858 * ACPI SFAN method: sets fan level, 0 (stop) to 7 (max)
1859 * 1859 *
1860 * EC 0x2f might be available *for reading*, but never for writing. 1860 * EC 0x2f might be available *for reading*, but never for writing.
1861 * 1861 *
1862 * IBMACPI_FAN_WR_TPEC: 1862 * TPACPI_FAN_WR_TPEC:
1863 * ThinkPad EC register 0x2f (HFSP): fan control loop mode Supported 1863 * ThinkPad EC register 0x2f (HFSP): fan control loop mode Supported
1864 * on almost all ThinkPads 1864 * on almost all ThinkPads
1865 * 1865 *
@@ -1888,7 +1888,7 @@ static int volume_write(char *buf)
1888 * 0x00 = stop 1888 * 0x00 = stop
1889 * 0x07 = max (set when temperatures critical) 1889 * 0x07 = max (set when temperatures critical)
1890 * Some ThinkPads may have other levels, see 1890 * Some ThinkPads may have other levels, see
1891 * IBMACPI_FAN_WR_ACPI_FANS (X31/X40/X41) 1891 * TPACPI_FAN_WR_ACPI_FANS (X31/X40/X41)
1892 * 1892 *
1893 * FIRMWARE BUG: on some models, EC 0x2f might not be initialized at 1893 * FIRMWARE BUG: on some models, EC 0x2f might not be initialized at
1894 * boot. Apparently the EC does not intialize it, so unless ACPI DSDT 1894 * boot. Apparently the EC does not intialize it, so unless ACPI DSDT
@@ -1923,7 +1923,7 @@ static int volume_write(char *buf)
1923 * For firmware bugs, refer to: 1923 * For firmware bugs, refer to:
1924 * http://thinkwiki.org/wiki/Embedded_Controller_Firmware#Firmware_Issues 1924 * http://thinkwiki.org/wiki/Embedded_Controller_Firmware#Firmware_Issues
1925 * 1925 *
1926 * IBMACPI_FAN_WR_ACPI_FANS: 1926 * TPACPI_FAN_WR_ACPI_FANS:
1927 * ThinkPad X31, X40, X41. Not available in the X60. 1927 * ThinkPad X31, X40, X41. Not available in the X60.
1928 * 1928 *
1929 * FANS ACPI handle: takes three arguments: low speed, medium speed, 1929 * FANS ACPI handle: takes three arguments: low speed, medium speed,
@@ -1940,7 +1940,7 @@ static int volume_write(char *buf)
1940 * ACPI DSDT switches which set is in use depending on various 1940 * ACPI DSDT switches which set is in use depending on various
1941 * factors. 1941 * factors.
1942 * 1942 *
1943 * IBMACPI_FAN_WR_TPEC is also available and should be used to 1943 * TPACPI_FAN_WR_TPEC is also available and should be used to
1944 * command the fan. The X31/X40/X41 seems to have 8 fan levels, 1944 * command the fan. The X31/X40/X41 seems to have 8 fan levels,
1945 * but the ACPI tables just mention level 7. 1945 * but the ACPI tables just mention level 7.
1946 */ 1946 */
@@ -1966,21 +1966,21 @@ IBM_HANDLE(sfan, ec, "SFAN", /* 570 */
1966 1966
1967static int fan_init(void) 1967static int fan_init(void)
1968{ 1968{
1969 fan_status_access_mode = IBMACPI_FAN_NONE; 1969 fan_status_access_mode = TPACPI_FAN_NONE;
1970 fan_control_access_mode = IBMACPI_FAN_WR_NONE; 1970 fan_control_access_mode = TPACPI_FAN_WR_NONE;
1971 fan_control_commands = 0; 1971 fan_control_commands = 0;
1972 fan_control_status_known = 1; 1972 fan_control_status_known = 1;
1973 fan_watchdog_maxinterval = 0; 1973 fan_watchdog_maxinterval = 0;
1974 1974
1975 if (gfan_handle) { 1975 if (gfan_handle) {
1976 /* 570, 600e/x, 770e, 770x */ 1976 /* 570, 600e/x, 770e, 770x */
1977 fan_status_access_mode = IBMACPI_FAN_RD_ACPI_GFAN; 1977 fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN;
1978 } else { 1978 } else {
1979 /* all other ThinkPads: note that even old-style 1979 /* all other ThinkPads: note that even old-style
1980 * ThinkPad ECs supports the fan control register */ 1980 * ThinkPad ECs supports the fan control register */
1981 if (likely(acpi_ec_read(fan_status_offset, 1981 if (likely(acpi_ec_read(fan_status_offset,
1982 &fan_control_initial_status))) { 1982 &fan_control_initial_status))) {
1983 fan_status_access_mode = IBMACPI_FAN_RD_TPEC; 1983 fan_status_access_mode = TPACPI_FAN_RD_TPEC;
1984 1984
1985 /* In some ThinkPads, neither the EC nor the ACPI 1985 /* In some ThinkPads, neither the EC nor the ACPI
1986 * DSDT initialize the fan status, and it ends up 1986 * DSDT initialize the fan status, and it ends up
@@ -2015,9 +2015,9 @@ static int fan_init(void)
2015 2015
2016 if (sfan_handle) { 2016 if (sfan_handle) {
2017 /* 570, 770x-JL */ 2017 /* 570, 770x-JL */
2018 fan_control_access_mode = IBMACPI_FAN_WR_ACPI_SFAN; 2018 fan_control_access_mode = TPACPI_FAN_WR_ACPI_SFAN;
2019 fan_control_commands |= 2019 fan_control_commands |=
2020 IBMACPI_FAN_CMD_LEVEL | IBMACPI_FAN_CMD_ENABLE; 2020 TPACPI_FAN_CMD_LEVEL | TPACPI_FAN_CMD_ENABLE;
2021 } else { 2021 } else {
2022 if (!gfan_handle) { 2022 if (!gfan_handle) {
2023 /* gfan without sfan means no fan control */ 2023 /* gfan without sfan means no fan control */
@@ -2026,16 +2026,16 @@ static int fan_init(void)
2026 if (fans_handle) { 2026 if (fans_handle) {
2027 /* X31, X40, X41 */ 2027 /* X31, X40, X41 */
2028 fan_control_access_mode = 2028 fan_control_access_mode =
2029 IBMACPI_FAN_WR_ACPI_FANS; 2029 TPACPI_FAN_WR_ACPI_FANS;
2030 fan_control_commands |= 2030 fan_control_commands |=
2031 IBMACPI_FAN_CMD_SPEED | 2031 TPACPI_FAN_CMD_SPEED |
2032 IBMACPI_FAN_CMD_LEVEL | 2032 TPACPI_FAN_CMD_LEVEL |
2033 IBMACPI_FAN_CMD_ENABLE; 2033 TPACPI_FAN_CMD_ENABLE;
2034 } else { 2034 } else {
2035 fan_control_access_mode = IBMACPI_FAN_WR_TPEC; 2035 fan_control_access_mode = TPACPI_FAN_WR_TPEC;
2036 fan_control_commands |= 2036 fan_control_commands |=
2037 IBMACPI_FAN_CMD_LEVEL | 2037 TPACPI_FAN_CMD_LEVEL |
2038 IBMACPI_FAN_CMD_ENABLE; 2038 TPACPI_FAN_CMD_ENABLE;
2039 } 2039 }
2040 } 2040 }
2041 } 2041 }
@@ -2048,10 +2048,10 @@ static int fan_get_status(u8 *status)
2048 u8 s; 2048 u8 s;
2049 2049
2050 /* TODO: 2050 /* TODO:
2051 * Add IBMACPI_FAN_RD_ACPI_FANS ? */ 2051 * Add TPACPI_FAN_RD_ACPI_FANS ? */
2052 2052
2053 switch (fan_status_access_mode) { 2053 switch (fan_status_access_mode) {
2054 case IBMACPI_FAN_RD_ACPI_GFAN: 2054 case TPACPI_FAN_RD_ACPI_GFAN:
2055 /* 570, 600e/x, 770e, 770x */ 2055 /* 570, 600e/x, 770e, 770x */
2056 2056
2057 if (unlikely(!acpi_evalf(gfan_handle, &s, NULL, "d"))) 2057 if (unlikely(!acpi_evalf(gfan_handle, &s, NULL, "d")))
@@ -2062,7 +2062,7 @@ static int fan_get_status(u8 *status)
2062 2062
2063 break; 2063 break;
2064 2064
2065 case IBMACPI_FAN_RD_TPEC: 2065 case TPACPI_FAN_RD_TPEC:
2066 /* all except 570, 600e/x, 770e, 770x */ 2066 /* all except 570, 600e/x, 770e, 770x */
2067 if (unlikely(!acpi_ec_read(fan_status_offset, &s))) 2067 if (unlikely(!acpi_ec_read(fan_status_offset, &s)))
2068 return -EIO; 2068 return -EIO;
@@ -2090,7 +2090,7 @@ static int fan_get_speed(unsigned int *speed)
2090 u8 hi, lo; 2090 u8 hi, lo;
2091 2091
2092 switch (fan_status_access_mode) { 2092 switch (fan_status_access_mode) {
2093 case IBMACPI_FAN_RD_TPEC: 2093 case TPACPI_FAN_RD_TPEC:
2094 /* all except 570, 600e/x, 770e, 770x */ 2094 /* all except 570, 600e/x, 770e, 770x */
2095 if (unlikely(!acpi_ec_read(fan_rpm_offset, &lo) || 2095 if (unlikely(!acpi_ec_read(fan_rpm_offset, &lo) ||
2096 !acpi_ec_read(fan_rpm_offset + 1, &hi))) 2096 !acpi_ec_read(fan_rpm_offset + 1, &hi)))
@@ -2140,7 +2140,7 @@ static void fan_watchdog_reset(void)
2140static int fan_set_level(int level) 2140static int fan_set_level(int level)
2141{ 2141{
2142 switch (fan_control_access_mode) { 2142 switch (fan_control_access_mode) {
2143 case IBMACPI_FAN_WR_ACPI_SFAN: 2143 case TPACPI_FAN_WR_ACPI_SFAN:
2144 if (level >= 0 && level <= 7) { 2144 if (level >= 0 && level <= 7) {
2145 if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", level)) 2145 if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", level))
2146 return -EIO; 2146 return -EIO;
@@ -2148,10 +2148,10 @@ static int fan_set_level(int level)
2148 return -EINVAL; 2148 return -EINVAL;
2149 break; 2149 break;
2150 2150
2151 case IBMACPI_FAN_WR_ACPI_FANS: 2151 case TPACPI_FAN_WR_ACPI_FANS:
2152 case IBMACPI_FAN_WR_TPEC: 2152 case TPACPI_FAN_WR_TPEC:
2153 if ((level != IBMACPI_FAN_EC_AUTO) && 2153 if ((level != TP_EC_FAN_AUTO) &&
2154 (level != IBMACPI_FAN_EC_DISENGAGED) && 2154 (level != TP_EC_FAN_FULLSPEED) &&
2155 ((level < 0) || (level > 7))) 2155 ((level < 0) || (level > 7)))
2156 return -EINVAL; 2156 return -EINVAL;
2157 2157
@@ -2173,14 +2173,14 @@ static int fan_set_enable(void)
2173 int rc; 2173 int rc;
2174 2174
2175 switch (fan_control_access_mode) { 2175 switch (fan_control_access_mode) {
2176 case IBMACPI_FAN_WR_ACPI_FANS: 2176 case TPACPI_FAN_WR_ACPI_FANS:
2177 case IBMACPI_FAN_WR_TPEC: 2177 case TPACPI_FAN_WR_TPEC:
2178 if ((rc = fan_get_status(&s)) < 0) 2178 if ((rc = fan_get_status(&s)) < 0)
2179 return rc; 2179 return rc;
2180 2180
2181 /* Don't go out of emergency fan mode */ 2181 /* Don't go out of emergency fan mode */
2182 if (s != 7) 2182 if (s != 7)
2183 s = IBMACPI_FAN_EC_AUTO; 2183 s = TP_EC_FAN_AUTO;
2184 2184
2185 if (!acpi_ec_write(fan_status_offset, s)) 2185 if (!acpi_ec_write(fan_status_offset, s))
2186 return -EIO; 2186 return -EIO;
@@ -2188,7 +2188,7 @@ static int fan_set_enable(void)
2188 fan_control_status_known = 1; 2188 fan_control_status_known = 1;
2189 break; 2189 break;
2190 2190
2191 case IBMACPI_FAN_WR_ACPI_SFAN: 2191 case TPACPI_FAN_WR_ACPI_SFAN:
2192 if ((rc = fan_get_status(&s)) < 0) 2192 if ((rc = fan_get_status(&s)) < 0)
2193 return rc; 2193 return rc;
2194 2194
@@ -2211,15 +2211,15 @@ static int fan_set_enable(void)
2211static int fan_set_disable(void) 2211static int fan_set_disable(void)
2212{ 2212{
2213 switch (fan_control_access_mode) { 2213 switch (fan_control_access_mode) {
2214 case IBMACPI_FAN_WR_ACPI_FANS: 2214 case TPACPI_FAN_WR_ACPI_FANS:
2215 case IBMACPI_FAN_WR_TPEC: 2215 case TPACPI_FAN_WR_TPEC:
2216 if (!acpi_ec_write(fan_status_offset, 0x00)) 2216 if (!acpi_ec_write(fan_status_offset, 0x00))
2217 return -EIO; 2217 return -EIO;
2218 else 2218 else
2219 fan_control_status_known = 1; 2219 fan_control_status_known = 1;
2220 break; 2220 break;
2221 2221
2222 case IBMACPI_FAN_WR_ACPI_SFAN: 2222 case TPACPI_FAN_WR_ACPI_SFAN:
2223 if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", 0x00)) 2223 if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", 0x00))
2224 return -EIO; 2224 return -EIO;
2225 break; 2225 break;
@@ -2233,7 +2233,7 @@ static int fan_set_disable(void)
2233static int fan_set_speed(int speed) 2233static int fan_set_speed(int speed)
2234{ 2234{
2235 switch (fan_control_access_mode) { 2235 switch (fan_control_access_mode) {
2236 case IBMACPI_FAN_WR_ACPI_FANS: 2236 case TPACPI_FAN_WR_ACPI_FANS:
2237 if (speed >= 0 && speed <= 65535) { 2237 if (speed >= 0 && speed <= 65535) {
2238 if (!acpi_evalf(fans_handle, NULL, NULL, "vddd", 2238 if (!acpi_evalf(fans_handle, NULL, NULL, "vddd",
2239 speed, speed, speed)) 2239 speed, speed, speed))
@@ -2256,7 +2256,7 @@ static int fan_read(char *p)
2256 unsigned int speed = 0; 2256 unsigned int speed = 0;
2257 2257
2258 switch (fan_status_access_mode) { 2258 switch (fan_status_access_mode) {
2259 case IBMACPI_FAN_RD_ACPI_GFAN: 2259 case TPACPI_FAN_RD_ACPI_GFAN:
2260 /* 570, 600e/x, 770e, 770x */ 2260 /* 570, 600e/x, 770e, 770x */
2261 if ((rc = fan_get_status(&status)) < 0) 2261 if ((rc = fan_get_status(&status)) < 0)
2262 return rc; 2262 return rc;
@@ -2266,7 +2266,7 @@ static int fan_read(char *p)
2266 (status != 0) ? "enabled" : "disabled", status); 2266 (status != 0) ? "enabled" : "disabled", status);
2267 break; 2267 break;
2268 2268
2269 case IBMACPI_FAN_RD_TPEC: 2269 case TPACPI_FAN_RD_TPEC:
2270 /* all except 570, 600e/x, 770e, 770x */ 2270 /* all except 570, 600e/x, 770e, 770x */
2271 if ((rc = fan_get_status(&status)) < 0) 2271 if ((rc = fan_get_status(&status)) < 0)
2272 return rc; 2272 return rc;
@@ -2277,7 +2277,7 @@ static int fan_read(char *p)
2277 else 2277 else
2278 /* Return most likely status. In fact, it 2278 /* Return most likely status. In fact, it
2279 * might be the only possible status */ 2279 * might be the only possible status */
2280 status = IBMACPI_FAN_EC_AUTO; 2280 status = TP_EC_FAN_AUTO;
2281 } 2281 }
2282 2282
2283 len += sprintf(p + len, "status:\t\t%s\n", 2283 len += sprintf(p + len, "status:\t\t%s\n",
@@ -2291,25 +2291,25 @@ static int fan_read(char *p)
2291 2291
2292 len += sprintf(p + len, "speed:\t\t%d\n", speed); 2292 len += sprintf(p + len, "speed:\t\t%d\n", speed);
2293 2293
2294 if (status & IBMACPI_FAN_EC_DISENGAGED) 2294 if (status & TP_EC_FAN_FULLSPEED)
2295 /* Disengaged mode takes precedence */ 2295 /* Disengaged mode takes precedence */
2296 len += sprintf(p + len, "level:\t\tdisengaged\n"); 2296 len += sprintf(p + len, "level:\t\tdisengaged\n");
2297 else if (status & IBMACPI_FAN_EC_AUTO) 2297 else if (status & TP_EC_FAN_AUTO)
2298 len += sprintf(p + len, "level:\t\tauto\n"); 2298 len += sprintf(p + len, "level:\t\tauto\n");
2299 else 2299 else
2300 len += sprintf(p + len, "level:\t\t%d\n", status); 2300 len += sprintf(p + len, "level:\t\t%d\n", status);
2301 break; 2301 break;
2302 2302
2303 case IBMACPI_FAN_NONE: 2303 case TPACPI_FAN_NONE:
2304 default: 2304 default:
2305 len += sprintf(p + len, "status:\t\tnot supported\n"); 2305 len += sprintf(p + len, "status:\t\tnot supported\n");
2306 } 2306 }
2307 2307
2308 if (fan_control_commands & IBMACPI_FAN_CMD_LEVEL) { 2308 if (fan_control_commands & TPACPI_FAN_CMD_LEVEL) {
2309 len += sprintf(p + len, "commands:\tlevel <level>"); 2309 len += sprintf(p + len, "commands:\tlevel <level>");
2310 2310
2311 switch (fan_control_access_mode) { 2311 switch (fan_control_access_mode) {
2312 case IBMACPI_FAN_WR_ACPI_SFAN: 2312 case TPACPI_FAN_WR_ACPI_SFAN:
2313 len += sprintf(p + len, " (<level> is 0-7)\n"); 2313 len += sprintf(p + len, " (<level> is 0-7)\n");
2314 break; 2314 break;
2315 2315
@@ -2320,12 +2320,12 @@ static int fan_read(char *p)
2320 } 2320 }
2321 } 2321 }
2322 2322
2323 if (fan_control_commands & IBMACPI_FAN_CMD_ENABLE) 2323 if (fan_control_commands & TPACPI_FAN_CMD_ENABLE)
2324 len += sprintf(p + len, "commands:\tenable, disable\n" 2324 len += sprintf(p + len, "commands:\tenable, disable\n"
2325 "commands:\twatchdog <timeout> (<timeout> is 0 (off), " 2325 "commands:\twatchdog <timeout> (<timeout> is 0 (off), "
2326 "1-120 (seconds))\n"); 2326 "1-120 (seconds))\n");
2327 2327
2328 if (fan_control_commands & IBMACPI_FAN_CMD_SPEED) 2328 if (fan_control_commands & TPACPI_FAN_CMD_SPEED)
2329 len += sprintf(p + len, "commands:\tspeed <speed>" 2329 len += sprintf(p + len, "commands:\tspeed <speed>"
2330 " (<speed> is 0-65535)\n"); 2330 " (<speed> is 0-65535)\n");
2331 2331
@@ -2337,9 +2337,9 @@ static int fan_write_cmd_level(const char *cmd, int *rc)
2337 int level; 2337 int level;
2338 2338
2339 if (strlencmp(cmd, "level auto") == 0) 2339 if (strlencmp(cmd, "level auto") == 0)
2340 level = IBMACPI_FAN_EC_AUTO; 2340 level = TP_EC_FAN_AUTO;
2341 else if (strlencmp(cmd, "level disengaged") == 0) 2341 else if (strlencmp(cmd, "level disengaged") == 0)
2342 level = IBMACPI_FAN_EC_DISENGAGED; 2342 level = TP_EC_FAN_FULLSPEED;
2343 else if (sscanf(cmd, "level %d", &level) != 1) 2343 else if (sscanf(cmd, "level %d", &level) != 1)
2344 return 0; 2344 return 0;
2345 2345
@@ -2412,13 +2412,13 @@ static int fan_write(char *buf)
2412 int rc = 0; 2412 int rc = 0;
2413 2413
2414 while (!rc && (cmd = next_cmd(&buf))) { 2414 while (!rc && (cmd = next_cmd(&buf))) {
2415 if (!((fan_control_commands & IBMACPI_FAN_CMD_LEVEL) && 2415 if (!((fan_control_commands & TPACPI_FAN_CMD_LEVEL) &&
2416 fan_write_cmd_level(cmd, &rc)) && 2416 fan_write_cmd_level(cmd, &rc)) &&
2417 !((fan_control_commands & IBMACPI_FAN_CMD_ENABLE) && 2417 !((fan_control_commands & TPACPI_FAN_CMD_ENABLE) &&
2418 (fan_write_cmd_enable(cmd, &rc) || 2418 (fan_write_cmd_enable(cmd, &rc) ||
2419 fan_write_cmd_disable(cmd, &rc) || 2419 fan_write_cmd_disable(cmd, &rc) ||
2420 fan_write_cmd_watchdog(cmd, &rc))) && 2420 fan_write_cmd_watchdog(cmd, &rc))) &&
2421 !((fan_control_commands & IBMACPI_FAN_CMD_SPEED) && 2421 !((fan_control_commands & TPACPI_FAN_CMD_SPEED) &&
2422 fan_write_cmd_speed(cmd, &rc)) 2422 fan_write_cmd_speed(cmd, &rc))
2423 ) 2423 )
2424 rc = -EINVAL; 2424 rc = -EINVAL;
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 8b2fd1a1a8a1..02a297e0525f 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -256,29 +256,27 @@ enum { /* Fan control constants */
256 fan_rpm_offset = 0x84, /* EC register 0x84: LSB, 0x85 MSB (RPM) 256 fan_rpm_offset = 0x84, /* EC register 0x84: LSB, 0x85 MSB (RPM)
257 * 0x84 must be read before 0x85 */ 257 * 0x84 must be read before 0x85 */
258 258
259 IBMACPI_FAN_EC_DISENGAGED = 0x40, /* EC mode: tachometer 259 TP_EC_FAN_FULLSPEED = 0x40, /* EC fan mode: full speed */
260 * disengaged */ 260 TP_EC_FAN_AUTO = 0x80, /* EC fan mode: auto fan control */
261 IBMACPI_FAN_EC_AUTO = 0x80, /* EC mode: auto fan
262 * control */
263}; 261};
264 262
265enum fan_status_access_mode { 263enum fan_status_access_mode {
266 IBMACPI_FAN_NONE = 0, /* No fan status or control */ 264 TPACPI_FAN_NONE = 0, /* No fan status or control */
267 IBMACPI_FAN_RD_ACPI_GFAN, /* Use ACPI GFAN */ 265 TPACPI_FAN_RD_ACPI_GFAN, /* Use ACPI GFAN */
268 IBMACPI_FAN_RD_TPEC, /* Use ACPI EC regs 0x2f, 0x84-0x85 */ 266 TPACPI_FAN_RD_TPEC, /* Use ACPI EC regs 0x2f, 0x84-0x85 */
269}; 267};
270 268
271enum fan_control_access_mode { 269enum fan_control_access_mode {
272 IBMACPI_FAN_WR_NONE = 0, /* No fan control */ 270 TPACPI_FAN_WR_NONE = 0, /* No fan control */
273 IBMACPI_FAN_WR_ACPI_SFAN, /* Use ACPI SFAN */ 271 TPACPI_FAN_WR_ACPI_SFAN, /* Use ACPI SFAN */
274 IBMACPI_FAN_WR_TPEC, /* Use ACPI EC reg 0x2f */ 272 TPACPI_FAN_WR_TPEC, /* Use ACPI EC reg 0x2f */
275 IBMACPI_FAN_WR_ACPI_FANS, /* Use ACPI FANS and EC reg 0x2f */ 273 TPACPI_FAN_WR_ACPI_FANS, /* Use ACPI FANS and EC reg 0x2f */
276}; 274};
277 275
278enum fan_control_commands { 276enum fan_control_commands {
279 IBMACPI_FAN_CMD_SPEED = 0x0001, /* speed command */ 277 TPACPI_FAN_CMD_SPEED = 0x0001, /* speed command */
280 IBMACPI_FAN_CMD_LEVEL = 0x0002, /* level command */ 278 TPACPI_FAN_CMD_LEVEL = 0x0002, /* level command */
281 IBMACPI_FAN_CMD_ENABLE = 0x0004, /* enable/disable cmd, 279 TPACPI_FAN_CMD_ENABLE = 0x0004, /* enable/disable cmd,
282 * and also watchdog cmd */ 280 * and also watchdog cmd */
283}; 281};
284 282
@@ -333,16 +331,16 @@ static int hotkey_write(char *buf);
333 */ 331 */
334 332
335enum led_access_mode { 333enum led_access_mode {
336 IBMACPI_LED_NONE = 0, 334 TPACPI_LED_NONE = 0,
337 IBMACPI_LED_570, /* 570 */ 335 TPACPI_LED_570, /* 570 */
338 IBMACPI_LED_OLD, /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20-21 */ 336 TPACPI_LED_OLD, /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20-21 */
339 IBMACPI_LED_NEW, /* all others */ 337 TPACPI_LED_NEW, /* all others */
340}; 338};
341 339
342enum { /* For IBMACPI_LED_OLD */ 340enum { /* For TPACPI_LED_OLD */
343 IBMACPI_LED_EC_HLCL = 0x0c, /* EC reg to get led to power on */ 341 TPACPI_LED_EC_HLCL = 0x0c, /* EC reg to get led to power on */
344 IBMACPI_LED_EC_HLBL = 0x0d, /* EC reg to blink a lit led */ 342 TPACPI_LED_EC_HLBL = 0x0d, /* EC reg to blink a lit led */
345 IBMACPI_LED_EC_HLMS = 0x0e, /* EC reg to select led to command */ 343 TPACPI_LED_EC_HLMS = 0x0e, /* EC reg to select led to command */
346}; 344};
347 345
348static enum led_access_mode led_supported; 346static enum led_access_mode led_supported;
@@ -370,16 +368,16 @@ static int light_write(char *buf);
370 */ 368 */
371 369
372enum thermal_access_mode { 370enum thermal_access_mode {
373 IBMACPI_THERMAL_NONE = 0, /* No thermal support */ 371 TPACPI_THERMAL_NONE = 0, /* No thermal support */
374 IBMACPI_THERMAL_ACPI_TMP07, /* Use ACPI TMP0-7 */ 372 TPACPI_THERMAL_ACPI_TMP07, /* Use ACPI TMP0-7 */
375 IBMACPI_THERMAL_ACPI_UPDT, /* Use ACPI TMP0-7 with UPDT */ 373 TPACPI_THERMAL_ACPI_UPDT, /* Use ACPI TMP0-7 with UPDT */
376 IBMACPI_THERMAL_TPEC_8, /* Use ACPI EC regs, 8 sensors */ 374 TPACPI_THERMAL_TPEC_8, /* Use ACPI EC regs, 8 sensors */
377 IBMACPI_THERMAL_TPEC_16, /* Use ACPI EC regs, 16 sensors */ 375 TPACPI_THERMAL_TPEC_16, /* Use ACPI EC regs, 16 sensors */
378}; 376};
379 377
380#define IBMACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */ 378#define TPACPI_MAX_THERMAL_SENSORS 16 /* Max thermal sensors supported */
381struct ibm_thermal_sensors_struct { 379struct ibm_thermal_sensors_struct {
382 s32 temp[IBMACPI_MAX_THERMAL_SENSORS]; 380 s32 temp[TPACPI_MAX_THERMAL_SENSORS];
383}; 381};
384 382
385static int thermal_init(void); 383static int thermal_init(void);
@@ -392,10 +390,10 @@ static int thermal_read(char *p);
392 */ 390 */
393 391
394enum video_access_mode { 392enum video_access_mode {
395 IBMACPI_VIDEO_NONE = 0, 393 TPACPI_VIDEO_NONE = 0,
396 IBMACPI_VIDEO_570, /* 570 */ 394 TPACPI_VIDEO_570, /* 570 */
397 IBMACPI_VIDEO_770, /* 600e/x, 770e, 770x */ 395 TPACPI_VIDEO_770, /* 600e/x, 770e, 770x */
398 IBMACPI_VIDEO_NEW, /* all others */ 396 TPACPI_VIDEO_NEW, /* all others */
399}; 397};
400 398
401static enum video_access_mode video_supported; 399static enum video_access_mode video_supported;