public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: hid-lenovo-go: fix LEDS dependencies
@ 2026-03-24 19:20 Arnd Bergmann
  2026-03-25 14:46 ` Mark Pearson
  2026-03-27 10:55 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-03-24 19:20 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Derek J. Clark, Mark Pearson,
	Mario Limonciello, Ethan Tidmore
  Cc: Arnd Bergmann, Aditya Garg, Jonathan Denose, Geert Uytterhoeven,
	linux-input, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The newly added hid-lenovo-go and hid-lenovo-go-s drivers attempt to
'select LEDS_CLASS', which has a dependency on NEW_LEDS, causing a build
failure when NEW_LEDS itself it disabled:

WARNING: unmet direct dependencies detected for LEDS_CLASS
  Depends on [n]: NEW_LEDS [=n]
  Selected by [m]:
  - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
  - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]

WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
  Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=m]
  Selected by [m]:
  - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
  - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
ERROR: modpost: "led_set_brightness_nopm" [drivers/leds/led-class.ko] undefined!
ERROR: modpost: "led_set_brightness" [drivers/leds/led-class.ko] undefined!
ERROR: modpost: "led_get_color_name" [drivers/leds/led-class-multicolor.ko] undefined!
ERROR: modpost: "led_set_brightness" [drivers/leds/led-class-multicolor.ko] undefined!

Device drivers generally should not select other subsystems like this, as
that tends to cause dependency problems including loops in the dependency
graph.

Change these two and the older hid-lenovo driver to behave the same way as all
other HID drivers and use 'depends on LEDS_CLASS' or 'depends on LEDS_CLASS_MULTICOLOR'
instead, which itself has NEW_LEDS and LEDS_CLASS as dependencies.

Fixes: a23f3497bf20 ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
Fixes: d69ccfcbc955 ("HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hid/Kconfig | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 10c12d8e6557..f658ed0168ea 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -610,8 +610,7 @@ config HID_LED
 
 config HID_LENOVO
 	tristate "Lenovo / Thinkpad devices"
-	select NEW_LEDS
-	select LEDS_CLASS
+	depends on LEDS_CLASS
 	help
 	Support for IBM/Lenovo devices that are not fully compliant with HID standard.
 
@@ -626,8 +625,7 @@ config HID_LENOVO
 config HID_LENOVO_GO
 	tristate "HID Driver for Lenovo Legion Go Series Controllers"
 	depends on USB_HID
-	select LEDS_CLASS
-	select LEDS_CLASS_MULTICOLOR
+	depends on LEDS_CLASS_MULTICOLOR
 	help
 	Support for Lenovo Legion Go devices with detachable controllers.
 
@@ -638,8 +636,7 @@ config HID_LENOVO_GO
 config HID_LENOVO_GO_S
 	tristate "HID Driver for Lenovo Legion Go S Controller"
 	depends on USB_HID
-	select LEDS_CLASS
-	select LEDS_CLASS_MULTICOLOR
+	depends on LEDS_CLASS_MULTICOLOR
 	help
 	Support for Lenovo Legion Go S Handheld Console Controller.
 
-- 
2.39.5


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

* Re: [PATCH] HID: hid-lenovo-go: fix LEDS dependencies
  2026-03-24 19:20 [PATCH] HID: hid-lenovo-go: fix LEDS dependencies Arnd Bergmann
@ 2026-03-25 14:46 ` Mark Pearson
  2026-03-27 10:55 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Pearson @ 2026-03-25 14:46 UTC (permalink / raw)
  To: Arnd Bergmann, Jiri Kosina, Benjamin Tissoires, Derek J . Clark,
	Limonciello, Mario, Ethan Tidmore
  Cc: Arnd Bergmann, Aditya Garg, Jonathan Denose, Geert Uytterhoeven,
	linux-input, linux-kernel


