* [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
@ 2018-01-12 11:04 David Herrmann
2018-01-12 12:06 ` Henrique de Moraes Holschuh
2018-01-12 13:50 ` Andy Shevchenko
0 siblings, 2 replies; 10+ messages in thread
From: David Herrmann @ 2018-01-12 11:04 UTC (permalink / raw)
To: Platform Driver
Cc: Henrique de Moraes Holschuh, Andy Shevchenko, Darren Hart,
linux-kernel, David Herrmann, Matthew Thode
This patch prevents the thinkpad_acpi driver from warning about 2 event
codes returned for keyboard palm-detection. No behavioral changes,
other than suppressing the warning in the kernel log. The events are
still forwarded via acpi-netlink channels.
We could, optionally, decide to forward the event through a
input-switch on the tpacpi input device. However, so far no suitable
input-code exists, and no similar drivers report such events. Hence,
leave it an acpi event for now.
Note that the event-codes are named based on empirical studies. On the
ThinkPad X1 5th Gen the sensor can be found underneath the arrow key.
Cc: Matthew Thode <mthode@mthode.org>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
drivers/platform/x86/thinkpad_acpi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 117be48ff4de..128f91af716e 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -214,6 +214,10 @@ enum tpacpi_hkey_event_t {
/* AC-related events */
TP_HKEY_EV_AC_CHANGED = 0x6040, /* AC status changed */
+ /* Further user-interface events */
+ TP_HKEY_EV_PALM_DETECTED = 0x60b0, /* palm hoveres keyboard */
+ TP_HKEY_EV_PALM_UNDETECTED = 0x60b1, /* palm removed */
+
/* Misc */
TP_HKEY_EV_RFKILL_CHANGED = 0x7000, /* rfkill switch changed */
};
@@ -4079,6 +4083,12 @@ static bool hotkey_notify_6xxx(const u32 hkey,
*send_acpi_ev = false;
break;
+ case TP_HKEY_EV_PALM_DETECTED:
+ case TP_HKEY_EV_PALM_UNDETECTED:
+ /* palm detected hovering the keyboard, forward to user-space
+ * via netlink for consumption */
+ return true;
+
default:
pr_warn("unknown possible thermal alarm or keyboard event received\n");
known = false;
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-01-12 11:04 [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection David Herrmann
@ 2018-01-12 12:06 ` Henrique de Moraes Holschuh
2018-01-12 13:50 ` Andy Shevchenko
1 sibling, 0 replies; 10+ messages in thread
From: Henrique de Moraes Holschuh @ 2018-01-12 12:06 UTC (permalink / raw)
To: David Herrmann
Cc: Platform Driver, Henrique de Moraes Holschuh, Andy Shevchenko,
Darren Hart, linux-kernel, Matthew Thode
On Fri, 12 Jan 2018, David Herrmann wrote:
> This patch prevents the thinkpad_acpi driver from warning about 2 event
> codes returned for keyboard palm-detection. No behavioral changes,
> other than suppressing the warning in the kernel log. The events are
> still forwarded via acpi-netlink channels.
>
> We could, optionally, decide to forward the event through a
> input-switch on the tpacpi input device. However, so far no suitable
> input-code exists, and no similar drivers report such events. Hence,
> leave it an acpi event for now.
>
> Note that the event-codes are named based on empirical studies. On the
> ThinkPad X1 5th Gen the sensor can be found underneath the arrow key.
>
> Cc: Matthew Thode <mthode@mthode.org>
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Well, we certainly should drop the warning, and I am fine with the
current name for the events (they are not ABI in any way, so we can
change that at any time if we find out it should be named differently).
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
> ---
> drivers/platform/x86/thinkpad_acpi.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 117be48ff4de..128f91af716e 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -214,6 +214,10 @@ enum tpacpi_hkey_event_t {
> /* AC-related events */
> TP_HKEY_EV_AC_CHANGED = 0x6040, /* AC status changed */
>
> + /* Further user-interface events */
> + TP_HKEY_EV_PALM_DETECTED = 0x60b0, /* palm hoveres keyboard */
> + TP_HKEY_EV_PALM_UNDETECTED = 0x60b1, /* palm removed */
> +
> /* Misc */
> TP_HKEY_EV_RFKILL_CHANGED = 0x7000, /* rfkill switch changed */
> };
> @@ -4079,6 +4083,12 @@ static bool hotkey_notify_6xxx(const u32 hkey,
> *send_acpi_ev = false;
> break;
>
> + case TP_HKEY_EV_PALM_DETECTED:
> + case TP_HKEY_EV_PALM_UNDETECTED:
> + /* palm detected hovering the keyboard, forward to user-space
> + * via netlink for consumption */
> + return true;
> +
> default:
> pr_warn("unknown possible thermal alarm or keyboard event received\n");
> known = false;
--
Henrique Holschuh
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-01-12 11:04 [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection David Herrmann
2018-01-12 12:06 ` Henrique de Moraes Holschuh
@ 2018-01-12 13:50 ` Andy Shevchenko
2018-01-12 14:07 ` David Herrmann
1 sibling, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2018-01-12 13:50 UTC (permalink / raw)
To: David Herrmann
Cc: Platform Driver, Henrique de Moraes Holschuh, Andy Shevchenko,
Darren Hart, Linux Kernel Mailing List, Matthew Thode
On Fri, Jan 12, 2018 at 1:04 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> This patch prevents the thinkpad_acpi driver from warning about 2 event
> codes returned for keyboard palm-detection. No behavioral changes,
> other than suppressing the warning in the kernel log. The events are
> still forwarded via acpi-netlink channels.
>
> We could, optionally, decide to forward the event through a
> input-switch on the tpacpi input device. However, so far no suitable
> input-code exists, and no similar drivers report such events. Hence,
> leave it an acpi event for now.
>
> Note that the event-codes are named based on empirical studies. On the
> ThinkPad X1 5th Gen the sensor can be found underneath the arrow key.
>
> Cc: Matthew Thode <mthode@mthode.org>
Shouldn't be Suggested-by or even Signed-off-by?
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> + case TP_HKEY_EV_PALM_DETECTED:
> + case TP_HKEY_EV_PALM_UNDETECTED:
> + /* palm detected hovering the keyboard, forward to user-space
> + * via netlink for consumption */
Comment style is
/*
* Multi line comment.
* This is an example.
*/
> + return true;
I can fix the latter, but I have to be sure all credits are given properly.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-01-12 13:50 ` Andy Shevchenko
@ 2018-01-12 14:07 ` David Herrmann
2018-01-13 6:33 ` Matthew Thode
0 siblings, 1 reply; 10+ messages in thread
From: David Herrmann @ 2018-01-12 14:07 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Platform Driver, Henrique de Moraes Holschuh, Andy Shevchenko,
Darren Hart, Linux Kernel Mailing List, Matthew Thode
Hi Andy
On Fri, Jan 12, 2018 at 2:50 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, Jan 12, 2018 at 1:04 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
>> This patch prevents the thinkpad_acpi driver from warning about 2 event
>> codes returned for keyboard palm-detection. No behavioral changes,
>> other than suppressing the warning in the kernel log. The events are
>> still forwarded via acpi-netlink channels.
>>
>> We could, optionally, decide to forward the event through a
>> input-switch on the tpacpi input device. However, so far no suitable
>> input-code exists, and no similar drivers report such events. Hence,
>> leave it an acpi event for now.
>>
>> Note that the event-codes are named based on empirical studies. On the
>> ThinkPad X1 5th Gen the sensor can be found underneath the arrow key.
>>
>
>> Cc: Matthew Thode <mthode@mthode.org>
>
> Shouldn't be Suggested-by or even Signed-off-by?
The patch is different (Matthew originally suppressed the ACPI event),
so I did not copy the sign-off. Please add Suggested-by, if that is an
acceptable tag.
>> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
>
>
>> + case TP_HKEY_EV_PALM_DETECTED:
>> + case TP_HKEY_EV_PALM_UNDETECTED:
>
>> + /* palm detected hovering the keyboard, forward to user-space
>> + * via netlink for consumption */
>
> Comment style is
> /*
> * Multi line comment.
> * This is an example.
> */
All other 6 comments in this function follow the style I used here, so
I tried to be consistent. But feel free to amend this change.
Thanks a lot!
David
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-01-12 14:07 ` David Herrmann
@ 2018-01-13 6:33 ` Matthew Thode
2018-02-05 4:56 ` Matthew Thode
2018-02-05 5:01 ` Matthew Thode
0 siblings, 2 replies; 10+ messages in thread
From: Matthew Thode @ 2018-01-13 6:33 UTC (permalink / raw)
To: David Herrmann
Cc: Andy Shevchenko, Platform Driver, Henrique de Moraes Holschuh,
Andy Shevchenko, Darren Hart, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
On 18-01-12 15:07:12, David Herrmann wrote:
> Hi Andy
>
> On Fri, Jan 12, 2018 at 2:50 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Fri, Jan 12, 2018 at 1:04 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> >> Cc: Matthew Thode <mthode@mthode.org>
> >
> > Shouldn't be Suggested-by or even Signed-off-by?
>
> The patch is different (Matthew originally suppressed the ACPI event),
> so I did not copy the sign-off. Please add Suggested-by, if that is an
> acceptable tag.
>
> >> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> >
> >
> >> + case TP_HKEY_EV_PALM_DETECTED:
> >> + case TP_HKEY_EV_PALM_UNDETECTED:
> >
> >> + /* palm detected hovering the keyboard, forward to user-space
> >> + * via netlink for consumption */
> >
> > Comment style is
> > /*
> > * Multi line comment.
> > * This is an example.
> > */
>
> All other 6 comments in this function follow the style I used here, so
> I tried to be consistent. But feel free to amend this change.
>
I'm fine with a signed-off-by or tested-by or suggested-by. There is a
spelling mistake though, 'hoveres' should be hovers.
--
Matthew Thode
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-01-13 6:33 ` Matthew Thode
@ 2018-02-05 4:56 ` Matthew Thode
2018-02-05 5:01 ` Matthew Thode
1 sibling, 0 replies; 10+ messages in thread
From: Matthew Thode @ 2018-02-05 4:56 UTC (permalink / raw)
To: David Herrmann
Cc: Andy Shevchenko, Platform Driver, Henrique de Moraes Holschuh,
Andy Shevchenko, Darren Hart, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
On 18-01-13 00:33:09, Matthew Thode wrote:
> On 18-01-12 15:07:12, David Herrmann wrote:
> > Hi Andy
> >
> > On Fri, Jan 12, 2018 at 2:50 PM, Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Fri, Jan 12, 2018 at 1:04 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> > >> Cc: Matthew Thode <mthode@mthode.org>
> > >
> > > Shouldn't be Suggested-by or even Signed-off-by?
> >
> > The patch is different (Matthew originally suppressed the ACPI event),
> > so I did not copy the sign-off. Please add Suggested-by, if that is an
> > acceptable tag.
> >
> > >> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> > >
> > >
> > >> + case TP_HKEY_EV_PALM_DETECTED:
> > >> + case TP_HKEY_EV_PALM_UNDETECTED:
> > >
> > >> + /* palm detected hovering the keyboard, forward to user-space
> > >> + * via netlink for consumption */
> > >
> > > Comment style is
> > > /*
> > > * Multi line comment.
> > > * This is an example.
> > > */
> >
> > All other 6 comments in this function follow the style I used here, so
> > I tried to be consistent. But feel free to amend this change.
> >
>
> I'm fine with a signed-off-by or tested-by or suggested-by. There is a
> spelling mistake though, 'hoveres' should be hovers.
>
Is there anything else I can do here? I'm not sure any of us have the
ability to find out what lenovo actually wants this for.
--
Matthew Thode (prometheanfire)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-01-13 6:33 ` Matthew Thode
2018-02-05 4:56 ` Matthew Thode
@ 2018-02-05 5:01 ` Matthew Thode
2018-02-05 11:34 ` Henrique de Moraes Holschuh
1 sibling, 1 reply; 10+ messages in thread
From: Matthew Thode @ 2018-02-05 5:01 UTC (permalink / raw)
To: David Herrmann
Cc: Andy Shevchenko, Platform Driver, Henrique de Moraes Holschuh,
Andy Shevchenko, Darren Hart, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On 18-01-13 00:33:09, Matthew Thode wrote:
> On 18-01-12 15:07:12, David Herrmann wrote:
> > Hi Andy
> >
> > On Fri, Jan 12, 2018 at 2:50 PM, Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Fri, Jan 12, 2018 at 1:04 PM, David Herrmann <dh.herrmann@gmail.com> wrote:
> > >> Cc: Matthew Thode <mthode@mthode.org>
> > >
> > > Shouldn't be Suggested-by or even Signed-off-by?
> >
> > The patch is different (Matthew originally suppressed the ACPI event),
> > so I did not copy the sign-off. Please add Suggested-by, if that is an
> > acceptable tag.
> >
> > >> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> > >
> > >
> > >> + case TP_HKEY_EV_PALM_DETECTED:
> > >> + case TP_HKEY_EV_PALM_UNDETECTED:
> > >
> > >> + /* palm detected hovering the keyboard, forward to user-space
> > >> + * via netlink for consumption */
> > >
> > > Comment style is
> > > /*
> > > * Multi line comment.
> > > * This is an example.
> > > */
> >
> > All other 6 comments in this function follow the style I used here, so
> > I tried to be consistent. But feel free to amend this change.
> >
>
> I'm fine with a signed-off-by or tested-by or suggested-by. There is a
> spelling mistake though, 'hoveres' should be hovers.
>
Is there anything else I can do here? I'm not sure any of us have the
ability to find out what lenovo actualy wants this for.
Sorry for the double reply, dmarc can be hell.
--
Matthew Thode
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-02-05 5:01 ` Matthew Thode
@ 2018-02-05 11:34 ` Henrique de Moraes Holschuh
2018-02-05 13:08 ` Andy Shevchenko
0 siblings, 1 reply; 10+ messages in thread
From: Henrique de Moraes Holschuh @ 2018-02-05 11:34 UTC (permalink / raw)
To: Matthew Thode
Cc: David Herrmann, Andy Shevchenko, Platform Driver,
Henrique de Moraes Holschuh, Andy Shevchenko, Darren Hart,
Linux Kernel Mailing List
> > I'm fine with a signed-off-by or tested-by or suggested-by. There is a
> > spelling mistake though, 'hoveres' should be hovers.
>
> Is there anything else I can do here? I'm not sure any of us have the
> ability to find out what lenovo actualy wants this for.
I have already acked the patch, so Darren or Andy should pick it up
sooner or later for merging into the subsystem tree...
But if you wouldn't mind doing so, you could send a V2 with all acks,
tested-by/suggested-by/whatever added, as well as that minor spelling
mistake correction... I am not sure this is necessary, though.
Andy, Daren?
--
Henrique Holschuh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-02-05 11:34 ` Henrique de Moraes Holschuh
@ 2018-02-05 13:08 ` Andy Shevchenko
2018-02-05 14:27 ` Matthew Thode
0 siblings, 1 reply; 10+ messages in thread
From: Andy Shevchenko @ 2018-02-05 13:08 UTC (permalink / raw)
To: Henrique de Moraes Holschuh
Cc: Matthew Thode, David Herrmann, Platform Driver,
Henrique de Moraes Holschuh, Andy Shevchenko, Darren Hart,
Linux Kernel Mailing List
On Mon, Feb 5, 2018 at 1:34 PM, Henrique de Moraes Holschuh
<hmh@hmh.eng.br> wrote:
>> > I'm fine with a signed-off-by or tested-by or suggested-by. There is a
>> > spelling mistake though, 'hoveres' should be hovers.
>>
>> Is there anything else I can do here? I'm not sure any of us have the
>> ability to find out what lenovo actualy wants this for.
>
> I have already acked the patch, so Darren or Andy should pick it up
> sooner or later for merging into the subsystem tree...
>
> But if you wouldn't mind doing so, you could send a V2 with all acks,
> tested-by/suggested-by/whatever added, as well as that minor spelling
> mistake correction... I am not sure this is necessary, though.
>
> Andy, Daren?
The following one already in for-next, meaning it's about to be upstream soon
587d8628fb71 platform/x86: thinkpad_acpi: suppress warning about palm detection
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection
2018-02-05 13:08 ` Andy Shevchenko
@ 2018-02-05 14:27 ` Matthew Thode
0 siblings, 0 replies; 10+ messages in thread
From: Matthew Thode @ 2018-02-05 14:27 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Henrique de Moraes Holschuh, David Herrmann, Platform Driver,
Henrique de Moraes Holschuh, Andy Shevchenko, Darren Hart,
Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
On 18-02-05 15:08:25, Andy Shevchenko wrote:
> On Mon, Feb 5, 2018 at 1:34 PM, Henrique de Moraes Holschuh
> <hmh@hmh.eng.br> wrote:
> >> > I'm fine with a signed-off-by or tested-by or suggested-by. There is a
> >> > spelling mistake though, 'hoveres' should be hovers.
> >>
> >> Is there anything else I can do here? I'm not sure any of us have the
> >> ability to find out what lenovo actualy wants this for.
> >
> > I have already acked the patch, so Darren or Andy should pick it up
> > sooner or later for merging into the subsystem tree...
> >
> > But if you wouldn't mind doing so, you could send a V2 with all acks,
> > tested-by/suggested-by/whatever added, as well as that minor spelling
> > mistake correction... I am not sure this is necessary, though.
> >
>
> > Andy, Daren?
>
> The following one already in for-next, meaning it's about to be upstream soon
> 587d8628fb71 platform/x86: thinkpad_acpi: suppress warning about palm detection
>
Thanks, if there's nothing left for me to do I'll just leave it then.
--
Matthew Thode
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-02-05 14:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12 11:04 [PATCH] platform/x86: thinkpad_acpi: suppress warning about palm detection David Herrmann
2018-01-12 12:06 ` Henrique de Moraes Holschuh
2018-01-12 13:50 ` Andy Shevchenko
2018-01-12 14:07 ` David Herrmann
2018-01-13 6:33 ` Matthew Thode
2018-02-05 4:56 ` Matthew Thode
2018-02-05 5:01 ` Matthew Thode
2018-02-05 11:34 ` Henrique de Moraes Holschuh
2018-02-05 13:08 ` Andy Shevchenko
2018-02-05 14:27 ` Matthew Thode
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox