Re: [PATCH] thinkpad_acpi: unhandled hkey event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2015-02-07 05:22, Darren Hart wrote:
> On Sat, Jan 31, 2015 at 07:52:03PM +0100, Xavier Naveira wrote:
>> Pressing Fn+Esc in a Lenovo Thinkpad x240 to lock the Fn keys generates
>> an unhandled hkey event
>>
>> Signed-off-by: Xavier Naveira <xnaveira@xxxxxxxxx>
>> ---
>>   drivers/platform/x86/thinkpad_acpi.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
>> index c3d11fa..e61c43b 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -196,6 +196,7 @@ enum tpacpi_hkey_event_t {
>>   	/* Key-related user-interface events */
>>   	TP_HKEY_EV_KEY_NUMLOCK		= 0x6000, /* NumLock key pressed */
>>   	TP_HKEY_EV_KEY_FN		= 0x6005, /* Fn key pressed? E420 */
>> +	TP_HKEY_EV_KEY_FN_ESC           = 0x6060, /* Fn+Esc key pressed X240 */
>>
>>   	/* Thermal events */
>>   	TP_HKEY_EV_ALARM_BAT_HOT	= 0x6011, /* battery too hot */
>> @@ -3717,6 +3718,12 @@ static bool hotkey_notify_6xxx(const u32 hkey,
>>   		*send_acpi_ev = false;
>>   		*ignore_acpi_ev = true;
>>   		return true;
>> +	case TP_HKEY_EV_KEY_FN_ESC:
>> +		/* key press events, we just ignore them as long as the EC
>> +		 * is still reporting them in the normal keyboard stream */
>> +		*send_acpi_ev = false;
>> +		*ignore_acpi_ev = true;
>> +		return true;
>
> No need to duplicate the logic here, just add TP_HKEY_EV_KEY_FN_ESC to the list
> of fallthrough keys (right after TP_HKEY_EV_KEY_FN).
>
I don't see the list that you are referring to?

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel




[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux