* [PATCH] platform/x86: lenovo-ymc: Ignore the 0x0 state
@ 2024-08-22 15:38 Gergo Koteles
2024-08-22 15:56 ` Ilpo Järvinen
2024-09-04 16:59 ` Hans de Goede
0 siblings, 2 replies; 3+ messages in thread
From: Gergo Koteles @ 2024-08-22 15:38 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: platform-driver-x86, linux-kernel, Gergo Koteles
While booting, Lenovo 14ARB7 reports 'lenovo-ymc: Unknown key 0 pressed'
warning. Because lenovo_ymc_probe() calls lenovo_ymc_notify() and that
time the YMC part is not triggered yet (which is mandatory for this
model). At the end of lenovo_ymc_notify() YMC is triggered by the
ideapad-laptop driver and then lenovo_ymc_notify() will be called by WMI
to report the actual value.
Add 0x0 YMC state to the sparse keymap to ignore.
Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
drivers/platform/x86/lenovo-ymc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/lenovo-ymc.c b/drivers/platform/x86/lenovo-ymc.c
index e0bbd6a14a89..bd9f95404c7c 100644
--- a/drivers/platform/x86/lenovo-ymc.c
+++ b/drivers/platform/x86/lenovo-ymc.c
@@ -43,6 +43,8 @@ struct lenovo_ymc_private {
};
static const struct key_entry lenovo_ymc_keymap[] = {
+ /* Ignore the uninitialized state */
+ { KE_IGNORE, 0x00 },
/* Laptop */
{ KE_SW, 0x01, { .sw = { SW_TABLET_MODE, 0 } } },
/* Tablet */
--
2.46.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: lenovo-ymc: Ignore the 0x0 state
2024-08-22 15:38 [PATCH] platform/x86: lenovo-ymc: Ignore the 0x0 state Gergo Koteles
@ 2024-08-22 15:56 ` Ilpo Järvinen
2024-09-04 16:59 ` Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2024-08-22 15:56 UTC (permalink / raw)
To: Gergo Koteles; +Cc: Hans de Goede, platform-driver-x86, LKML
Hi,
A quick comment as I failed to understand your commit message.
On Thu, 22 Aug 2024, Gergo Koteles wrote:
> While booting, Lenovo 14ARB7 reports 'lenovo-ymc: Unknown key 0 pressed'
> warning. Because lenovo_ymc_probe() calls lenovo_ymc_notify() and that
> time the YMC part is not triggered yet
This sentence should be rephrased as is it doesn't seem to make sense.
Or is the . before it in wrong place and should be removed?
> (which is mandatory for this
> model).
If the latter of the options above is the right one, I cannot connect the
meaning of this parenthesis part with the full sentence. That is, what is
mandatory in that case? So you might have to rephrase it as well.
> At the end of lenovo_ymc_notify() YMC is triggered by the
> ideapad-laptop driver and then lenovo_ymc_notify() will be called by WMI
> to report the actual value.
--
i.
>
> Add 0x0 YMC state to the sparse keymap to ignore.
>
> Signed-off-by: Gergo Koteles <soyer@irl.hu>
> ---
> drivers/platform/x86/lenovo-ymc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/lenovo-ymc.c b/drivers/platform/x86/lenovo-ymc.c
> index e0bbd6a14a89..bd9f95404c7c 100644
> --- a/drivers/platform/x86/lenovo-ymc.c
> +++ b/drivers/platform/x86/lenovo-ymc.c
> @@ -43,6 +43,8 @@ struct lenovo_ymc_private {
> };
>
> static const struct key_entry lenovo_ymc_keymap[] = {
> + /* Ignore the uninitialized state */
> + { KE_IGNORE, 0x00 },
> /* Laptop */
> { KE_SW, 0x01, { .sw = { SW_TABLET_MODE, 0 } } },
> /* Tablet */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: lenovo-ymc: Ignore the 0x0 state
2024-08-22 15:38 [PATCH] platform/x86: lenovo-ymc: Ignore the 0x0 state Gergo Koteles
2024-08-22 15:56 ` Ilpo Järvinen
@ 2024-09-04 16:59 ` Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2024-09-04 16:59 UTC (permalink / raw)
To: Gergo Koteles, Ilpo Järvinen; +Cc: platform-driver-x86, linux-kernel
Hi,
On 8/22/24 5:38 PM, Gergo Koteles wrote:
> While booting, Lenovo 14ARB7 reports 'lenovo-ymc: Unknown key 0 pressed'
> warning. Because lenovo_ymc_probe() calls lenovo_ymc_notify() and that
> time the YMC part is not triggered yet (which is mandatory for this
> model). At the end of lenovo_ymc_notify() YMC is triggered by the
> ideapad-laptop driver and then lenovo_ymc_notify() will be called by WMI
> to report the actual value.
>
> Add 0x0 YMC state to the sparse keymap to ignore.
>
> Signed-off-by: Gergo Koteles <soyer@irl.hu>
Thank you for your patch, I've improved the commit message to address
Ilpo's review comments and applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=a8a2253e84dc62b0d50943408c480188a0086263
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/lenovo-ymc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/lenovo-ymc.c b/drivers/platform/x86/lenovo-ymc.c
> index e0bbd6a14a89..bd9f95404c7c 100644
> --- a/drivers/platform/x86/lenovo-ymc.c
> +++ b/drivers/platform/x86/lenovo-ymc.c
> @@ -43,6 +43,8 @@ struct lenovo_ymc_private {
> };
>
> static const struct key_entry lenovo_ymc_keymap[] = {
> + /* Ignore the uninitialized state */
> + { KE_IGNORE, 0x00 },
> /* Laptop */
> { KE_SW, 0x01, { .sw = { SW_TABLET_MODE, 0 } } },
> /* Tablet */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-04 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22 15:38 [PATCH] platform/x86: lenovo-ymc: Ignore the 0x0 state Gergo Koteles
2024-08-22 15:56 ` Ilpo Järvinen
2024-09-04 16:59 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox