Skip to content

Commit 413a088

Browse files
soyersoyermehmetb0
authored andcommitted
platform/x86: lenovo-ymc: Ignore the 0x0 state
BugLink: https://bugs.launchpad.net/bugs/2089884 [ Upstream commit d9dca21 ] While booting, Lenovo 14ARB7 reports 'lenovo-ymc: Unknown key 0 pressed' warning. This is caused by lenovo_ymc_probe() calling lenovo_ymc_notify() at probe time to get the initial tablet-mode-switch state and the key-code lenovo_ymc_notify() reads from the firmware is not initialized at probe time yet on the Lenovo 14ARB7. The hardware/firmware does an ACPI notify on the WMI device itself when it initializes the tablet-mode-switch state later on. Add 0x0 YMC state to the sparse keymap to silence the warning. Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/08ab73bb74c4ad448409f2ce707b1148874a05ce.1724340562.git.soyer@irl.hu [hdegoede@redhat.com: Reword commit message] Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
1 parent 3cc63a7 commit 413a088

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/platform/x86/lenovo-ymc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ struct lenovo_ymc_private {
4343
};
4444

4545
static const struct key_entry lenovo_ymc_keymap[] = {
46+
/* Ignore the uninitialized state */
47+
{ KE_IGNORE, 0x00 },
4648
/* Laptop */
4749
{ KE_SW, 0x01, { .sw = { SW_TABLET_MODE, 0 } } },
4850
/* Tablet */

0 commit comments

Comments
 (0)