On Tue, Mar 24, 2026, at 3:20 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly added hid-lenovo-go and hid-lenovo-go-s drivers attempt to
> 'select LEDS_CLASS', which has a dependency on NEW_LEDS, causing a build
> failure when NEW_LEDS itself it disabled:
>
> WARNING: unmet direct dependencies detected for LEDS_CLASS
>   Depends on [n]: NEW_LEDS [=n]
>   Selected by [m]:
>   - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>   - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>
> WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
>   Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=m]
>   Selected by [m]:
>   - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>   - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
> ERROR: modpost: "led_set_brightness_nopm" [drivers/leds/led-class.ko] 
> undefined!
> ERROR: modpost: "led_set_brightness" [drivers/leds/led-class.ko] 
> undefined!
> ERROR: modpost: "led_get_color_name" 
> [drivers/leds/led-class-multicolor.ko] undefined!
> ERROR: modpost: "led_set_brightness" 
> [drivers/leds/led-class-multicolor.ko] undefined!
>
> Device drivers generally should not select other subsystems like this, as
> that tends to cause dependency problems including loops in the dependency
> graph.
>
> Change these two and the older hid-lenovo driver to behave the same way 
> as all
> other HID drivers and use 'depends on LEDS_CLASS' or 'depends on 
> LEDS_CLASS_MULTICOLOR'
> instead, which itself has NEW_LEDS and LEDS_CLASS as dependencies.
>
> Fixes: a23f3497bf20 ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S 
> Series HID Driver")
> Fixes: d69ccfcbc955 ("HID: hid-lenovo-go: Add Lenovo Legion Go Series 
> HID Driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/hid/Kconfig | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 10c12d8e6557..f658ed0168ea 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -610,8 +610,7 @@ config HID_LED
> 
>  config HID_LENOVO
>  	tristate "Lenovo / Thinkpad devices"
> -	select NEW_LEDS
> -	select LEDS_CLASS
> +	depends on LEDS_CLASS
>  	help
>  	Support for IBM/Lenovo devices that are not fully compliant with HID standard.
> 
> @@ -626,8 +625,7 @@ config HID_LENOVO
>  config HID_LENOVO_GO
>  	tristate "HID Driver for Lenovo Legion Go Series Controllers"
>  	depends on USB_HID
> -	select LEDS_CLASS
> -	select LEDS_CLASS_MULTICOLOR
> +	depends on LEDS_CLASS_MULTICOLOR
>  	help
>  	Support for Lenovo Legion Go devices with detachable controllers.
> 
> @@ -638,8 +636,7 @@ config HID_LENOVO_GO
>  config HID_LENOVO_GO_S
>  	tristate "HID Driver for Lenovo Legion Go S Controller"
>  	depends on USB_HID
> -	select LEDS_CLASS
> -	select LEDS_CLASS_MULTICOLOR
> +	depends on LEDS_CLASS_MULTICOLOR
>  	help
>  	Support for Lenovo Legion Go S Handheld Console Controller.
> 
> -- 
> 2.39.5

Looks good to me.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>

Mark

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

* Re: [PATCH] HID: hid-lenovo-go: fix LEDS dependencies
  2026-03-24 19:20 [PATCH] HID: hid-lenovo-go: fix LEDS dependencies Arnd Bergmann
  2026-03-25 14:46 ` Mark Pearson
@ 2026-03-27 10:55 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2026-03-27 10:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Benjamin Tissoires, Derek J. Clark, Mark Pearson,
	Mario Limonciello, Ethan Tidmore, Arnd Bergmann, Aditya Garg,
	Jonathan Denose, Geert Uytterhoeven, linux-input, linux-kernel

On Tue, 24 Mar 2026, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> The newly added hid-lenovo-go and hid-lenovo-go-s drivers attempt to
> 'select LEDS_CLASS', which has a dependency on NEW_LEDS, causing a build
> failure when NEW_LEDS itself it disabled:
> 
> WARNING: unmet direct dependencies detected for LEDS_CLASS
>   Depends on [n]: NEW_LEDS [=n]
>   Selected by [m]:
>   - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>   - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
> 
> WARNING: unmet direct dependencies detected for LEDS_CLASS_MULTICOLOR
>   Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=m]
>   Selected by [m]:
>   - HID_LENOVO_GO [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
>   - HID_LENOVO_GO_S [=m] && HID_SUPPORT [=y] && HID [=m] && USB_HID [=m]
> ERROR: modpost: "led_set_brightness_nopm" [drivers/leds/led-class.ko] undefined!
> ERROR: modpost: "led_set_brightness" [drivers/leds/led-class.ko] undefined!
> ERROR: modpost: "led_get_color_name" [drivers/leds/led-class-multicolor.ko] undefined!
> ERROR: modpost: "led_set_brightness" [drivers/leds/led-class-multicolor.ko] undefined!
> 
> Device drivers generally should not select other subsystems like this, as
> that tends to cause dependency problems including loops in the dependency
> graph.
> 
> Change these two and the older hid-lenovo driver to behave the same way as all
> other HID drivers and use 'depends on LEDS_CLASS' or 'depends on LEDS_CLASS_MULTICOLOR'
> instead, which itself has NEW_LEDS and LEDS_CLASS as dependencies.
> 
> Fixes: a23f3497bf20 ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
> Fixes: d69ccfcbc955 ("HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Good catch, that escaped my attention during review. Applied to 
hid.git#for-7.1/lenovo-v2, thanks Arnd!

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2026-03-27 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 19:20 [PATCH] HID: hid-lenovo-go: fix LEDS dependencies Arnd Bergmann
2026-03-25 14:46 ` Mark Pearson
2026-03-27 10:55 ` Jiri Kosina

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