X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad
@ 2016-11-08  8:13 Hui Wang
  2016-11-08 13:43 ` Henrique de Moraes Holschuh
  2016-12-12 18:23 ` Darren Hart
  0 siblings, 2 replies; 5+ messages in thread
From: Hui Wang @ 2016-11-08  8:13 UTC (permalink / raw)
  To: dvhart, platform-driver-x86, ibm-acpi-devel; +Cc: hui.wang

Recently we met an issue on lots of Lenovo thinkpad laptops (those
laptops are not released to market yet), the issue is that the
thinkpad_acpi.ko can't be automatically loaded as before.

Through debugging, we found the HKEY_HID is LEN0268 instead of
LEN0068 on those machines, and the MHKV is 0x200 instead of
0x100. So adding the new ID into the driver.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index b65ce75..dbd2e27 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -128,6 +128,7 @@ enum {
 /* ACPI HIDs */
 #define TPACPI_ACPI_IBM_HKEY_HID	"IBM0068"
 #define TPACPI_ACPI_LENOVO_HKEY_HID	"LEN0068"
+#define TPACPI_ACPI_LENOVO_HKEY_V2_HID	"LEN0268"
 #define TPACPI_ACPI_EC_HID		"PNP0C09"
 
 /* Input IDs */
@@ -4143,6 +4144,7 @@ static int hotkey_write(char *buf)
 static const struct acpi_device_id ibm_htk_device_ids[] = {
 	{TPACPI_ACPI_IBM_HKEY_HID, 0},
 	{TPACPI_ACPI_LENOVO_HKEY_HID, 0},
+	{TPACPI_ACPI_LENOVO_HKEY_V2_HID, 0},
 	{"", 0},
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad
  2016-11-08  8:13 [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad Hui Wang
@ 2016-11-08 13:43 ` Henrique de Moraes Holschuh
  2016-11-09  0:34   ` Hui Wang
  2016-12-12 18:23 ` Darren Hart
  1 sibling, 1 reply; 5+ messages in thread
From: Henrique de Moraes Holschuh @ 2016-11-08 13:43 UTC (permalink / raw)
  To: Hui Wang; +Cc: dvhart, platform-driver-x86, ibm-acpi-devel

On Tue, 08 Nov 2016, Hui Wang wrote:

> laptops are not released to market yet), the issue is that the
> thinkpad_acpi.ko can't be automatically loaded as before.
> 
> Through debugging, we found the HKEY_HID is LEN0268 instead of
> LEN0068 on those machines, and the MHKV is 0x200 instead of
> 0x100. So adding the new ID into the driver.

This usually means Lenovo expects to have different windows drivers.
Does thinkpad-acpi work properly on these new thinkpads?

If it does, you have my
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index b65ce75..dbd2e27 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -128,6 +128,7 @@ enum {
>  /* ACPI HIDs */
>  #define TPACPI_ACPI_IBM_HKEY_HID	"IBM0068"
>  #define TPACPI_ACPI_LENOVO_HKEY_HID	"LEN0068"
> +#define TPACPI_ACPI_LENOVO_HKEY_V2_HID	"LEN0268"
>  #define TPACPI_ACPI_EC_HID		"PNP0C09"
>  
>  /* Input IDs */
> @@ -4143,6 +4144,7 @@ static int hotkey_write(char *buf)
>  static const struct acpi_device_id ibm_htk_device_ids[] = {
>  	{TPACPI_ACPI_IBM_HKEY_HID, 0},
>  	{TPACPI_ACPI_LENOVO_HKEY_HID, 0},
> +	{TPACPI_ACPI_LENOVO_HKEY_V2_HID, 0},
>  	{"", 0},
>  };

-- 
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad
  2016-11-08 13:43 ` Henrique de Moraes Holschuh
@ 2016-11-09  0:34   ` Hui Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Hui Wang @ 2016-11-09  0:34 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh; +Cc: dvhart, platform-driver-x86, ibm-acpi-devel

On 11/08/2016 09:43 PM, Henrique de Moraes Holschuh wrote:
> On Tue, 08 Nov 2016, Hui Wang wrote:
>
>> laptops are not released to market yet), the issue is that the
>> thinkpad_acpi.ko can't be automatically loaded as before.
>>
>> Through debugging, we found the HKEY_HID is LEN0268 instead of
>> LEN0068 on those machines, and the MHKV is 0x200 instead of
>> 0x100. So adding the new ID into the driver.
> This usually means Lenovo expects to have different windows drivers.
> Does thinkpad-acpi work properly on these new thinkpads?

Yes, It works well as before.  And thanks for your review.

Cheers,
Hui.
>
> If it does, you have my
> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
>
>> Signed-off-by: Hui Wang <hui.wang@canonical.com>
>> ---
>>   drivers/platform/x86/thinkpad_acpi.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
>> index b65ce75..dbd2e27 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -128,6 +128,7 @@ enum {
>>   /* ACPI HIDs */
>>   #define TPACPI_ACPI_IBM_HKEY_HID	"IBM0068"
>>   #define TPACPI_ACPI_LENOVO_HKEY_HID	"LEN0068"
>> +#define TPACPI_ACPI_LENOVO_HKEY_V2_HID	"LEN0268"
>>   #define TPACPI_ACPI_EC_HID		"PNP0C09"
>>   
>>   /* Input IDs */
>> @@ -4143,6 +4144,7 @@ static int hotkey_write(char *buf)
>>   static const struct acpi_device_id ibm_htk_device_ids[] = {
>>   	{TPACPI_ACPI_IBM_HKEY_HID, 0},
>>   	{TPACPI_ACPI_LENOVO_HKEY_HID, 0},
>> +	{TPACPI_ACPI_LENOVO_HKEY_V2_HID, 0},
>>   	{"", 0},
>>   };

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad
  2016-11-08  8:13 [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad Hui Wang
  2016-11-08 13:43 ` Henrique de Moraes Holschuh
@ 2016-12-12 18:23 ` Darren Hart
  2016-12-13  0:49   ` Hui Wang
  1 sibling, 1 reply; 5+ messages in thread
From: Darren Hart @ 2016-12-12 18:23 UTC (permalink / raw)
  To: Hui Wang; +Cc: dvhart, platform-driver-x86, ibm-acpi-devel

On Tue, Nov 08, 2016 at 04:13:23PM +0800, Hui Wang wrote:
> Recently we met an issue on lots of Lenovo thinkpad laptops (those
> laptops are not released to market yet), the issue is that the
> thinkpad_acpi.ko can't be automatically loaded as before.
> 
> Through debugging, we found the HKEY_HID is LEN0268 instead of
> LEN0068 on those machines, and the MHKV is 0x200 instead of
> 0x100. So adding the new ID into the driver.
> 
> Signed-off-by: Hui Wang <hui.wang@canonical.com>

With Henrique's ack, I've queued this to testing.

However, in the commit message you mention two deltas:

1) HKEY_HID is LEN0268
2) MHKV is 0x200

This patch appears to address only #1. Is another patch needed for #2?

(I'm digging myself out of a deep backlog, so if it's here already, I'll find
it, but it might expedite things to point it out to me).

Thanks for the patch.

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad
  2016-12-12 18:23 ` Darren Hart
@ 2016-12-13  0:49   ` Hui Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Hui Wang @ 2016-12-13  0:49 UTC (permalink / raw)
  To: Darren Hart; +Cc: dvhart, platform-driver-x86, ibm-acpi-devel

On 12/13/2016 02:23 AM, Darren Hart wrote:
> On Tue, Nov 08, 2016 at 04:13:23PM +0800, Hui Wang wrote:
>> Recently we met an issue on lots of Lenovo thinkpad laptops (those
>> laptops are not released to market yet), the issue is that the
>> thinkpad_acpi.ko can't be automatically loaded as before.
>>
>> Through debugging, we found the HKEY_HID is LEN0268 instead of
>> LEN0068 on those machines, and the MHKV is 0x200 instead of
>> 0x100. So adding the new ID into the driver.
>>
>> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> With Henrique's ack, I've queued this to testing.
>
> However, in the commit message you mention two deltas:
>
> 1) HKEY_HID is LEN0268
> 2) MHKV is 0x200
>
> This patch appears to address only #1. Is another patch needed for #2?

