* [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
@ 2026-09-08 9:19 Oleg Keri
2026-09-08 9:25 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Oleg Keri @ 2026-09-08 9:19 UTC (permalink / raw)
To: Derek J. Clark, Mark Pearson, Jiri Kosina, Benjamin Tissoires
Cc: linux-input, linux-kernel
The ITE keyboard controller (048d:83db) declares a Wireless Radio Controls
application collection, which hid-input registers as a second input device
advertising KEY_RFKILL. That collection never reports anything: the
airplane mode key is wired to the embedded controller and reaches the host
as EC event 0x19, where the platform driver emits the key.
Map the collection to nothing so hidinput_has_been_populated() discards it
and userspace is left with a single, real KEY_RFKILL source.
Signed-off-by: Oleg Keri <okerixx@gmail.com>
---
drivers/hid/hid-lenovo.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 3976d7b53b14..617bba662659 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -476,6 +476,16 @@ static int lenovo_input_mapping_x1_tab_kbd(struct hid_device *hdev,
return 0;
}
+static int lenovo_input_mapping_yoga7x_g11_kbd(struct hid_device *hdev,
+ struct hid_input *hi, struct hid_field *field,
+ struct hid_usage *usage, unsigned long **bit, int *max)
+{
+ if (field->application == HID_GD_WIRELESS_RADIO_CTLS)
+ return -1;
+
+ return 0;
+}
+
static int lenovo_input_mapping(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
@@ -510,6 +520,8 @@ static int lenovo_input_mapping(struct hid_device *hdev,
case USB_DEVICE_ID_LENOVO_X1_TAB2:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
return lenovo_input_mapping_x1_tab_kbd(hdev, hi, field, usage, bit, max);
+ case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
+ return lenovo_input_mapping_yoga7x_g11_kbd(hdev, hi, field, usage, bit, max);
default:
return 0;
}
@@ -1568,6 +1580,8 @@ static const struct hid_device_id lenovo_devices[] = {
USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X13_TAB) },
{ HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD) },
+ { HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
+ USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD) },
{ }
};
--
2.55.0
base-commit: 5e036ce12de91c6fd674dad33b169c6150be2a7a
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
2026-09-08 9:19 [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11 Oleg Keri
@ 2026-09-08 9:25 ` sashiko-bot
2026-09-09 15:15 ` kernel test robot
2026-09-09 23:48 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-08 9:25 UTC (permalink / raw)
To: Oleg Keri; +Cc: dmitry.torokhov, linux-input
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The macro `I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD` is used but never defined, resulting in a compilation error.
--
commit 4ee02285ee5c593b77b5e50d44817b425e9ba25b
Author: Oleg Keri <okerixx@gmail.com>
HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
The ITE keyboard controller (048d:83db) declares a Wireless Radio Controls
application collection, which hid-input registers as a second input device
advertising KEY_RFKILL. That collection never reports anything: the
airplane mode key is wired to the embedded controller and reaches the host
as EC event 0x19, where the platform driver emits the key.
> diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
> index 3976d7b53b14b..617bba6626592 100644
> --- a/drivers/hid/hid-lenovo.c
> +++ b/drivers/hid/hid-lenovo.c
[ ... ]
> @@ -510,6 +520,8 @@ static int lenovo_input_mapping(struct hid_device *hdev,
> case USB_DEVICE_ID_LENOVO_X1_TAB2:
> case USB_DEVICE_ID_LENOVO_X1_TAB3:
> return lenovo_input_mapping_x1_tab_kbd(hdev, hi, field, usage, bit, max);
> + case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
[Severity: Low]
Where is I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD defined?
It appears this macro is undeclared, which will cause a build failure when
compiling drivers/hid/hid-lenovo.c in lenovo_input_mapping().
> + return lenovo_input_mapping_yoga7x_g11_kbd(hdev, hi, field, usage, bit, max);
> default:
> return 0;
> }
> @@ -1568,6 +1580,8 @@ static const struct hid_device_id lenovo_devices[] = {
> USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X13_TAB) },
> { HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
> USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD) },
> + { HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
> + USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD) },
[Severity: Low]
Will this also fail to compile in lenovo_devices because
I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD is missing its definition?
> { }
> };
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908091907.5653-1-okerixx@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
2026-09-08 9:19 [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11 Oleg Keri
2026-09-08 9:25 ` sashiko-bot
@ 2026-09-09 15:15 ` kernel test robot
2026-09-09 23:48 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-09-09 15:15 UTC (permalink / raw)
To: Oleg Keri, Derek J. Clark, Mark Pearson, Jiri Kosina,
Benjamin Tissoires
Cc: oe-kbuild-all, linux-input, linux-kernel
Hi Oleg,
kernel test robot noticed the following build errors:
[auto build test ERROR on 5e036ce12de91c6fd674dad33b169c6150be2a7a]
url: https://github.com/intel-lab-lkp/linux/commits/Oleg-Keri/HID-lenovo-suppress-phantom-radio-control-input-on-Yoga-Slim-7x-Gen-11/20260908-111907
base: 5e036ce12de91c6fd674dad33b169c6150be2a7a
patch link: https://lore.kernel.org/r/20260908091907.5653-1-okerixx%40gmail.com
patch subject: [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20260909/202609092332.pk1AmDaL-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260909/202609092332.pk1AmDaL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609092332.pk1AmDaL-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/hid/hid-lenovo.c: In function 'lenovo_input_mapping':
>> drivers/hid/hid-lenovo.c:523:14: error: 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD' undeclared (first use in this function); did you mean 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD'?
523 | case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD
drivers/hid/hid-lenovo.c:523:14: note: each undeclared identifier is reported only once for each function it appears in
In file included from drivers/hid/hid-lenovo.c:30:
drivers/hid/hid-lenovo.c: At top level:
>> drivers/hid/hid-lenovo.c:1584:41: error: 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD' undeclared here (not in a function); did you mean 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD'?
1584 | USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD) },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/hid.h:817:64: note: in definition of macro 'HID_DEVICE'
817 | .bus = (b), .group = (g), .vendor = (ven), .product = (prod)
| ^~~~
vim +523 drivers/hid/hid-lenovo.c
488
489 static int lenovo_input_mapping(struct hid_device *hdev,
490 struct hid_input *hi, struct hid_field *field,
491 struct hid_usage *usage, unsigned long **bit, int *max)
492 {
493 switch (hdev->product) {
494 case USB_DEVICE_ID_LENOVO_TPKBD:
495 return lenovo_input_mapping_tpkbd(hdev, hi, field,
496 usage, bit, max);
497 case USB_DEVICE_ID_LENOVO_CUSBKBD:
498 case USB_DEVICE_ID_LENOVO_CBTKBD:
499 return lenovo_input_mapping_cptkbd(hdev, hi, field,
500 usage, bit, max);
501 case USB_DEVICE_ID_LENOVO_TPIIUSBKBD:
502 case USB_DEVICE_ID_LENOVO_TPIIBTKBD:
503 return lenovo_input_mapping_tpIIkbd(hdev, hi, field,
504 usage, bit, max);
505 case USB_DEVICE_ID_IBM_SCROLLPOINT_III:
506 case USB_DEVICE_ID_IBM_SCROLLPOINT_PRO:
507 case USB_DEVICE_ID_IBM_SCROLLPOINT_OPTICAL:
508 case USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL:
509 case USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL_PRO:
510 case USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL:
511 return lenovo_input_mapping_scrollpoint(hdev, hi, field,
512 usage, bit, max);
513 case USB_DEVICE_ID_LENOVO_TP10UBKBD:
514 return lenovo_input_mapping_tp10_ultrabook_kbd(hdev, hi, field,
515 usage, bit, max);
516 case USB_DEVICE_ID_LENOVO_X12_TAB:
517 case USB_DEVICE_ID_LENOVO_X12_TAB2:
518 case USB_DEVICE_ID_LENOVO_X13_TAB:
519 case USB_DEVICE_ID_LENOVO_X1_TAB:
520 case USB_DEVICE_ID_LENOVO_X1_TAB2:
521 case USB_DEVICE_ID_LENOVO_X1_TAB3:
522 return lenovo_input_mapping_x1_tab_kbd(hdev, hi, field, usage, bit, max);
> 523 case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
524 return lenovo_input_mapping_yoga7x_g11_kbd(hdev, hi, field, usage, bit, max);
525 default:
526 return 0;
527 }
528 }
529
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
2026-09-08 9:19 [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11 Oleg Keri
2026-09-08 9:25 ` sashiko-bot
2026-09-09 15:15 ` kernel test robot
@ 2026-09-09 23:48 ` kernel test robot
2026-09-10 6:33 ` Oleg Keri
2 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2026-09-09 23:48 UTC (permalink / raw)
To: Oleg Keri, Derek J. Clark, Mark Pearson, Jiri Kosina,
Benjamin Tissoires
Cc: llvm, oe-kbuild-all, linux-input, linux-kernel
Hi Oleg,
kernel test robot noticed the following build errors:
[auto build test ERROR on 5e036ce12de91c6fd674dad33b169c6150be2a7a]
url: https://github.com/intel-lab-lkp/linux/commits/Oleg-Keri/HID-lenovo-suppress-phantom-radio-control-input-on-Yoga-Slim-7x-Gen-11/20260908-111907
base: 5e036ce12de91c6fd674dad33b169c6150be2a7a
patch link: https://lore.kernel.org/r/20260908091907.5653-1-okerixx%40gmail.com
patch subject: [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260910/202609100719.bu2saXPQ-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project d1c0cc5e760f9cbb68e2acec80a476c4b8b898b7)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260910/202609100719.bu2saXPQ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609100719.bu2saXPQ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/hid/hid-lenovo.c:523:7: error: use of undeclared identifier 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD'
523 | case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-lenovo.c:1584:27: error: use of undeclared identifier 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD'
1584 | USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD) },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hid/hid-lenovo.c:1588:1: error: definition of variable with array type needs an explicit size or an initializer
1588 | MODULE_DEVICE_TABLE(hid, lenovo_devices);
| ^
include/linux/module.h:256:21: note: expanded from macro 'MODULE_DEVICE_TABLE'
256 | static typeof(name) __mod_device_table(type, name) \
| ^
include/linux/module.h:247:2: note: expanded from macro '__mod_device_table'
247 | __PASTE(__mod_device_table__, \
| ^
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:15:1: note: expanded from here
15 | __mod_device_table__kmod_hid_lenovo__hid__lenovo_devices
| ^
3 errors generated.
vim +/I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD +523 drivers/hid/hid-lenovo.c
488
489 static int lenovo_input_mapping(struct hid_device *hdev,
490 struct hid_input *hi, struct hid_field *field,
491 struct hid_usage *usage, unsigned long **bit, int *max)
492 {
493 switch (hdev->product) {
494 case USB_DEVICE_ID_LENOVO_TPKBD:
495 return lenovo_input_mapping_tpkbd(hdev, hi, field,
496 usage, bit, max);
497 case USB_DEVICE_ID_LENOVO_CUSBKBD:
498 case USB_DEVICE_ID_LENOVO_CBTKBD:
499 return lenovo_input_mapping_cptkbd(hdev, hi, field,
500 usage, bit, max);
501 case USB_DEVICE_ID_LENOVO_TPIIUSBKBD:
502 case USB_DEVICE_ID_LENOVO_TPIIBTKBD:
503 return lenovo_input_mapping_tpIIkbd(hdev, hi, field,
504 usage, bit, max);
505 case USB_DEVICE_ID_IBM_SCROLLPOINT_III:
506 case USB_DEVICE_ID_IBM_SCROLLPOINT_PRO:
507 case USB_DEVICE_ID_IBM_SCROLLPOINT_OPTICAL:
508 case USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL:
509 case USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL_PRO:
510 case USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL:
511 return lenovo_input_mapping_scrollpoint(hdev, hi, field,
512 usage, bit, max);
513 case USB_DEVICE_ID_LENOVO_TP10UBKBD:
514 return lenovo_input_mapping_tp10_ultrabook_kbd(hdev, hi, field,
515 usage, bit, max);
516 case USB_DEVICE_ID_LENOVO_X12_TAB:
517 case USB_DEVICE_ID_LENOVO_X12_TAB2:
518 case USB_DEVICE_ID_LENOVO_X13_TAB:
519 case USB_DEVICE_ID_LENOVO_X1_TAB:
520 case USB_DEVICE_ID_LENOVO_X1_TAB2:
521 case USB_DEVICE_ID_LENOVO_X1_TAB3:
522 return lenovo_input_mapping_x1_tab_kbd(hdev, hi, field, usage, bit, max);
> 523 case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
524 return lenovo_input_mapping_yoga7x_g11_kbd(hdev, hi, field, usage, bit, max);
525 default:
526 return 0;
527 }
528 }
529
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11
2026-09-09 23:48 ` kernel test robot
@ 2026-09-10 6:33 ` Oleg Keri
0 siblings, 0 replies; 5+ messages in thread
From: Oleg Keri @ 2026-09-10 6:33 UTC (permalink / raw)
To: lkp; +Cc: oe-kbuild-all, linux-input, linux-kernel, jikos, bentiss
On Thu, 10 Sep 2026 07:48:31 +0800
kernel test robot <lkp@intel.com> wrote:
> >> drivers/hid/hid-lenovo.c:523:7: error: use of undeclared identifier 'I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD'
Correct, and my mistake: this patch was one half of a two-patch change
and I posted only the half that uses the identifier. The #define is
added by the i2c-hid quirk patch, which never made it to the list.
Both are now posted together, in the right order, as v2:
https://lore.kernel.org/all/20260910063051.4556-1-okerixx@gmail.com/
pw-bot: superseded
Thanks,
Oleg
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-10 6:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 9:19 [PATCH] HID: lenovo: suppress phantom radio control input on Yoga Slim 7x Gen 11 Oleg Keri
2026-09-08 9:25 ` sashiko-bot
2026-09-09 15:15 ` kernel test robot
2026-09-09 23:48 ` kernel test robot
2026-09-10 6:33 ` Oleg Keri
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.