ACPI: thinkpad-acpi: enable more hotkeys
Revise ACPI HKEY functionality to better interface with the firmware, and enable up to 32 regular hotkeys, instead of just 16 of them. Ouch. This takes care of most keys one used to have to do CMOS NVRAM polling on, and should drop the need for tpb, thinkpad-keys, and other such 5Hz NVRAM polling power vampires on most modern ThinkPads ;-) And, just to add insult to injury, this was sort of working since forever through the procfs interface, but nobody noticed or tried an echo 0xffffffff > /proc/acpi/ibm/hotkey and told me it would generate weird events. ARGH! Thanks to Richard Hughes for kicking off the work that ended up with this discovery, and to Matthew Garret for calling my attention to the fact that newer ThinkPads were indeed generating ACPI GPEs when such hot keys were pressed. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Richard Hughes <hughsient@gmail.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
committed by
Len Brown
parent
b8b26402cb
commit
ae92bd17ff
@ -415,14 +415,14 @@ static int fan_write_cmd_watchdog(const char *cmd, int *rc);
|
||||
*/
|
||||
|
||||
static int hotkey_orig_status;
|
||||
static int hotkey_orig_mask;
|
||||
static u32 hotkey_orig_mask;
|
||||
|
||||
static struct mutex hotkey_mutex;
|
||||
|
||||
static int hotkey_init(struct ibm_init_struct *iibm);
|
||||
static void hotkey_exit(void);
|
||||
static int hotkey_get(int *status, int *mask);
|
||||
static int hotkey_set(int status, int mask);
|
||||
static int hotkey_get(int *status, u32 *mask);
|
||||
static int hotkey_set(int status, u32 mask);
|
||||
static void hotkey_notify(struct ibm_struct *ibm, u32 event);
|
||||
static int hotkey_read(char *p);
|
||||
static int hotkey_write(char *buf);
|
||||
|
Reference in New Issue
Block a user