The #2 was already addressed by the commit:

commit 0118c2d3eac0545d4095877e5a015b5dc763b3c2
Author: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Date:   Wed Jun 8 10:54:25 2016 -0400

     thinkpad_acpi: Add support for HKEY version 0x200

     Lenovo Thinkpad devices T460, T460s, T460p, T560, X260 use
     HKEY version 0x200 without adaptive keyboard.

     HKEY version 0x200 has method MHKA with one parameter value.
     Passing parameter value 1 will get hotkey_all_mask (the same like
     HKEY version 0x100 without parameter). Passing parameter value 2 to
     MHKA method will retrieve hotkey_all_adaptive_mask. If 0 is returned in
     that case there is no adaptive keyboard available.


It looks like the Lenovo machines have the change for HKEY_HID and MHKV 
as below:

in the past: HKEY_HID=LEN0068  MHKV=0x100
about one year ago: HKEY_HID=LEN0068 MHKV=0x200
recently: HKEY_HID=LEN0268 MHKV=0x200


Cheers,
Hui.

>
> (I'm digging myself out of a deep backlog, so if it's here already, I'll find
> it, but it might expedite things to point it out to me).
>
> Thanks for the patch.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-13  0:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08  8:13 [PATCH] thinkpad_acpi: adding new hotkey ID for Lenovo thinkpad Hui Wang
2016-11-08 13:43 ` Henrique de Moraes Holschuh
2016-11-09  0:34   ` Hui Wang
2016-12-12 18:23 ` Darren Hart
2016-12-13  0:49   ` Hui Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox