diff options
| author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2008-01-08 10:02:48 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2008-02-01 22:26:07 -0500 |
| commit | e0c7dfe70170ccee2b538494f92e61de8edab990 (patch) | |
| tree | 3459eedc57798a8a90368e4ed6a1960432a30797 /drivers/misc | |
| parent | f68080f86d8b43bf3ff4c309f1bc9aa4d3fdf735 (diff) | |
ACPI: thinkpad-acpi: rename IBM in defines
Rename defines with IBM in their name that are related to the older
driver name (ibm-acpi) to TPACPI, unless they are specific to IBM
ThinkPads.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/thinkpad_acpi.c | 324 |
1 files changed, 162 insertions, 162 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index be04f1c94d61..c92ae8d92b28 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * 02110-1301, USA. | 21 | * 02110-1301, USA. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | #define IBM_VERSION "0.18" | 24 | #define TPACPI_VERSION "0.18" |
| 25 | #define TPACPI_SYSFS_VERSION 0x020101 | 25 | #define TPACPI_SYSFS_VERSION 0x020101 |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| @@ -113,7 +113,7 @@ enum { | |||
| 113 | }; | 113 | }; |
| 114 | 114 | ||
| 115 | /* ACPI HIDs */ | 115 | /* ACPI HIDs */ |
| 116 | #define IBM_HKEY_HID "IBM0068" | 116 | #define TPACPI_ACPI_HKEY_HID "IBM0068" |
| 117 | 117 | ||
| 118 | /* Input IDs */ | 118 | /* Input IDs */ |
| 119 | #define TPACPI_HKEY_INPUT_PRODUCT 0x5054 /* "TP" */ | 119 | #define TPACPI_HKEY_INPUT_PRODUCT 0x5054 /* "TP" */ |
| @@ -124,25 +124,25 @@ enum { | |||
| 124 | * Main driver | 124 | * Main driver |
| 125 | */ | 125 | */ |
| 126 | 126 | ||
| 127 | #define IBM_NAME "thinkpad" | 127 | #define TPACPI_NAME "thinkpad" |
| 128 | #define IBM_DESC "ThinkPad ACPI Extras" | 128 | #define TPACPI_DESC "ThinkPad ACPI Extras" |
| 129 | #define IBM_FILE IBM_NAME "_acpi" | 129 | #define TPACPI_FILE TPACPI_NAME "_acpi" |
| 130 | #define IBM_URL "http://ibm-acpi.sf.net/" | 130 | #define TPACPI_URL "http://ibm-acpi.sf.net/" |
| 131 | #define IBM_MAIL "ibm-acpi-devel@lists.sourceforge.net" | 131 | #define TPACPI_MAIL "ibm-acpi-devel@lists.sourceforge.net" |
| 132 | 132 | ||
| 133 | #define IBM_PROC_DIR "ibm" | 133 | #define TPACPI_PROC_DIR "ibm" |
| 134 | #define IBM_ACPI_EVENT_PREFIX "ibm" | 134 | #define TPACPI_ACPI_EVENT_PREFIX "ibm" |
| 135 | #define IBM_DRVR_NAME IBM_FILE | 135 | #define TPACPI_DRVR_NAME TPACPI_FILE |
| 136 | #define IBM_HWMON_DRVR_NAME IBM_NAME "_hwmon" | 136 | #define TPACPI_HWMON_DRVR_NAME TPACPI_NAME "_hwmon" |
| 137 | 137 | ||
| 138 | #define IBM_MAX_ACPI_ARGS 3 | 138 | #define TPACPI_MAX_ACPI_ARGS 3 |
| 139 | 139 | ||
| 140 | /* Debugging */ | 140 | /* Debugging */ |
| 141 | #define IBM_LOG IBM_FILE ": " | 141 | #define TPACPI_LOG TPACPI_FILE ": " |
| 142 | #define IBM_ERR KERN_ERR IBM_LOG | 142 | #define TPACPI_ERR KERN_ERR TPACPI_LOG |
| 143 | #define IBM_NOTICE KERN_NOTICE IBM_LOG | 143 | #define TPACPI_NOTICE KERN_NOTICE TPACPI_LOG |
| 144 | #define IBM_INFO KERN_INFO IBM_LOG | 144 | #define TPACPI_INFO KERN_INFO TPACPI_LOG |
| 145 | #define IBM_DEBUG KERN_DEBUG IBM_LOG | 145 | #define TPACPI_DEBUG KERN_DEBUG TPACPI_LOG |
| 146 | 146 | ||
| 147 | #define TPACPI_DBG_ALL 0xffff | 147 | #define TPACPI_DBG_ALL 0xffff |
| 148 | #define TPACPI_DBG_ALL 0xffff | 148 | #define TPACPI_DBG_ALL 0xffff |
| @@ -150,7 +150,7 @@ enum { | |||
| 150 | #define TPACPI_DBG_EXIT 0x0002 | 150 | #define TPACPI_DBG_EXIT 0x0002 |
| 151 | #define dbg_printk(a_dbg_level, format, arg...) \ | 151 | #define dbg_printk(a_dbg_level, format, arg...) \ |
| 152 | do { if (dbg_level & a_dbg_level) \ | 152 | do { if (dbg_level & a_dbg_level) \ |
| 153 | printk(IBM_DEBUG "%s: " format, __func__ , ## arg); } while (0) | 153 | printk(TPACPI_DEBUG "%s: " format, __func__ , ## arg); } while (0) |
| 154 | #ifdef CONFIG_THINKPAD_ACPI_DEBUG | 154 | #ifdef CONFIG_THINKPAD_ACPI_DEBUG |
| 155 | #define vdbg_printk(a_dbg_level, format, arg...) \ | 155 | #define vdbg_printk(a_dbg_level, format, arg...) \ |
| 156 | dbg_printk(a_dbg_level, format, ## arg) | 156 | dbg_printk(a_dbg_level, format, ## arg) |
| @@ -270,13 +270,13 @@ static u32 dbg_level; | |||
| 270 | 270 | ||
| 271 | static acpi_handle root_handle; | 271 | static acpi_handle root_handle; |
| 272 | 272 | ||
| 273 | #define IBM_HANDLE(object, parent, paths...) \ | 273 | #define TPACPI_HANDLE(object, parent, paths...) \ |
| 274 | static acpi_handle object##_handle; \ | 274 | static acpi_handle object##_handle; \ |
| 275 | static acpi_handle *object##_parent = &parent##_handle; \ | 275 | static acpi_handle *object##_parent = &parent##_handle; \ |
| 276 | static char *object##_path; \ | 276 | static char *object##_path; \ |
| 277 | static char *object##_paths[] = { paths } | 277 | static char *object##_paths[] = { paths } |
| 278 | 278 | ||
| 279 | IBM_HANDLE(ec, root, "\\_SB.PCI0.ISA.EC0", /* 240, 240x */ | 279 | TPACPI_HANDLE(ec, root, "\\_SB.PCI0.ISA.EC0", /* 240, 240x */ |
| 280 | "\\_SB.PCI.ISA.EC", /* 570 */ | 280 | "\\_SB.PCI.ISA.EC", /* 570 */ |
| 281 | "\\_SB.PCI0.ISA0.EC0", /* 600e/x, 770e, 770x */ | 281 | "\\_SB.PCI0.ISA0.EC0", /* 600e/x, 770e, 770x */ |
| 282 | "\\_SB.PCI0.ISA.EC", /* A21e, A2xm/p, T20-22, X20-21 */ | 282 | "\\_SB.PCI0.ISA.EC", /* A21e, A2xm/p, T20-22, X20-21 */ |
| @@ -285,15 +285,15 @@ IBM_HANDLE(ec, root, "\\_SB.PCI0.ISA.EC0", /* 240, 240x */ | |||
| 285 | "\\_SB.PCI0.LPC.EC", /* all others */ | 285 | "\\_SB.PCI0.LPC.EC", /* all others */ |
| 286 | ); | 286 | ); |
| 287 | 287 | ||
| 288 | IBM_HANDLE(ecrd, ec, "ECRD"); /* 570 */ | 288 | TPACPI_HANDLE(ecrd, ec, "ECRD"); /* 570 */ |
| 289 | IBM_HANDLE(ecwr, ec, "ECWR"); /* 570 */ | 289 | TPACPI_HANDLE(ecwr, ec, "ECWR"); /* 570 */ |
| 290 | 290 | ||
| 291 | IBM_HANDLE(cmos, root, "\\UCMS", /* R50, R50e, R50p, R51, T4x, X31, X40 */ | 291 | TPACPI_HANDLE(cmos, root, "\\UCMS", /* R50, R50e, R50p, R51, T4x, X31, X40 */ |
| 292 | "\\CMOS", /* A3x, G4x, R32, T23, T30, X22-24, X30 */ | 292 | "\\CMOS", /* A3x, G4x, R32, T23, T30, X22-24, X30 */ |
| 293 | "\\CMS", /* R40, R40e */ | 293 | "\\CMS", /* R40, R40e */ |
| 294 | ); /* all others */ | 294 | ); /* all others */ |
| 295 | 295 | ||
| 296 | IBM_HANDLE(hkey, ec, "\\_SB.HKEY", /* 600e/x, 770e, 770x */ | 296 | TPACPI_HANDLE(hkey, ec, "\\_SB.HKEY", /* 600e/x, 770e, 770x */ |
| 297 | "^HKEY", /* R30, R31 */ | 297 | "^HKEY", /* R30, R31 */ |
| 298 | "HKEY", /* all others */ | 298 | "HKEY", /* all others */ |
| 299 | ); /* 570 */ | 299 | ); /* 570 */ |
| @@ -308,7 +308,7 @@ static int acpi_evalf(acpi_handle handle, | |||
| 308 | { | 308 | { |
| 309 | char *fmt0 = fmt; | 309 | char *fmt0 = fmt; |
| 310 | struct acpi_object_list params; | 310 | struct acpi_object_list params; |
| 311 | union acpi_object in_objs[IBM_MAX_ACPI_ARGS]; | 311 | union acpi_object in_objs[TPACPI_MAX_ACPI_ARGS]; |
| 312 | struct acpi_buffer result, *resultp; | 312 | struct acpi_buffer result, *resultp; |
| 313 | union acpi_object out_obj; | 313 | union acpi_object out_obj; |
| 314 | acpi_status status; | 314 | acpi_status status; |
| @@ -318,7 +318,7 @@ static int acpi_evalf(acpi_handle handle, | |||
| 318 | int quiet; | 318 | int quiet; |
| 319 | 319 | ||
| 320 | if (!*fmt) { | 320 | if (!*fmt) { |
| 321 | printk(IBM_ERR "acpi_evalf() called with empty format\n"); | 321 | printk(TPACPI_ERR "acpi_evalf() called with empty format\n"); |
| 322 | return 0; | 322 | return 0; |
| 323 | } | 323 | } |
| 324 | 324 | ||
| @@ -343,7 +343,7 @@ static int acpi_evalf(acpi_handle handle, | |||
| 343 | break; | 343 | break; |
| 344 | /* add more types as needed */ | 344 | /* add more types as needed */ |
| 345 | default: | 345 | default: |
| 346 | printk(IBM_ERR "acpi_evalf() called " | 346 | printk(TPACPI_ERR "acpi_evalf() called " |
| 347 | "with invalid format character '%c'\n", c); | 347 | "with invalid format character '%c'\n", c); |
| 348 | return 0; | 348 | return 0; |
| 349 | } | 349 | } |
| @@ -370,13 +370,13 @@ static int acpi_evalf(acpi_handle handle, | |||
| 370 | break; | 370 | break; |
| 371 | /* add more types as needed */ | 371 | /* add more types as needed */ |
| 372 | default: | 372 | default: |
| 373 | printk(IBM_ERR "acpi_evalf() called " | 373 | printk(TPACPI_ERR "acpi_evalf() called " |
| 374 | "with invalid format character '%c'\n", res_type); | 374 | "with invalid format character '%c'\n", res_type); |
| 375 | return 0; | 375 | return 0; |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | if (!success && !quiet) | 378 | if (!success && !quiet) |
| 379 | printk(IBM_ERR "acpi_evalf(%s, %s, ...) failed: %d\n", | 379 | printk(TPACPI_ERR "acpi_evalf(%s, %s, ...) failed: %d\n", |
| 380 | method, fmt0, status); | 380 | method, fmt0, status); |
| 381 | 381 | ||
| 382 | return success; | 382 | return success; |
| @@ -436,7 +436,7 @@ static int issue_thinkpad_cmos_command(int cmos_cmd) | |||
| 436 | * ACPI device model | 436 | * ACPI device model |
| 437 | */ | 437 | */ |
| 438 | 438 | ||
| 439 | #define IBM_ACPIHANDLE_INIT(object) \ | 439 | #define TPACPI_ACPIHANDLE_INIT(object) \ |
| 440 | drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \ | 440 | drv_acpi_handle_init(#object, &object##_handle, *object##_parent, \ |
| 441 | object##_paths, ARRAY_SIZE(object##_paths), &object##_path) | 441 | object##_paths, ARRAY_SIZE(object##_paths), &object##_path) |
| 442 | 442 | ||
| @@ -494,24 +494,24 @@ static int __init setup_acpi_notify(struct ibm_struct *ibm) | |||
| 494 | 494 | ||
| 495 | rc = acpi_bus_get_device(*ibm->acpi->handle, &ibm->acpi->device); | 495 | rc = acpi_bus_get_device(*ibm->acpi->handle, &ibm->acpi->device); |
| 496 | if (rc < 0) { | 496 | if (rc < 0) { |
| 497 | printk(IBM_ERR "acpi_bus_get_device(%s) failed: %d\n", | 497 | printk(TPACPI_ERR "acpi_bus_get_device(%s) failed: %d\n", |
| 498 | ibm->name, rc); | 498 | ibm->name, rc); |
| 499 | return -ENODEV; | 499 | return -ENODEV; |
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | acpi_driver_data(ibm->acpi->device) = ibm; | 502 | acpi_driver_data(ibm->acpi->device) = ibm; |
| 503 | sprintf(acpi_device_class(ibm->acpi->device), "%s/%s", | 503 | sprintf(acpi_device_class(ibm->acpi->device), "%s/%s", |
| 504 | IBM_ACPI_EVENT_PREFIX, | 504 | TPACPI_ACPI_EVENT_PREFIX, |
| 505 | ibm->name); | 505 | ibm->name); |
| 506 | 506 | ||
| 507 | status = acpi_install_notify_handler(*ibm->acpi->handle, | 507 | status = acpi_install_notify_handler(*ibm->acpi->handle, |
| 508 | ibm->acpi->type, dispatch_acpi_notify, ibm); | 508 | ibm->acpi->type, dispatch_acpi_notify, ibm); |
| 509 | if (ACPI_FAILURE(status)) { | 509 | if (ACPI_FAILURE(status)) { |
| 510 | if (status == AE_ALREADY_EXISTS) { | 510 | if (status == AE_ALREADY_EXISTS) { |
| 511 | printk(IBM_NOTICE "another device driver is already handling %s events\n", | 511 | printk(TPACPI_NOTICE "another device driver is already handling %s events\n", |
| 512 | ibm->name); | 512 | ibm->name); |
| 513 | } else { | 513 | } else { |
| 514 | printk(IBM_ERR "acpi_install_notify_handler(%s) failed: %d\n", | 514 | printk(TPACPI_ERR "acpi_install_notify_handler(%s) failed: %d\n", |
| 515 | ibm->name, status); | 515 | ibm->name, status); |
| 516 | } | 516 | } |
| 517 | return -ENODEV; | 517 | return -ENODEV; |
| @@ -536,18 +536,18 @@ static int __init register_tpacpi_subdriver(struct ibm_struct *ibm) | |||
| 536 | 536 | ||
| 537 | ibm->acpi->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL); | 537 | ibm->acpi->driver = kzalloc(sizeof(struct acpi_driver), GFP_KERNEL); |
| 538 | if (!ibm->acpi->driver) { | 538 | if (!ibm->acpi->driver) { |
| 539 | printk(IBM_ERR "kzalloc(ibm->driver) failed\n"); | 539 | printk(TPACPI_ERR "kzalloc(ibm->driver) failed\n"); |
| 540 | return -ENOMEM; | 540 | return -ENOMEM; |
| 541 | } | 541 | } |
| 542 | 542 | ||
| 543 | sprintf(ibm->acpi->driver->name, "%s_%s", IBM_NAME, ibm->name); | 543 | sprintf(ibm->acpi->driver->name, "%s_%s", TPACPI_NAME, ibm->name); |
| 544 | ibm->acpi->driver->ids = ibm->acpi->hid; | 544 | ibm->acpi->driver->ids = ibm->acpi->hid; |
| 545 | 545 | ||
| 546 | ibm->acpi->driver->ops.add = &tpacpi_device_add; | 546 | ibm->acpi->driver->ops.add = &tpacpi_device_add; |
| 547 | 547 | ||
| 548 | rc = acpi_bus_register_driver(ibm->acpi->driver); | 548 | rc = acpi_bus_register_driver(ibm->acpi->driver); |
| 549 | if (rc < 0) { | 549 | if (rc < 0) { |
| 550 | printk(IBM_ERR "acpi_bus_register_driver(%s) failed: %d\n", | 550 | printk(TPACPI_ERR "acpi_bus_register_driver(%s) failed: %d\n", |
| 551 | ibm->name, rc); | 551 | ibm->name, rc); |
| 552 | kfree(ibm->acpi->driver); | 552 | kfree(ibm->acpi->driver); |
| 553 | ibm->acpi->driver = NULL; | 553 | ibm->acpi->driver = NULL; |
| @@ -670,7 +670,7 @@ static int tpacpi_resume_handler(struct platform_device *pdev) | |||
| 670 | 670 | ||
| 671 | static struct platform_driver tpacpi_pdriver = { | 671 | static struct platform_driver tpacpi_pdriver = { |
| 672 | .driver = { | 672 | .driver = { |
| 673 | .name = IBM_DRVR_NAME, | 673 | .name = TPACPI_DRVR_NAME, |
| 674 | .owner = THIS_MODULE, | 674 | .owner = THIS_MODULE, |
| 675 | }, | 675 | }, |
| 676 | .resume = tpacpi_resume_handler, | 676 | .resume = tpacpi_resume_handler, |
| @@ -678,7 +678,7 @@ static struct platform_driver tpacpi_pdriver = { | |||
| 678 | 678 | ||
| 679 | static struct platform_driver tpacpi_hwmon_pdriver = { | 679 | static struct platform_driver tpacpi_hwmon_pdriver = { |
| 680 | .driver = { | 680 | .driver = { |
| 681 | .name = IBM_HWMON_DRVR_NAME, | 681 | .name = TPACPI_HWMON_DRVR_NAME, |
| 682 | .owner = THIS_MODULE, | 682 | .owner = THIS_MODULE, |
| 683 | }, | 683 | }, |
| 684 | }; | 684 | }; |
| @@ -818,7 +818,7 @@ static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, | |||
| 818 | static ssize_t tpacpi_driver_version_show(struct device_driver *drv, | 818 | static ssize_t tpacpi_driver_version_show(struct device_driver *drv, |
| 819 | char *buf) | 819 | char *buf) |
| 820 | { | 820 | { |
| 821 | return snprintf(buf, PAGE_SIZE, "%s v%s\n", IBM_DESC, IBM_VERSION); | 821 | return snprintf(buf, PAGE_SIZE, "%s v%s\n", TPACPI_DESC, TPACPI_VERSION); |
| 822 | } | 822 | } |
| 823 | 823 | ||
| 824 | static DRIVER_ATTR(version, S_IRUGO, | 824 | static DRIVER_ATTR(version, S_IRUGO, |
| @@ -867,17 +867,17 @@ static void tpacpi_remove_driver_attributes(struct device_driver *drv) | |||
| 867 | 867 | ||
| 868 | static int __init thinkpad_acpi_driver_init(struct ibm_init_struct *iibm) | 868 | static int __init thinkpad_acpi_driver_init(struct ibm_init_struct *iibm) |
| 869 | { | 869 | { |
| 870 | printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION); | 870 | printk(TPACPI_INFO "%s v%s\n", TPACPI_DESC, TPACPI_VERSION); |
| 871 | printk(IBM_INFO "%s\n", IBM_URL); | 871 | printk(TPACPI_INFO "%s\n", TPACPI_URL); |
| 872 | 872 | ||
| 873 | printk(IBM_INFO "ThinkPad BIOS %s, EC %s\n", | 873 | printk(TPACPI_INFO "ThinkPad BIOS %s, EC %s\n", |
| 874 | (thinkpad_id.bios_version_str) ? | 874 | (thinkpad_id.bios_version_str) ? |
| 875 | thinkpad_id.bios_version_str : "unknown", | 875 | thinkpad_id.bios_version_str : "unknown", |
| 876 | (thinkpad_id.ec_version_str) ? | 876 | (thinkpad_id.ec_version_str) ? |
| 877 | thinkpad_id.ec_version_str : "unknown"); | 877 | thinkpad_id.ec_version_str : "unknown"); |
| 878 | 878 | ||
| 879 | if (thinkpad_id.vendor && thinkpad_id.model_str) | 879 | if (thinkpad_id.vendor && thinkpad_id.model_str) |
| 880 | printk(IBM_INFO "%s %s\n", | 880 | printk(TPACPI_INFO "%s %s\n", |
| 881 | (thinkpad_id.vendor == PCI_VENDOR_ID_IBM) ? | 881 | (thinkpad_id.vendor == PCI_VENDOR_ID_IBM) ? |
| 882 | "IBM" : ((thinkpad_id.vendor == | 882 | "IBM" : ((thinkpad_id.vendor == |
| 883 | PCI_VENDOR_ID_LENOVO) ? | 883 | PCI_VENDOR_ID_LENOVO) ? |
| @@ -891,8 +891,8 @@ static int thinkpad_acpi_driver_read(char *p) | |||
| 891 | { | 891 | { |
| 892 | int len = 0; | 892 | int len = 0; |
| 893 | 893 | ||
| 894 | len += sprintf(p + len, "driver:\t\t%s\n", IBM_DESC); | 894 | len += sprintf(p + len, "driver:\t\t%s\n", TPACPI_DESC); |
| 895 | len += sprintf(p + len, "version:\t%s\n", IBM_VERSION); | 895 | len += sprintf(p + len, "version:\t%s\n", TPACPI_VERSION); |
| 896 | 896 | ||
| 897 | return len; | 897 | return len; |
| 898 | } | 898 | } |
| @@ -1073,7 +1073,7 @@ static int hotkey_mask_set(u32 mask) | |||
| 1073 | if (!hotkey_mask_get() && !rc && | 1073 | if (!hotkey_mask_get() && !rc && |
| 1074 | (hotkey_mask & ~hotkey_source_mask) != | 1074 | (hotkey_mask & ~hotkey_source_mask) != |
| 1075 | (mask & ~hotkey_source_mask)) { | 1075 | (mask & ~hotkey_source_mask)) { |
| 1076 | printk(IBM_NOTICE | 1076 | printk(TPACPI_NOTICE |
| 1077 | "requested hot key mask 0x%08x, but " | 1077 | "requested hot key mask 0x%08x, but " |
| 1078 | "firmware forced it to 0x%08x\n", | 1078 | "firmware forced it to 0x%08x\n", |
| 1079 | mask, hotkey_mask); | 1079 | mask, hotkey_mask); |
| @@ -1085,7 +1085,7 @@ static int hotkey_mask_set(u32 mask) | |||
| 1085 | HOTKEY_CONFIG_CRITICAL_END | 1085 | HOTKEY_CONFIG_CRITICAL_END |
| 1086 | hotkey_mask_get(); | 1086 | hotkey_mask_get(); |
| 1087 | if (hotkey_mask != mask) { | 1087 | if (hotkey_mask != mask) { |
| 1088 | printk(IBM_NOTICE | 1088 | printk(TPACPI_NOTICE |
| 1089 | "requested hot key mask 0x%08x, " | 1089 | "requested hot key mask 0x%08x, " |
| 1090 | "forced to 0x%08x (NVRAM poll mask is " | 1090 | "forced to 0x%08x (NVRAM poll mask is " |
| 1091 | "0x%08x): no firmware mask support\n", | 1091 | "0x%08x): no firmware mask support\n", |
| @@ -1352,10 +1352,10 @@ static void hotkey_poll_setup(int may_warn) | |||
| 1352 | (tpacpi_inputdev->users > 0 || hotkey_report_mode < 2)) { | 1352 | (tpacpi_inputdev->users > 0 || hotkey_report_mode < 2)) { |
| 1353 | if (!tpacpi_hotkey_task) { | 1353 | if (!tpacpi_hotkey_task) { |
| 1354 | tpacpi_hotkey_task = kthread_run(hotkey_kthread, | 1354 | tpacpi_hotkey_task = kthread_run(hotkey_kthread, |
| 1355 | NULL, IBM_FILE "d"); | 1355 | NULL, TPACPI_FILE "d"); |
| 1356 | if (IS_ERR(tpacpi_hotkey_task)) { | 1356 | if (IS_ERR(tpacpi_hotkey_task)) { |
| 1357 | tpacpi_hotkey_task = NULL; | 1357 | tpacpi_hotkey_task = NULL; |
| 1358 | printk(IBM_ERR "could not create kernel thread " | 1358 | printk(TPACPI_ERR "could not create kernel thread " |
| 1359 | "for hotkey polling\n"); | 1359 | "for hotkey polling\n"); |
| 1360 | } | 1360 | } |
| 1361 | } | 1361 | } |
| @@ -1363,7 +1363,7 @@ static void hotkey_poll_setup(int may_warn) | |||
| 1363 | hotkey_poll_stop_sync(); | 1363 | hotkey_poll_stop_sync(); |
| 1364 | if (may_warn && | 1364 | if (may_warn && |
| 1365 | hotkey_source_mask != 0 && hotkey_poll_freq == 0) { | 1365 | hotkey_source_mask != 0 && hotkey_poll_freq == 0) { |
| 1366 | printk(IBM_NOTICE "hot keys 0x%08x require polling, " | 1366 | printk(TPACPI_NOTICE "hot keys 0x%08x require polling, " |
| 1367 | "which is currently disabled\n", | 1367 | "which is currently disabled\n", |
| 1368 | hotkey_source_mask); | 1368 | hotkey_source_mask); |
| 1369 | } | 1369 | } |
| @@ -1777,7 +1777,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
| 1777 | BUG_ON(tpacpi_inputdev->open != NULL || | 1777 | BUG_ON(tpacpi_inputdev->open != NULL || |
| 1778 | tpacpi_inputdev->close != NULL); | 1778 | tpacpi_inputdev->close != NULL); |
| 1779 | 1779 | ||
| 1780 | IBM_ACPIHANDLE_INIT(hkey); | 1780 | TPACPI_ACPIHANDLE_INIT(hkey); |
| 1781 | mutex_init(&hotkey_mutex); | 1781 | mutex_init(&hotkey_mutex); |
| 1782 | 1782 | ||
| 1783 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | 1783 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL |
| @@ -1806,10 +1806,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
| 1806 | for HKEY interface version 0x100 */ | 1806 | for HKEY interface version 0x100 */ |
| 1807 | if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) { | 1807 | if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) { |
| 1808 | if ((hkeyv >> 8) != 1) { | 1808 | if ((hkeyv >> 8) != 1) { |
| 1809 | printk(IBM_ERR "unknown version of the " | 1809 | printk(TPACPI_ERR "unknown version of the " |
| 1810 | "HKEY interface: 0x%x\n", hkeyv); | 1810 | "HKEY interface: 0x%x\n", hkeyv); |
| 1811 | printk(IBM_ERR "please report this to %s\n", | 1811 | printk(TPACPI_ERR "please report this to %s\n", |
| 1812 | IBM_MAIL); | 1812 | TPACPI_MAIL); |
| 1813 | } else { | 1813 | } else { |
| 1814 | /* | 1814 | /* |
| 1815 | * MHKV 0x100 in A31, R40, R40e, | 1815 | * MHKV 0x100 in A31, R40, R40e, |
| @@ -1825,10 +1825,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
| 1825 | if (tp_features.hotkey_mask) { | 1825 | if (tp_features.hotkey_mask) { |
| 1826 | if (!acpi_evalf(hkey_handle, &hotkey_all_mask, | 1826 | if (!acpi_evalf(hkey_handle, &hotkey_all_mask, |
| 1827 | "MHKA", "qd")) { | 1827 | "MHKA", "qd")) { |
| 1828 | printk(IBM_ERR | 1828 | printk(TPACPI_ERR |
| 1829 | "missing MHKA handler, " | 1829 | "missing MHKA handler, " |
| 1830 | "please report this to %s\n", | 1830 | "please report this to %s\n", |
| 1831 | IBM_MAIL); | 1831 | TPACPI_MAIL); |
| 1832 | hotkey_all_mask = 0x080cU; /* FN+F12, FN+F4, FN+F3 */ | 1832 | hotkey_all_mask = 0x080cU; /* FN+F12, FN+F4, FN+F3 */ |
| 1833 | } | 1833 | } |
| 1834 | } | 1834 | } |
| @@ -1863,7 +1863,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
| 1863 | /* Not all thinkpads have a hardware radio switch */ | 1863 | /* Not all thinkpads have a hardware radio switch */ |
| 1864 | if (!res && acpi_evalf(hkey_handle, &status, "WLSW", "qd")) { | 1864 | if (!res && acpi_evalf(hkey_handle, &status, "WLSW", "qd")) { |
| 1865 | tp_features.hotkey_wlsw = 1; | 1865 | tp_features.hotkey_wlsw = 1; |
| 1866 | printk(IBM_INFO | 1866 | printk(TPACPI_INFO |
| 1867 | "radio switch found; radios are %s\n", | 1867 | "radio switch found; radios are %s\n", |
| 1868 | enabled(status, 0)); | 1868 | enabled(status, 0)); |
| 1869 | res = add_to_attr_set(hotkey_dev_attributes, | 1869 | res = add_to_attr_set(hotkey_dev_attributes, |
| @@ -1882,7 +1882,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
| 1882 | hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE, | 1882 | hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE, |
| 1883 | GFP_KERNEL); | 1883 | GFP_KERNEL); |
| 1884 | if (!hotkey_keycode_map) { | 1884 | if (!hotkey_keycode_map) { |
| 1885 | printk(IBM_ERR "failed to allocate memory for key map\n"); | 1885 | printk(TPACPI_ERR "failed to allocate memory for key map\n"); |
| 1886 | return -ENOMEM; | 1886 | return -ENOMEM; |
| 1887 | } | 1887 | } |
| 1888 | 1888 | ||
| @@ -1957,7 +1957,7 @@ static void hotkey_exit(void) | |||
| 1957 | /* no short-circuit boolean operator below! */ | 1957 | /* no short-circuit boolean operator below! */ |
| 1958 | if ((hotkey_mask_set(hotkey_orig_mask) | | 1958 | if ((hotkey_mask_set(hotkey_orig_mask) | |
| 1959 | hotkey_status_set(hotkey_orig_status)) != 0) | 1959 | hotkey_status_set(hotkey_orig_status)) != 0) |
| 1960 | printk(IBM_ERR "failed to restore hot key mask to BIOS defaults\n"); | 1960 | printk(TPACPI_ERR "failed to restore hot key mask to BIOS defaults\n"); |
| 1961 | } | 1961 | } |
| 1962 | 1962 | ||
| 1963 | if (hotkey_dev_attributes) { | 1963 | if (hotkey_dev_attributes) { |
| @@ -1974,7 +1974,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
| 1974 | int ignore_acpi_ev; | 1974 | int ignore_acpi_ev; |
| 1975 | 1975 | ||
| 1976 | if (event != 0x80) { | 1976 | if (event != 0x80) { |
| 1977 | printk(IBM_ERR "unknown HKEY notification event %d\n", event); | 1977 | printk(TPACPI_ERR "unknown HKEY notification event %d\n", event); |
| 1978 | /* forward it to userspace, maybe it knows how to handle it */ | 1978 | /* forward it to userspace, maybe it knows how to handle it */ |
| 1979 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, | 1979 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, |
| 1980 | ibm->acpi->device->dev.bus_id, | 1980 | ibm->acpi->device->dev.bus_id, |
| @@ -1984,7 +1984,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
| 1984 | 1984 | ||
| 1985 | while (1) { | 1985 | while (1) { |
| 1986 | if (!acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { | 1986 | if (!acpi_evalf(hkey_handle, &hkey, "MHKP", "d")) { |
| 1987 | printk(IBM_ERR "failed to retrieve HKEY event\n"); | 1987 | printk(TPACPI_ERR "failed to retrieve HKEY event\n"); |
| 1988 | return; | 1988 | return; |
| 1989 | } | 1989 | } |
| 1990 | 1990 | ||
| @@ -2008,7 +2008,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
| 2008 | ignore_acpi_ev = 1; | 2008 | ignore_acpi_ev = 1; |
| 2009 | } | 2009 | } |
| 2010 | } else { | 2010 | } else { |
| 2011 | printk(IBM_ERR | 2011 | printk(TPACPI_ERR |
| 2012 | "hotkey 0x%04x out of range for keyboard map\n", | 2012 | "hotkey 0x%04x out of range for keyboard map\n", |
| 2013 | hkey); | 2013 | hkey); |
| 2014 | send_acpi_ev = 1; | 2014 | send_acpi_ev = 1; |
| @@ -2019,7 +2019,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
| 2019 | /* we don't handle it through this path, just | 2019 | /* we don't handle it through this path, just |
| 2020 | * eat up known LID events */ | 2020 | * eat up known LID events */ |
| 2021 | if (hkey != 0x5001 && hkey != 0x5002) { | 2021 | if (hkey != 0x5001 && hkey != 0x5002) { |
| 2022 | printk(IBM_ERR | 2022 | printk(TPACPI_ERR |
| 2023 | "unknown LID-related HKEY event: 0x%04x\n", | 2023 | "unknown LID-related HKEY event: 0x%04x\n", |
| 2024 | hkey); | 2024 | hkey); |
| 2025 | send_acpi_ev = 1; | 2025 | send_acpi_ev = 1; |
| @@ -2039,7 +2039,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
| 2039 | /* 0x2305 - T43 waking up due to bay lever eject while aslept */ | 2039 | /* 0x2305 - T43 waking up due to bay lever eject while aslept */ |
| 2040 | /* case 3: ultra-bay related. maybe bay in dock? */ | 2040 | /* case 3: ultra-bay related. maybe bay in dock? */ |
| 2041 | /* 0x3003 - T43 after wake up by bay lever eject (0x2305) */ | 2041 | /* 0x3003 - T43 after wake up by bay lever eject (0x2305) */ |
| 2042 | printk(IBM_NOTICE "unhandled HKEY event 0x%04x\n", hkey); | 2042 | printk(TPACPI_NOTICE "unhandled HKEY event 0x%04x\n", hkey); |
| 2043 | send_acpi_ev = 1; | 2043 | send_acpi_ev = 1; |
| 2044 | } | 2044 | } |
| 2045 | 2045 | ||
| @@ -2060,7 +2060,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
| 2060 | static void hotkey_resume(void) | 2060 | static void hotkey_resume(void) |
| 2061 | { | 2061 | { |
| 2062 | if (hotkey_mask_get()) | 2062 | if (hotkey_mask_get()) |
| 2063 | printk(IBM_ERR "error while trying to read hot key mask from firmware\n"); | 2063 | printk(TPACPI_ERR "error while trying to read hot key mask from firmware\n"); |
| 2064 | tpacpi_input_send_radiosw(); | 2064 | tpacpi_input_send_radiosw(); |
| 2065 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | 2065 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL |
| 2066 | hotkey_poll_setup_safe(0); | 2066 | hotkey_poll_setup_safe(0); |
| @@ -2145,7 +2145,7 @@ errexit: | |||
| 2145 | } | 2145 | } |
| 2146 | 2146 | ||
| 2147 | static const struct acpi_device_id ibm_htk_device_ids[] = { | 2147 | static const struct acpi_device_id ibm_htk_device_ids[] = { |
| 2148 | {IBM_HKEY_HID, 0}, | 2148 | {TPACPI_ACPI_HKEY_HID, 0}, |
| 2149 | {"", 0}, | 2149 | {"", 0}, |
| 2150 | }; | 2150 | }; |
| 2151 | 2151 | ||
| @@ -2230,7 +2230,7 @@ static int __init bluetooth_init(struct ibm_init_struct *iibm) | |||
| 2230 | 2230 | ||
| 2231 | vdbg_printk(TPACPI_DBG_INIT, "initializing bluetooth subdriver\n"); | 2231 | vdbg_printk(TPACPI_DBG_INIT, "initializing bluetooth subdriver\n"); |
| 2232 | 2232 | ||
| 2233 | IBM_ACPIHANDLE_INIT(hkey); | 2233 | TPACPI_ACPIHANDLE_INIT(hkey); |
| 2234 | 2234 | ||
| 2235 | /* bluetooth not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, | 2235 | /* bluetooth not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, |
| 2236 | G4x, R30, R31, R40e, R50e, T20-22, X20-21 */ | 2236 | G4x, R30, R31, R40e, R50e, T20-22, X20-21 */ |
| @@ -2404,7 +2404,7 @@ static int __init wan_init(struct ibm_init_struct *iibm) | |||
| 2404 | 2404 | ||
| 2405 | vdbg_printk(TPACPI_DBG_INIT, "initializing wan subdriver\n"); | 2405 | vdbg_printk(TPACPI_DBG_INIT, "initializing wan subdriver\n"); |
| 2406 | 2406 | ||
| 2407 | IBM_ACPIHANDLE_INIT(hkey); | 2407 | TPACPI_ACPIHANDLE_INIT(hkey); |
| 2408 | 2408 | ||
| 2409 | tp_features.wan = hkey_handle && | 2409 | tp_features.wan = hkey_handle && |
| 2410 | acpi_evalf(hkey_handle, &status, "GWAN", "qd"); | 2410 | acpi_evalf(hkey_handle, &status, "GWAN", "qd"); |
| @@ -2543,14 +2543,14 @@ static int video_orig_autosw; | |||
| 2543 | static int video_autosw_get(void); | 2543 | static int video_autosw_get(void); |
| 2544 | static int video_autosw_set(int enable); | 2544 | static int video_autosw_set(int enable); |
| 2545 | 2545 | ||
| 2546 | IBM_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */ | 2546 | TPACPI_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */ |
| 2547 | "\\_SB.PCI0.AGP0.VID0", /* 600e/x, 770x */ | 2547 | "\\_SB.PCI0.AGP0.VID0", /* 600e/x, 770x */ |
| 2548 | "\\_SB.PCI0.VID0", /* 770e */ | 2548 | "\\_SB.PCI0.VID0", /* 770e */ |
| 2549 | "\\_SB.PCI0.VID", /* A21e, G4x, R50e, X30, X40 */ | 2549 | "\\_SB.PCI0.VID", /* A21e, G4x, R50e, X30, X40 */ |
| 2550 | "\\_SB.PCI0.AGP.VID", /* all others */ | 2550 | "\\_SB.PCI0.AGP.VID", /* all others */ |
| 2551 | ); /* R30, R31 */ | 2551 | ); /* R30, R31 */ |
| 2552 | 2552 | ||
| 2553 | IBM_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */ | 2553 | TPACPI_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */ |
| 2554 | 2554 | ||
| 2555 | static int __init video_init(struct ibm_init_struct *iibm) | 2555 | static int __init video_init(struct ibm_init_struct *iibm) |
| 2556 | { | 2556 | { |
| @@ -2558,8 +2558,8 @@ static int __init video_init(struct ibm_init_struct *iibm) | |||
| 2558 | 2558 | ||
| 2559 | vdbg_printk(TPACPI_DBG_INIT, "initializing video subdriver\n"); | 2559 | vdbg_printk(TPACPI_DBG_INIT, "initializing video subdriver\n"); |
| 2560 | 2560 | ||
| 2561 | IBM_ACPIHANDLE_INIT(vid); | 2561 | TPACPI_ACPIHANDLE_INIT(vid); |
| 2562 | IBM_ACPIHANDLE_INIT(vid2); | 2562 | TPACPI_ACPIHANDLE_INIT(vid2); |
| 2563 | 2563 | ||
| 2564 | if (vid2_handle && acpi_evalf(NULL, &ivga, "\\IVGA", "d") && ivga) | 2564 | if (vid2_handle && acpi_evalf(NULL, &ivga, "\\IVGA", "d") && ivga) |
| 2565 | /* G41, assume IVGA doesn't change */ | 2565 | /* G41, assume IVGA doesn't change */ |
| @@ -2590,7 +2590,7 @@ static void video_exit(void) | |||
| 2590 | dbg_printk(TPACPI_DBG_EXIT, | 2590 | dbg_printk(TPACPI_DBG_EXIT, |
| 2591 | "restoring original video autoswitch mode\n"); | 2591 | "restoring original video autoswitch mode\n"); |
| 2592 | if (video_autosw_set(video_orig_autosw)) | 2592 | if (video_autosw_set(video_orig_autosw)) |
| 2593 | printk(IBM_ERR "error while trying to restore original " | 2593 | printk(TPACPI_ERR "error while trying to restore original " |
| 2594 | "video autoswitch mode\n"); | 2594 | "video autoswitch mode\n"); |
| 2595 | } | 2595 | } |
| 2596 | 2596 | ||
| @@ -2663,7 +2663,7 @@ static int video_outputsw_set(int status) | |||
| 2663 | res = acpi_evalf(vid_handle, NULL, | 2663 | res = acpi_evalf(vid_handle, NULL, |
| 2664 | "ASWT", "vdd", status * 0x100, 0); | 2664 | "ASWT", "vdd", status * 0x100, 0); |
| 2665 | if (!autosw && video_autosw_set(autosw)) { | 2665 | if (!autosw && video_autosw_set(autosw)) { |
| 2666 | printk(IBM_ERR "video auto-switch left enabled due to error\n"); | 2666 | printk(TPACPI_ERR "video auto-switch left enabled due to error\n"); |
| 2667 | return -EIO; | 2667 | return -EIO; |
| 2668 | } | 2668 | } |
| 2669 | break; | 2669 | break; |
| @@ -2732,7 +2732,7 @@ static int video_outputsw_cycle(void) | |||
| 2732 | return -ENOSYS; | 2732 | return -ENOSYS; |
| 2733 | } | 2733 | } |
| 2734 | if (!autosw && video_autosw_set(autosw)) { | 2734 | if (!autosw && video_autosw_set(autosw)) { |
| 2735 | printk(IBM_ERR "video auto-switch left enabled due to error\n"); | 2735 | printk(TPACPI_ERR "video auto-switch left enabled due to error\n"); |
| 2736 | return -EIO; | 2736 | return -EIO; |
| 2737 | } | 2737 | } |
| 2738 | 2738 | ||
| @@ -2861,16 +2861,16 @@ static struct ibm_struct video_driver_data = { | |||
| 2861 | * Light (thinklight) subdriver | 2861 | * Light (thinklight) subdriver |
| 2862 | */ | 2862 | */ |
| 2863 | 2863 | ||
| 2864 | IBM_HANDLE(lght, root, "\\LGHT"); /* A21e, A2xm/p, T20-22, X20-21 */ | 2864 | TPACPI_HANDLE(lght, root, "\\LGHT"); /* A21e, A2xm/p, T20-22, X20-21 */ |
| 2865 | IBM_HANDLE(ledb, ec, "LEDB"); /* G4x */ | 2865 | TPACPI_HANDLE(ledb, ec, "LEDB"); /* G4x */ |
| 2866 | 2866 | ||
| 2867 | static int __init light_init(struct ibm_init_struct *iibm) | 2867 | static int __init light_init(struct ibm_init_struct *iibm) |
| 2868 | { | 2868 | { |
| 2869 | vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n"); | 2869 | vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n"); |
| 2870 | 2870 | ||
| 2871 | IBM_ACPIHANDLE_INIT(ledb); | 2871 | TPACPI_ACPIHANDLE_INIT(ledb); |
| 2872 | IBM_ACPIHANDLE_INIT(lght); | 2872 | TPACPI_ACPIHANDLE_INIT(lght); |
| 2873 | IBM_ACPIHANDLE_INIT(cmos); | 2873 | TPACPI_ACPIHANDLE_INIT(cmos); |
| 2874 | 2874 | ||
| 2875 | /* light not supported on 570, 600e/x, 770e, 770x, G4x, R30, R31 */ | 2875 | /* light not supported on 570, 600e/x, 770e, 770x, G4x, R30, R31 */ |
| 2876 | tp_features.light = (cmos_handle || lght_handle) && !ledb_handle; | 2876 | tp_features.light = (cmos_handle || lght_handle) && !ledb_handle; |
| @@ -2952,14 +2952,14 @@ static void dock_notify(struct ibm_struct *ibm, u32 event); | |||
| 2952 | static int dock_read(char *p); | 2952 | static int dock_read(char *p); |
| 2953 | static int dock_write(char *buf); | 2953 | static int dock_write(char *buf); |
| 2954 | 2954 | ||
| 2955 | IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ | 2955 | TPACPI_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ |
| 2956 | "\\_SB.PCI0.DOCK", /* 600e/x,770e,770x,A2xm/p,T20-22,X20-21 */ | 2956 | "\\_SB.PCI0.DOCK", /* 600e/x,770e,770x,A2xm/p,T20-22,X20-21 */ |
| 2957 | "\\_SB.PCI0.PCI1.DOCK", /* all others */ | 2957 | "\\_SB.PCI0.PCI1.DOCK", /* all others */ |
| 2958 | "\\_SB.PCI.ISA.SLCE", /* 570 */ | 2958 | "\\_SB.PCI.ISA.SLCE", /* 570 */ |
| 2959 | ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */ | 2959 | ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */ |
| 2960 | 2960 | ||
| 2961 | /* don't list other alternatives as we install a notify handler on the 570 */ | 2961 | /* don't list other alternatives as we install a notify handler on the 570 */ |
| 2962 | IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ | 2962 | TPACPI_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ |
| 2963 | 2963 | ||
| 2964 | static const struct acpi_device_id ibm_pci_device_ids[] = { | 2964 | static const struct acpi_device_id ibm_pci_device_ids[] = { |
| 2965 | {PCI_ROOT_HID_STRING, 0}, | 2965 | {PCI_ROOT_HID_STRING, 0}, |
| @@ -3002,7 +3002,7 @@ static int __init dock_init(struct ibm_init_struct *iibm) | |||
| 3002 | { | 3002 | { |
| 3003 | vdbg_printk(TPACPI_DBG_INIT, "initializing dock subdriver\n"); | 3003 | vdbg_printk(TPACPI_DBG_INIT, "initializing dock subdriver\n"); |
| 3004 | 3004 | ||
| 3005 | IBM_ACPIHANDLE_INIT(dock); | 3005 | TPACPI_ACPIHANDLE_INIT(dock); |
| 3006 | 3006 | ||
| 3007 | vdbg_printk(TPACPI_DBG_INIT, "dock is %s\n", | 3007 | vdbg_printk(TPACPI_DBG_INIT, "dock is %s\n", |
| 3008 | str_supported(dock_handle != NULL)); | 3008 | str_supported(dock_handle != NULL)); |
| @@ -3018,7 +3018,7 @@ static int __init dock_init2(struct ibm_init_struct *iibm) | |||
| 3018 | 3018 | ||
| 3019 | if (dock_driver_data[0].flags.acpi_driver_registered && | 3019 | if (dock_driver_data[0].flags.acpi_driver_registered && |
| 3020 | dock_driver_data[0].flags.acpi_notify_installed) { | 3020 | dock_driver_data[0].flags.acpi_notify_installed) { |
| 3021 | IBM_ACPIHANDLE_INIT(pci); | 3021 | TPACPI_ACPIHANDLE_INIT(pci); |
| 3022 | dock2_needed = (pci_handle != NULL); | 3022 | dock2_needed = (pci_handle != NULL); |
| 3023 | vdbg_printk(TPACPI_DBG_INIT, | 3023 | vdbg_printk(TPACPI_DBG_INIT, |
| 3024 | "dock PCI handler for the TP 570 is %s\n", | 3024 | "dock PCI handler for the TP 570 is %s\n", |
| @@ -3050,7 +3050,7 @@ static void dock_notify(struct ibm_struct *ibm, u32 event) | |||
| 3050 | else if (event == 0 && docked) | 3050 | else if (event == 0 && docked) |
| 3051 | data = 3; /* dock */ | 3051 | data = 3; /* dock */ |
| 3052 | else { | 3052 | else { |
| 3053 | printk(IBM_ERR "unknown dock event %d, status %d\n", | 3053 | printk(TPACPI_ERR "unknown dock event %d, status %d\n", |
| 3054 | event, _sta(dock_handle)); | 3054 | event, _sta(dock_handle)); |
| 3055 | data = 0; /* unknown */ | 3055 | data = 0; /* unknown */ |
| 3056 | } | 3056 | } |
| @@ -3107,18 +3107,18 @@ static int dock_write(char *buf) | |||
| 3107 | 3107 | ||
| 3108 | #ifdef CONFIG_THINKPAD_ACPI_BAY | 3108 | #ifdef CONFIG_THINKPAD_ACPI_BAY |
| 3109 | 3109 | ||
| 3110 | IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */ | 3110 | TPACPI_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */ |
| 3111 | "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */ | 3111 | "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */ |
| 3112 | "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */ | 3112 | "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */ |
| 3113 | "\\_SB.PCI0.IDE0.SCND.MSTR", /* all others */ | 3113 | "\\_SB.PCI0.IDE0.SCND.MSTR", /* all others */ |
| 3114 | ); /* A21e, R30, R31 */ | 3114 | ); /* A21e, R30, R31 */ |
| 3115 | IBM_HANDLE(bay_ej, bay, "_EJ3", /* 600e/x, A2xm/p, A3x */ | 3115 | TPACPI_HANDLE(bay_ej, bay, "_EJ3", /* 600e/x, A2xm/p, A3x */ |
| 3116 | "_EJ0", /* all others */ | 3116 | "_EJ0", /* all others */ |
| 3117 | ); /* 570,A21e,G4x,R30,R31,R32,R40e,R50e */ | 3117 | ); /* 570,A21e,G4x,R30,R31,R32,R40e,R50e */ |
| 3118 | IBM_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */ | 3118 | TPACPI_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */ |
| 3119 | "\\_SB.PCI0.IDE0.IDEP.IDPS", /* 600e/x, 770e, 770x */ | 3119 | "\\_SB.PCI0.IDE0.IDEP.IDPS", /* 600e/x, 770e, 770x */ |
| 3120 | ); /* all others */ | 3120 | ); /* all others */ |
| 3121 | IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */ | 3121 | TPACPI_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */ |
| 3122 | "_EJ0", /* 770x */ | 3122 | "_EJ0", /* 770x */ |
| 3123 | ); /* all others */ | 3123 | ); /* all others */ |
| 3124 | 3124 | ||
| @@ -3126,12 +3126,12 @@ static int __init bay_init(struct ibm_init_struct *iibm) | |||
| 3126 | { | 3126 | { |
| 3127 | vdbg_printk(TPACPI_DBG_INIT, "initializing bay subdriver\n"); | 3127 | vdbg_printk(TPACPI_DBG_INIT, "initializing bay subdriver\n"); |
| 3128 | 3128 | ||
| 3129 | IBM_ACPIHANDLE_INIT(bay); | 3129 | TPACPI_ACPIHANDLE_INIT(bay); |
| 3130 | if (bay_handle) | 3130 | if (bay_handle) |
| 3131 | IBM_ACPIHANDLE_INIT(bay_ej); | 3131 | TPACPI_ACPIHANDLE_INIT(bay_ej); |
| 3132 | IBM_ACPIHANDLE_INIT(bay2); | 3132 | TPACPI_ACPIHANDLE_INIT(bay2); |
| 3133 | if (bay2_handle) | 3133 | if (bay2_handle) |
| 3134 | IBM_ACPIHANDLE_INIT(bay2_ej); | 3134 | TPACPI_ACPIHANDLE_INIT(bay2_ej); |
| 3135 | 3135 | ||
| 3136 | tp_features.bay_status = bay_handle && | 3136 | tp_features.bay_status = bay_handle && |
| 3137 | acpi_evalf(bay_handle, NULL, "_STA", "qv"); | 3137 | acpi_evalf(bay_handle, NULL, "_STA", "qv"); |
| @@ -3260,7 +3260,7 @@ static int __init cmos_init(struct ibm_init_struct *iibm) | |||
| 3260 | vdbg_printk(TPACPI_DBG_INIT, | 3260 | vdbg_printk(TPACPI_DBG_INIT, |
| 3261 | "initializing cmos commands subdriver\n"); | 3261 | "initializing cmos commands subdriver\n"); |
| 3262 | 3262 | ||
| 3263 | IBM_ACPIHANDLE_INIT(cmos); | 3263 | TPACPI_ACPIHANDLE_INIT(cmos); |
| 3264 | 3264 | ||
| 3265 | vdbg_printk(TPACPI_DBG_INIT, "cmos commands are %s\n", | 3265 | vdbg_printk(TPACPI_DBG_INIT, "cmos commands are %s\n", |
| 3266 | str_supported(cmos_handle != NULL)); | 3266 | str_supported(cmos_handle != NULL)); |
| @@ -3339,7 +3339,7 @@ enum { /* For TPACPI_LED_OLD */ | |||
| 3339 | 3339 | ||
| 3340 | static enum led_access_mode led_supported; | 3340 | static enum led_access_mode led_supported; |
| 3341 | 3341 | ||
| 3342 | IBM_HANDLE(led, ec, "SLED", /* 570 */ | 3342 | TPACPI_HANDLE(led, ec, "SLED", /* 570 */ |
| 3343 | "SYSL", /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20-21 */ | 3343 | "SYSL", /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20-21 */ |
| 3344 | "LED", /* all others */ | 3344 | "LED", /* all others */ |
| 3345 | ); /* R30, R31 */ | 3345 | ); /* R30, R31 */ |
| @@ -3348,7 +3348,7 @@ static int __init led_init(struct ibm_init_struct *iibm) | |||
| 3348 | { | 3348 | { |
| 3349 | vdbg_printk(TPACPI_DBG_INIT, "initializing LED subdriver\n"); | 3349 | vdbg_printk(TPACPI_DBG_INIT, "initializing LED subdriver\n"); |
| 3350 | 3350 | ||
| 3351 | IBM_ACPIHANDLE_INIT(led); | 3351 | TPACPI_ACPIHANDLE_INIT(led); |
| 3352 | 3352 | ||
| 3353 | if (!led_handle) | 3353 | if (!led_handle) |
| 3354 | /* led not supported on R30, R31 */ | 3354 | /* led not supported on R30, R31 */ |
| @@ -3467,13 +3467,13 @@ static struct ibm_struct led_driver_data = { | |||
| 3467 | * Beep subdriver | 3467 | * Beep subdriver |
| 3468 | */ | 3468 | */ |
| 3469 | 3469 | ||
| 3470 | IBM_HANDLE(beep, ec, "BEEP"); /* all except R30, R31 */ | 3470 | TPACPI_HANDLE(beep, ec, "BEEP"); /* all except R30, R31 */ |
| 3471 | 3471 | ||
| 3472 | static int __init beep_init(struct ibm_init_struct *iibm) | 3472 | static int __init beep_init(struct ibm_init_struct *iibm) |
| 3473 | { | 3473 | { |
| 3474 | vdbg_printk(TPACPI_DBG_INIT, "initializing beep subdriver\n"); | 3474 | vdbg_printk(TPACPI_DBG_INIT, "initializing beep subdriver\n"); |
| 3475 | 3475 | ||
| 3476 | IBM_ACPIHANDLE_INIT(beep); | 3476 | TPACPI_ACPIHANDLE_INIT(beep); |
| 3477 | 3477 | ||
| 3478 | vdbg_printk(TPACPI_DBG_INIT, "beep is %s\n", | 3478 | vdbg_printk(TPACPI_DBG_INIT, "beep is %s\n", |
| 3479 | str_supported(beep_handle != NULL)); | 3479 | str_supported(beep_handle != NULL)); |
| @@ -3745,12 +3745,12 @@ static int __init thermal_init(struct ibm_init_struct *iibm) | |||
| 3745 | if (ta1 == 0) { | 3745 | if (ta1 == 0) { |
| 3746 | /* This is sheer paranoia, but we handle it anyway */ | 3746 | /* This is sheer paranoia, but we handle it anyway */ |
| 3747 | if (acpi_tmp7) { | 3747 | if (acpi_tmp7) { |
| 3748 | printk(IBM_ERR | 3748 | printk(TPACPI_ERR |
| 3749 | "ThinkPad ACPI EC access misbehaving, " | 3749 | "ThinkPad ACPI EC access misbehaving, " |
| 3750 | "falling back to ACPI TMPx access mode\n"); | 3750 | "falling back to ACPI TMPx access mode\n"); |
| 3751 | thermal_read_mode = TPACPI_THERMAL_ACPI_TMP07; | 3751 | thermal_read_mode = TPACPI_THERMAL_ACPI_TMP07; |
| 3752 | } else { | 3752 | } else { |
| 3753 | printk(IBM_ERR | 3753 | printk(TPACPI_ERR |
| 3754 | "ThinkPad ACPI EC access misbehaving, " | 3754 | "ThinkPad ACPI EC access misbehaving, " |
| 3755 | "disabling thermal sensors access\n"); | 3755 | "disabling thermal sensors access\n"); |
| 3756 | thermal_read_mode = TPACPI_THERMAL_NONE; | 3756 | thermal_read_mode = TPACPI_THERMAL_NONE; |
| @@ -3953,7 +3953,7 @@ static int brightness_get(struct backlight_device *bd) | |||
| 3953 | } | 3953 | } |
| 3954 | 3954 | ||
| 3955 | if (brightness_mode == 3 && lec != lcmos) { | 3955 | if (brightness_mode == 3 && lec != lcmos) { |
| 3956 | printk(IBM_ERR | 3956 | printk(TPACPI_ERR |
| 3957 | "CMOS NVRAM (%u) and EC (%u) do not agree " | 3957 | "CMOS NVRAM (%u) and EC (%u) do not agree " |
| 3958 | "on display brightness level\n", | 3958 | "on display brightness level\n", |
| 3959 | (unsigned int) lcmos, | 3959 | (unsigned int) lcmos, |
| @@ -4035,8 +4035,8 @@ static int __init tpacpi_query_bcll_levels(acpi_handle handle) | |||
| 4035 | if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) { | 4035 | if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) { |
| 4036 | obj = (union acpi_object *)buffer.pointer; | 4036 | obj = (union acpi_object *)buffer.pointer; |
| 4037 | if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { | 4037 | if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { |
| 4038 | printk(IBM_ERR "Unknown BCLL data, " | 4038 | printk(TPACPI_ERR "Unknown BCLL data, " |
| 4039 | "please report this to %s\n", IBM_MAIL); | 4039 | "please report this to %s\n", TPACPI_MAIL); |
| 4040 | rc = 0; | 4040 | rc = 0; |
| 4041 | } else { | 4041 | } else { |
| 4042 | rc = obj->package.count; | 4042 | rc = obj->package.count; |
| @@ -4074,7 +4074,7 @@ static int __init brightness_check_levels(void) | |||
| 4074 | void *found_node = NULL; | 4074 | void *found_node = NULL; |
| 4075 | 4075 | ||
| 4076 | if (!vid_handle) { | 4076 | if (!vid_handle) { |
| 4077 | IBM_ACPIHANDLE_INIT(vid); | 4077 | TPACPI_ACPIHANDLE_INIT(vid); |
| 4078 | } | 4078 | } |
| 4079 | if (!vid_handle) | 4079 | if (!vid_handle) |
| 4080 | return 0; | 4080 | return 0; |
| @@ -4107,7 +4107,7 @@ static int __init brightness_check_std_acpi_support(void) | |||
| 4107 | void *found_node = NULL; | 4107 | void *found_node = NULL; |
| 4108 | 4108 | ||
| 4109 | if (!vid_handle) { | 4109 | if (!vid_handle) { |
| 4110 | IBM_ACPIHANDLE_INIT(vid); | 4110 | TPACPI_ACPIHANDLE_INIT(vid); |
| 4111 | } | 4111 | } |
| 4112 | if (!vid_handle) | 4112 | if (!vid_handle) |
| 4113 | return 0; | 4113 | return 0; |
| @@ -4133,7 +4133,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm) | |||
| 4133 | return 1; | 4133 | return 1; |
| 4134 | } else if (brightness_enable > 1) { | 4134 | } else if (brightness_enable > 1) { |
| 4135 | if (brightness_check_std_acpi_support()) { | 4135 | if (brightness_check_std_acpi_support()) { |
| 4136 | printk(IBM_NOTICE | 4136 | printk(TPACPI_NOTICE |
| 4137 | "standard ACPI backlight interface available, not loading native one...\n"); | 4137 | "standard ACPI backlight interface available, not loading native one...\n"); |
| 4138 | return 1; | 4138 | return 1; |
| 4139 | } | 4139 | } |
| @@ -4161,13 +4161,13 @@ static int __init brightness_init(struct ibm_init_struct *iibm) | |||
| 4161 | return 1; | 4161 | return 1; |
| 4162 | 4162 | ||
| 4163 | if (tp_features.bright_16levels) | 4163 | if (tp_features.bright_16levels) |
| 4164 | printk(IBM_INFO "detected a 16-level brightness capable ThinkPad\n"); | 4164 | printk(TPACPI_INFO "detected a 16-level brightness capable ThinkPad\n"); |
| 4165 | 4165 | ||
| 4166 | ibm_backlight_device = backlight_device_register( | 4166 | ibm_backlight_device = backlight_device_register( |
| 4167 | TPACPI_BACKLIGHT_DEV_NAME, NULL, NULL, | 4167 | TPACPI_BACKLIGHT_DEV_NAME, NULL, NULL, |
| 4168 | &ibm_backlight_data); | 4168 | &ibm_backlight_data); |
| 4169 | if (IS_ERR(ibm_backlight_device)) { | 4169 | if (IS_ERR(ibm_backlight_device)) { |
| 4170 | printk(IBM_ERR "Could not register backlight device\n"); | 4170 | printk(TPACPI_ERR "Could not register backlight device\n"); |
| 4171 | return PTR_ERR(ibm_backlight_device); | 4171 | return PTR_ERR(ibm_backlight_device); |
| 4172 | } | 4172 | } |
| 4173 | vdbg_printk(TPACPI_DBG_INIT, "brightness is supported\n"); | 4173 | vdbg_printk(TPACPI_DBG_INIT, "brightness is supported\n"); |
| @@ -4491,11 +4491,11 @@ static struct mutex fan_mutex; | |||
| 4491 | static void fan_watchdog_fire(struct work_struct *ignored); | 4491 | static void fan_watchdog_fire(struct work_struct *ignored); |
| 4492 | static DECLARE_DELAYED_WORK(fan_watchdog_task, fan_watchdog_fire); | 4492 | static DECLARE_DELAYED_WORK(fan_watchdog_task, fan_watchdog_fire); |
| 4493 | 4493 | ||
| 4494 | IBM_HANDLE(fans, ec, "FANS"); /* X31, X40, X41 */ | 4494 | TPACPI_HANDLE(fans, ec, "FANS"); /* X31, X40, X41 */ |
| 4495 | IBM_HANDLE(gfan, ec, "GFAN", /* 570 */ | 4495 | TPACPI_HANDLE(gfan, ec, "GFAN", /* 570 */ |
| 4496 | "\\FSPD", /* 600e/x, 770e, 770x */ | 4496 | "\\FSPD", /* 600e/x, 770e, 770x */ |
| 4497 | ); /* all others */ | 4497 | ); /* all others */ |
| 4498 | IBM_HANDLE(sfan, ec, "SFAN", /* 570 */ | 4498 | TPACPI_HANDLE(sfan, ec, "SFAN", /* 570 */ |
| 4499 | "JFNS", /* 770x-JL */ | 4499 | "JFNS", /* 770x-JL */ |
| 4500 | ); /* all others */ | 4500 | ); /* all others */ |
| 4501 | 4501 | ||
| @@ -4790,7 +4790,7 @@ static void fan_watchdog_reset(void) | |||
| 4790 | if (!schedule_delayed_work(&fan_watchdog_task, | 4790 | if (!schedule_delayed_work(&fan_watchdog_task, |
| 4791 | msecs_to_jiffies(fan_watchdog_maxinterval | 4791 | msecs_to_jiffies(fan_watchdog_maxinterval |
| 4792 | * 1000))) { | 4792 | * 1000))) { |
| 4793 | printk(IBM_ERR "failed to schedule the fan watchdog, " | 4793 | printk(TPACPI_ERR "failed to schedule the fan watchdog, " |
| 4794 | "watchdog will not trigger\n"); | 4794 | "watchdog will not trigger\n"); |
| 4795 | } | 4795 | } |
| 4796 | } else | 4796 | } else |
| @@ -4804,10 +4804,10 @@ static void fan_watchdog_fire(struct work_struct *ignored) | |||
| 4804 | if (tpacpi_lifecycle != TPACPI_LIFE_RUNNING) | 4804 | if (tpacpi_lifecycle != TPACPI_LIFE_RUNNING) |
| 4805 | return; | 4805 | return; |
| 4806 | 4806 | ||
| 4807 | printk(IBM_NOTICE "fan watchdog: enabling fan\n"); | 4807 | printk(TPACPI_NOTICE "fan watchdog: enabling fan\n"); |
| 4808 | rc = fan_set_enable(); | 4808 | rc = fan_set_enable(); |
| 4809 | if (rc < 0) { | 4809 | if (rc < 0) { |
| 4810 | printk(IBM_ERR "fan watchdog: error %d while enabling fan, " | 4810 | printk(TPACPI_ERR "fan watchdog: error %d while enabling fan, " |
| 4811 | "will try again later...\n", -rc); | 4811 | "will try again later...\n", -rc); |
| 4812 | /* reschedule for later */ | 4812 | /* reschedule for later */ |
| 4813 | fan_watchdog_reset(); | 4813 | fan_watchdog_reset(); |
| @@ -5047,9 +5047,9 @@ static int __init fan_init(struct ibm_init_struct *iibm) | |||
| 5047 | tp_features.fan_ctrl_status_undef = 0; | 5047 | tp_features.fan_ctrl_status_undef = 0; |
| 5048 | fan_control_desired_level = 7; | 5048 | fan_control_desired_level = 7; |
| 5049 | 5049 | ||
| 5050 | IBM_ACPIHANDLE_INIT(fans); | 5050 | TPACPI_ACPIHANDLE_INIT(fans); |
| 5051 | IBM_ACPIHANDLE_INIT(gfan); | 5051 | TPACPI_ACPIHANDLE_INIT(gfan); |
| 5052 | IBM_ACPIHANDLE_INIT(sfan); | 5052 | TPACPI_ACPIHANDLE_INIT(sfan); |
| 5053 | 5053 | ||
| 5054 | if (gfan_handle) { | 5054 | if (gfan_handle) { |
| 5055 | /* 570, 600e/x, 770e, 770x */ | 5055 | /* 570, 600e/x, 770e, 770x */ |
| @@ -5075,7 +5075,7 @@ static int __init fan_init(struct ibm_init_struct *iibm) | |||
| 5075 | case 0x3837: /* TP-78 */ | 5075 | case 0x3837: /* TP-78 */ |
| 5076 | case 0x3637: /* TP-76 */ | 5076 | case 0x3637: /* TP-76 */ |
| 5077 | case 0x3037: /* TP-70 */ | 5077 | case 0x3037: /* TP-70 */ |
| 5078 | printk(IBM_NOTICE | 5078 | printk(TPACPI_NOTICE |
| 5079 | "fan_init: initial fan status is " | 5079 | "fan_init: initial fan status is " |
| 5080 | "unknown, assuming it is in auto " | 5080 | "unknown, assuming it is in auto " |
| 5081 | "mode\n"); | 5081 | "mode\n"); |
| @@ -5084,7 +5084,7 @@ static int __init fan_init(struct ibm_init_struct *iibm) | |||
| 5084 | } | 5084 | } |
| 5085 | } | 5085 | } |
| 5086 | } else { | 5086 | } else { |
| 5087 | printk(IBM_ERR | 5087 | printk(TPACPI_ERR |
| 5088 | "ThinkPad ACPI EC access misbehaving, " | 5088 | "ThinkPad ACPI EC access misbehaving, " |
| 5089 | "fan status and control unavailable\n"); | 5089 | "fan status and control unavailable\n"); |
| 5090 | return 1; | 5090 | return 1; |
| @@ -5255,7 +5255,7 @@ static int fan_write_cmd_level(const char *cmd, int *rc) | |||
| 5255 | return 0; | 5255 | return 0; |
| 5256 | 5256 | ||
| 5257 | if ((*rc = fan_set_level_safe(level)) == -ENXIO) | 5257 | if ((*rc = fan_set_level_safe(level)) == -ENXIO) |
| 5258 | printk(IBM_ERR "level command accepted for unsupported " | 5258 | printk(TPACPI_ERR "level command accepted for unsupported " |
| 5259 | "access mode %d", fan_control_access_mode); | 5259 | "access mode %d", fan_control_access_mode); |
| 5260 | 5260 | ||
| 5261 | return 1; | 5261 | return 1; |
| @@ -5267,7 +5267,7 @@ static int fan_write_cmd_enable(const char *cmd, int *rc) | |||
| 5267 | return 0; | 5267 | return 0; |
| 5268 | 5268 | ||
| 5269 | if ((*rc = fan_set_enable()) == -ENXIO) | 5269 | if ((*rc = fan_set_enable()) == -ENXIO) |
| 5270 | printk(IBM_ERR "enable command accepted for unsupported " | 5270 | printk(TPACPI_ERR "enable command accepted for unsupported " |
| 5271 | "access mode %d", fan_control_access_mode); | 5271 | "access mode %d", fan_control_access_mode); |
| 5272 | 5272 | ||
| 5273 | return 1; | 5273 | return 1; |
| @@ -5279,7 +5279,7 @@ static int fan_write_cmd_disable(const char *cmd, int *rc) | |||
| 5279 | return 0; | 5279 | return 0; |
| 5280 | 5280 | ||
| 5281 | if ((*rc = fan_set_disable()) == -ENXIO) | 5281 | if ((*rc = fan_set_disable()) == -ENXIO) |
| 5282 | printk(IBM_ERR "disable command accepted for unsupported " | 5282 | printk(TPACPI_ERR "disable command accepted for unsupported " |
| 5283 | "access mode %d", fan_control_access_mode); | 5283 | "access mode %d", fan_control_access_mode); |
| 5284 | 5284 | ||
| 5285 | return 1; | 5285 | return 1; |
| @@ -5296,7 +5296,7 @@ static int fan_write_cmd_speed(const char *cmd, int *rc) | |||
| 5296 | return 0; | 5296 | return 0; |
| 5297 | 5297 | ||
| 5298 | if ((*rc = fan_set_speed(speed)) == -ENXIO) | 5298 | if ((*rc = fan_set_speed(speed)) == -ENXIO) |
| 5299 | printk(IBM_ERR "speed command accepted for unsupported " | 5299 | printk(TPACPI_ERR "speed command accepted for unsupported " |
| 5300 | "access mode %d", fan_control_access_mode); | 5300 | "access mode %d", fan_control_access_mode); |
| 5301 | 5301 | ||
| 5302 | return 1; | 5302 | return 1; |
| @@ -5360,7 +5360,7 @@ static ssize_t thinkpad_acpi_pdev_name_show(struct device *dev, | |||
| 5360 | struct device_attribute *attr, | 5360 | struct device_attribute *attr, |
| 5361 | char *buf) | 5361 | char *buf) |
| 5362 | { | 5362 | { |
| 5363 | return snprintf(buf, PAGE_SIZE, "%s\n", IBM_NAME); | 5363 | return snprintf(buf, PAGE_SIZE, "%s\n", TPACPI_NAME); |
| 5364 | } | 5364 | } |
| 5365 | 5365 | ||
| 5366 | static struct device_attribute dev_attr_thinkpad_acpi_pdev_name = | 5366 | static struct device_attribute dev_attr_thinkpad_acpi_pdev_name = |
| @@ -5464,7 +5464,7 @@ static int __init ibm_init(struct ibm_init_struct *iibm) | |||
| 5464 | if (ibm->acpi->notify) { | 5464 | if (ibm->acpi->notify) { |
| 5465 | ret = setup_acpi_notify(ibm); | 5465 | ret = setup_acpi_notify(ibm); |
| 5466 | if (ret == -ENODEV) { | 5466 | if (ret == -ENODEV) { |
| 5467 | printk(IBM_NOTICE "disabling subdriver %s\n", | 5467 | printk(TPACPI_NOTICE "disabling subdriver %s\n", |
| 5468 | ibm->name); | 5468 | ibm->name); |
| 5469 | ret = 0; | 5469 | ret = 0; |
| 5470 | goto err_out; | 5470 | goto err_out; |
| @@ -5482,7 +5482,7 @@ static int __init ibm_init(struct ibm_init_struct *iibm) | |||
| 5482 | S_IFREG | S_IRUGO | S_IWUSR, | 5482 | S_IFREG | S_IRUGO | S_IWUSR, |
| 5483 | proc_dir); | 5483 | proc_dir); |
| 5484 | if (!entry) { | 5484 | if (!entry) { |
| 5485 | printk(IBM_ERR "unable to create proc entry %s\n", | 5485 | printk(TPACPI_ERR "unable to create proc entry %s\n", |
| 5486 | ibm->name); | 5486 | ibm->name); |
| 5487 | ret = -ENODEV; | 5487 | ret = -ENODEV; |
| 5488 | goto err_out; | 5488 | goto err_out; |
| @@ -5577,10 +5577,10 @@ static int __init probe_for_thinkpad(void) | |||
| 5577 | is_thinkpad = (thinkpad_id.model_str != NULL); | 5577 | is_thinkpad = (thinkpad_id.model_str != NULL); |
| 5578 | 5578 | ||
| 5579 | /* ec is required because many other handles are relative to it */ | 5579 | /* ec is required because many other handles are relative to it */ |
| 5580 | IBM_ACPIHANDLE_INIT(ec); | 5580 | TPACPI_ACPIHANDLE_INIT(ec); |
| 5581 | if (!ec_handle) { | 5581 | if (!ec_handle) { |
| 5582 | if (is_thinkpad) | 5582 | if (is_thinkpad) |
| 5583 | printk(IBM_ERR | 5583 | printk(TPACPI_ERR |
| 5584 | "Not yet supported ThinkPad detected!\n"); | 5584 | "Not yet supported ThinkPad detected!\n"); |
| 5585 | return -ENODEV; | 5585 | return -ENODEV; |
| 5586 | } | 5586 | } |
| @@ -5731,28 +5731,28 @@ MODULE_PARM_DESC(hotkey_report_mode, | |||
| 5731 | "used for backwards compatibility with userspace, " | 5731 | "used for backwards compatibility with userspace, " |
| 5732 | "see documentation"); | 5732 | "see documentation"); |
| 5733 | 5733 | ||
| 5734 | #define IBM_PARAM(feature) \ | 5734 | #define TPACPI_PARAM(feature) \ |
| 5735 | module_param_call(feature, set_ibm_param, NULL, NULL, 0); \ | 5735 | module_param_call(feature, set_ibm_param, NULL, NULL, 0); \ |
| 5736 | MODULE_PARM_DESC(feature, "Simulates thinkpad-aci procfs command " \ | 5736 | MODULE_PARM_DESC(feature, "Simulates thinkpad-aci procfs command " \ |
| 5737 | "at module load, see documentation") | 5737 | "at module load, see documentation") |
| 5738 | 5738 | ||
| 5739 | IBM_PARAM(hotkey); | 5739 | TPACPI_PARAM(hotkey); |
| 5740 | IBM_PARAM(bluetooth); | 5740 | TPACPI_PARAM(bluetooth); |
| 5741 | IBM_PARAM(video); | 5741 | TPACPI_PARAM(video); |
| 5742 | IBM_PARAM(light); | 5742 | TPACPI_PARAM(light); |
| 5743 | #ifdef CONFIG_THINKPAD_ACPI_DOCK | 5743 | #ifdef CONFIG_THINKPAD_ACPI_DOCK |
| 5744 | IBM_PARAM(dock); | 5744 | TPACPI_PARAM(dock); |
| 5745 | #endif | 5745 | #endif |
| 5746 | #ifdef CONFIG_THINKPAD_ACPI_BAY | 5746 | #ifdef CONFIG_THINKPAD_ACPI_BAY |
| 5747 | IBM_PARAM(bay); | 5747 | TPACPI_PARAM(bay); |
| 5748 | #endif /* CONFIG_THINKPAD_ACPI_BAY */ | 5748 | #endif /* CONFIG_THINKPAD_ACPI_BAY */ |
| 5749 | IBM_PARAM(cmos); | 5749 | TPACPI_PARAM(cmos); |
| 5750 | IBM_PARAM(led); | 5750 | TPACPI_PARAM(led); |
| 5751 | IBM_PARAM(beep); | 5751 | TPACPI_PARAM(beep); |
| 5752 | IBM_PARAM(ecdump); | 5752 | TPACPI_PARAM(ecdump); |
| 5753 | IBM_PARAM(brightness); | 5753 | TPACPI_PARAM(brightness); |
| 5754 | IBM_PARAM(volume); | 5754 | TPACPI_PARAM(volume); |
| 5755 | IBM_PARAM(fan); | 5755 | TPACPI_PARAM(fan); |
| 5756 | 5756 | ||
| 5757 | static void thinkpad_acpi_module_exit(void) | 5757 | static void thinkpad_acpi_module_exit(void) |
| 5758 | { | 5758 | { |
| @@ -5798,7 +5798,7 @@ static void thinkpad_acpi_module_exit(void) | |||
| 5798 | platform_driver_unregister(&tpacpi_pdriver); | 5798 | platform_driver_unregister(&tpacpi_pdriver); |
| 5799 | 5799 | ||
| 5800 | if (proc_dir) | 5800 | if (proc_dir) |
| 5801 | remove_proc_entry(IBM_PROC_DIR, acpi_root_dir); | 5801 | remove_proc_entry(TPACPI_PROC_DIR, acpi_root_dir); |
| 5802 | 5802 | ||
| 5803 | kfree(thinkpad_id.bios_version_str); | 5803 | kfree(thinkpad_id.bios_version_str); |
| 5804 | kfree(thinkpad_id.ec_version_str); | 5804 | kfree(thinkpad_id.ec_version_str); |
| @@ -5827,12 +5827,12 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5827 | 5827 | ||
| 5828 | /* Driver initialization */ | 5828 | /* Driver initialization */ |
| 5829 | 5829 | ||
| 5830 | IBM_ACPIHANDLE_INIT(ecrd); | 5830 | TPACPI_ACPIHANDLE_INIT(ecrd); |
| 5831 | IBM_ACPIHANDLE_INIT(ecwr); | 5831 | TPACPI_ACPIHANDLE_INIT(ecwr); |
| 5832 | 5832 | ||
| 5833 | proc_dir = proc_mkdir(IBM_PROC_DIR, acpi_root_dir); | 5833 | proc_dir = proc_mkdir(TPACPI_PROC_DIR, acpi_root_dir); |
| 5834 | if (!proc_dir) { | 5834 | if (!proc_dir) { |
| 5835 | printk(IBM_ERR "unable to create proc dir " IBM_PROC_DIR); | 5835 | printk(TPACPI_ERR "unable to create proc dir " TPACPI_PROC_DIR); |
| 5836 | thinkpad_acpi_module_exit(); | 5836 | thinkpad_acpi_module_exit(); |
| 5837 | return -ENODEV; | 5837 | return -ENODEV; |
| 5838 | } | 5838 | } |
| @@ -5840,7 +5840,7 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5840 | 5840 | ||
| 5841 | ret = platform_driver_register(&tpacpi_pdriver); | 5841 | ret = platform_driver_register(&tpacpi_pdriver); |
| 5842 | if (ret) { | 5842 | if (ret) { |
| 5843 | printk(IBM_ERR "unable to register main platform driver\n"); | 5843 | printk(TPACPI_ERR "unable to register main platform driver\n"); |
| 5844 | thinkpad_acpi_module_exit(); | 5844 | thinkpad_acpi_module_exit(); |
| 5845 | return ret; | 5845 | return ret; |
| 5846 | } | 5846 | } |
| @@ -5848,7 +5848,7 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5848 | 5848 | ||
| 5849 | ret = platform_driver_register(&tpacpi_hwmon_pdriver); | 5849 | ret = platform_driver_register(&tpacpi_hwmon_pdriver); |
| 5850 | if (ret) { | 5850 | if (ret) { |
| 5851 | printk(IBM_ERR "unable to register hwmon platform driver\n"); | 5851 | printk(TPACPI_ERR "unable to register hwmon platform driver\n"); |
| 5852 | thinkpad_acpi_module_exit(); | 5852 | thinkpad_acpi_module_exit(); |
| 5853 | return ret; | 5853 | return ret; |
| 5854 | } | 5854 | } |
| @@ -5860,7 +5860,7 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5860 | ret = tpacpi_create_driver_attributes(&tpacpi_hwmon_pdriver.driver); | 5860 | ret = tpacpi_create_driver_attributes(&tpacpi_hwmon_pdriver.driver); |
| 5861 | } | 5861 | } |
| 5862 | if (ret) { | 5862 | if (ret) { |
| 5863 | printk(IBM_ERR "unable to create sysfs driver attributes\n"); | 5863 | printk(TPACPI_ERR "unable to create sysfs driver attributes\n"); |
| 5864 | thinkpad_acpi_module_exit(); | 5864 | thinkpad_acpi_module_exit(); |
| 5865 | return ret; | 5865 | return ret; |
| 5866 | } | 5866 | } |
| @@ -5868,29 +5868,29 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5868 | 5868 | ||
| 5869 | 5869 | ||
| 5870 | /* Device initialization */ | 5870 | /* Device initialization */ |
| 5871 | tpacpi_pdev = platform_device_register_simple(IBM_DRVR_NAME, -1, | 5871 | tpacpi_pdev = platform_device_register_simple(TPACPI_DRVR_NAME, -1, |
| 5872 | NULL, 0); | 5872 | NULL, 0); |
| 5873 | if (IS_ERR(tpacpi_pdev)) { | 5873 | if (IS_ERR(tpacpi_pdev)) { |
| 5874 | ret = PTR_ERR(tpacpi_pdev); | 5874 | ret = PTR_ERR(tpacpi_pdev); |
| 5875 | tpacpi_pdev = NULL; | 5875 | tpacpi_pdev = NULL; |
| 5876 | printk(IBM_ERR "unable to register platform device\n"); | 5876 | printk(TPACPI_ERR "unable to register platform device\n"); |
| 5877 | thinkpad_acpi_module_exit(); | 5877 | thinkpad_acpi_module_exit(); |
| 5878 | return ret; | 5878 | return ret; |
| 5879 | } | 5879 | } |
| 5880 | tpacpi_sensors_pdev = platform_device_register_simple( | 5880 | tpacpi_sensors_pdev = platform_device_register_simple( |
| 5881 | IBM_HWMON_DRVR_NAME, | 5881 | TPACPI_HWMON_DRVR_NAME, |
| 5882 | -1, NULL, 0); | 5882 | -1, NULL, 0); |
| 5883 | if (IS_ERR(tpacpi_sensors_pdev)) { | 5883 | if (IS_ERR(tpacpi_sensors_pdev)) { |
| 5884 | ret = PTR_ERR(tpacpi_sensors_pdev); | 5884 | ret = PTR_ERR(tpacpi_sensors_pdev); |
| 5885 | tpacpi_sensors_pdev = NULL; | 5885 | tpacpi_sensors_pdev = NULL; |
| 5886 | printk(IBM_ERR "unable to register hwmon platform device\n"); | 5886 | printk(TPACPI_ERR "unable to register hwmon platform device\n"); |
| 5887 | thinkpad_acpi_module_exit(); | 5887 | thinkpad_acpi_module_exit(); |
| 5888 | return ret; | 5888 | return ret; |
| 5889 | } | 5889 | } |
| 5890 | ret = device_create_file(&tpacpi_sensors_pdev->dev, | 5890 | ret = device_create_file(&tpacpi_sensors_pdev->dev, |
| 5891 | &dev_attr_thinkpad_acpi_pdev_name); | 5891 | &dev_attr_thinkpad_acpi_pdev_name); |
| 5892 | if (ret) { | 5892 | if (ret) { |
| 5893 | printk(IBM_ERR | 5893 | printk(TPACPI_ERR |
| 5894 | "unable to create sysfs hwmon device attributes\n"); | 5894 | "unable to create sysfs hwmon device attributes\n"); |
| 5895 | thinkpad_acpi_module_exit(); | 5895 | thinkpad_acpi_module_exit(); |
| 5896 | return ret; | 5896 | return ret; |
| @@ -5900,20 +5900,20 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5900 | if (IS_ERR(tpacpi_hwmon)) { | 5900 | if (IS_ERR(tpacpi_hwmon)) { |
| 5901 | ret = PTR_ERR(tpacpi_hwmon); | 5901 | ret = PTR_ERR(tpacpi_hwmon); |
| 5902 | tpacpi_hwmon = NULL; | 5902 | tpacpi_hwmon = NULL; |
| 5903 | printk(IBM_ERR "unable to register hwmon device\n"); | 5903 | printk(TPACPI_ERR "unable to register hwmon device\n"); |
| 5904 | thinkpad_acpi_module_exit(); | 5904 | thinkpad_acpi_module_exit(); |
| 5905 | return ret; | 5905 | return ret; |
| 5906 | } | 5906 | } |
| 5907 | mutex_init(&tpacpi_inputdev_send_mutex); | 5907 | mutex_init(&tpacpi_inputdev_send_mutex); |
| 5908 | tpacpi_inputdev = input_allocate_device(); | 5908 | tpacpi_inputdev = input_allocate_device(); |
| 5909 | if (!tpacpi_inputdev) { | 5909 | if (!tpacpi_inputdev) { |
| 5910 | printk(IBM_ERR "unable to allocate input device\n"); | 5910 | printk(TPACPI_ERR "unable to allocate input device\n"); |
| 5911 | thinkpad_acpi_module_exit(); | 5911 | thinkpad_acpi_module_exit(); |
| 5912 | return -ENOMEM; | 5912 | return -ENOMEM; |
| 5913 | } else { | 5913 | } else { |
| 5914 | /* Prepare input device, but don't register */ | 5914 | /* Prepare input device, but don't register */ |
| 5915 | tpacpi_inputdev->name = "ThinkPad Extra Buttons"; | 5915 | tpacpi_inputdev->name = "ThinkPad Extra Buttons"; |
| 5916 | tpacpi_inputdev->phys = IBM_DRVR_NAME "/input0"; | 5916 | tpacpi_inputdev->phys = TPACPI_DRVR_NAME "/input0"; |
| 5917 | tpacpi_inputdev->id.bustype = BUS_HOST; | 5917 | tpacpi_inputdev->id.bustype = BUS_HOST; |
| 5918 | tpacpi_inputdev->id.vendor = (thinkpad_id.vendor) ? | 5918 | tpacpi_inputdev->id.vendor = (thinkpad_id.vendor) ? |
| 5919 | thinkpad_id.vendor : | 5919 | thinkpad_id.vendor : |
| @@ -5932,7 +5932,7 @@ static int __init thinkpad_acpi_module_init(void) | |||
| 5932 | } | 5932 | } |
| 5933 | ret = input_register_device(tpacpi_inputdev); | 5933 | ret = input_register_device(tpacpi_inputdev); |
| 5934 | if (ret < 0) { | 5934 | if (ret < 0) { |
| 5935 | printk(IBM_ERR "unable to register input device\n"); | 5935 | printk(TPACPI_ERR "unable to register input device\n"); |
| 5936 | thinkpad_acpi_module_exit(); | 5936 | thinkpad_acpi_module_exit(); |
| 5937 | return ret; | 5937 | return ret; |
| 5938 | } else { | 5938 | } else { |
| @@ -5970,8 +5970,8 @@ IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); | |||
| 5970 | IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); | 5970 | IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); |
| 5971 | 5971 | ||
| 5972 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); | 5972 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); |
| 5973 | MODULE_DESCRIPTION(IBM_DESC); | 5973 | MODULE_DESCRIPTION(TPACPI_DESC); |
| 5974 | MODULE_VERSION(IBM_VERSION); | 5974 | MODULE_VERSION(TPACPI_VERSION); |
| 5975 | MODULE_LICENSE("GPL"); | 5975 | MODULE_LICENSE("GPL"); |
| 5976 | 5976 | ||
| 5977 | module_init(thinkpad_acpi_module_init); | 5977 | module_init(thinkpad_acpi_module_init); |
