diff options
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 2155139793b1..9a611402ee9d 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -999,6 +999,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
999 | 999 | ||
1000 | int res, i; | 1000 | int res, i; |
1001 | int status; | 1001 | int status; |
1002 | int hkeyv; | ||
1002 | 1003 | ||
1003 | vdbg_printk(TPACPI_DBG_INIT, "initializing hotkey subdriver\n"); | 1004 | vdbg_printk(TPACPI_DBG_INIT, "initializing hotkey subdriver\n"); |
1004 | 1005 | ||
@@ -1024,18 +1025,35 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
1024 | return res; | 1025 | return res; |
1025 | 1026 | ||
1026 | /* mask not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, | 1027 | /* mask not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, |
1027 | A30, R30, R31, T20-22, X20-21, X22-24 */ | 1028 | A30, R30, R31, T20-22, X20-21, X22-24. Detected by checking |
1028 | tp_features.hotkey_mask = | 1029 | for HKEY interface version 0x100 */ |
1029 | acpi_evalf(hkey_handle, NULL, "DHKN", "qv"); | 1030 | if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) { |
1031 | if ((hkeyv >> 8) != 1) { | ||
1032 | printk(IBM_ERR "unknown version of the " | ||
1033 | "HKEY interface: 0x%x\n", hkeyv); | ||
1034 | printk(IBM_ERR "please report this to %s\n", | ||
1035 | IBM_MAIL); | ||
1036 | } else { | ||
1037 | /* | ||
1038 | * MHKV 0x100 in A31, R40, R40e, | ||
1039 | * T4x, X31, and later | ||
1040 | * */ | ||
1041 | tp_features.hotkey_mask = 1; | ||
1042 | } | ||
1043 | } | ||
1030 | 1044 | ||
1031 | vdbg_printk(TPACPI_DBG_INIT, "hotkey masks are %s\n", | 1045 | vdbg_printk(TPACPI_DBG_INIT, "hotkey masks are %s\n", |
1032 | str_supported(tp_features.hotkey_mask)); | 1046 | str_supported(tp_features.hotkey_mask)); |
1033 | 1047 | ||
1034 | if (tp_features.hotkey_mask) { | 1048 | if (tp_features.hotkey_mask) { |
1035 | /* MHKA available in A31, R40, R40e, T4x, X31, and later */ | ||
1036 | if (!acpi_evalf(hkey_handle, &hotkey_all_mask, | 1049 | if (!acpi_evalf(hkey_handle, &hotkey_all_mask, |
1037 | "MHKA", "qd")) | 1050 | "MHKA", "qd")) { |
1051 | printk(IBM_ERR | ||
1052 | "missing MHKA handler, " | ||
1053 | "please report this to %s\n", | ||
1054 | IBM_MAIL); | ||
1038 | hotkey_all_mask = 0x080cU; /* FN+F12, FN+F4, FN+F3 */ | 1055 | hotkey_all_mask = 0x080cU; /* FN+F12, FN+F4, FN+F3 */ |
1056 | } | ||
1039 | } | 1057 | } |
1040 | 1058 | ||
1041 | res = hotkey_get(&hotkey_orig_status, &hotkey_orig_mask); | 1059 | res = hotkey_get(&hotkey_orig_status, &hotkey_orig_mask); |