* [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies
@ 2025-04-14 13:24 Tzung-Bi Shih
2025-04-14 13:24 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency Tzung-Bi Shih
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2025-04-14 13:24 UTC (permalink / raw)
To: bleung, sfr; +Cc: chrome-platform, tzungbi, linux-next, srosek
The first patch removes a redundant dependency.
The second patch fixes the build errors discovered in [1].
[1]: https://lore.kernel.org/chrome-platform/ed8adc69-c505-4108-bf63-92911b0395c7@infradead.org/T/#u
Tzung-Bi Shih (2):
platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
platform/chrome: cros_kbd_led_backlight: Fix build dependencies
drivers/platform/chrome/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
2025-04-14 13:24 [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
@ 2025-04-14 13:24 ` Tzung-Bi Shih
2025-04-14 22:10 ` Randy Dunlap
2025-04-14 13:24 ` [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies Tzung-Bi Shih
2025-04-15 2:45 ` [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
2 siblings, 1 reply; 7+ messages in thread
From: Tzung-Bi Shih @ 2025-04-14 13:24 UTC (permalink / raw)
To: bleung, sfr; +Cc: chrome-platform, tzungbi, linux-next, srosek
After applying 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight:
Remove OF match"), cros_kbd_led_backlight no longer depends on CROS_EC
directly.
Remove the redundant dependency.
Fixes: 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight: Remove OF match")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
drivers/platform/chrome/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index f523ae3d3be0..1614b9d3c5c2 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -161,7 +161,7 @@ config CROS_EC_PROTO
config CROS_KBD_LED_BACKLIGHT
tristate "Backlight LED support for Chrome OS keyboards"
- depends on LEDS_CLASS && (ACPI || CROS_EC || MFD_CROS_EC_DEV)
+ depends on LEDS_CLASS && (ACPI || MFD_CROS_EC_DEV)
help
This option enables support for the keyboard backlight LEDs on
select Chrome OS systems.
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
2025-04-14 13:24 [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
2025-04-14 13:24 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency Tzung-Bi Shih
@ 2025-04-14 13:24 ` Tzung-Bi Shih
2025-04-14 22:11 ` Randy Dunlap
2025-04-15 2:45 ` [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
2 siblings, 1 reply; 7+ messages in thread
From: Tzung-Bi Shih @ 2025-04-14 13:24 UTC (permalink / raw)
To: bleung, sfr; +Cc: chrome-platform, tzungbi, linux-next, srosek
ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")
allows CROS_EC_PROTO to be a module.
The config is possible to be:
- CONFIG_ACPI=y
- CONFIG_CROS_EC=m
- CONFIG_MFD_CROS_EC_DEV=m
- CONFIG_CROS_EC_PROTO=m
- CONFIG_CROS_KBD_LED_BACKLIGHT=y
As a result:
ld: vmlinux.o: in function `keyboard_led_set_brightness_ec_pwm':
cros_kbd_led_backlight.c:(.text+0x3554e4c): undefined reference to `cros_ec_cmd_xfer_status'
ld: vmlinux.o: in function `keyboard_led_get_brightness_ec_pwm':
cros_kbd_led_backlight.c:(.text+0x3554f41): undefined reference to `cros_ec_cmd_xfer_status'
The built-in code in CROS_KBD_LED_BACKLIGHT can't find symbols defined in
the module CROS_EC_PROTO.
Let A=ACPI (bool), M=MFD_CROS_EC_DEV (tristate), and
K=CROS_KBD_LED_BACKLIGHT (tristate). The possible values are:
| A | M | choice for K |
------------------------
| y | y | y/m/n |
| y | m | m/n |
| y | n | y/m/n |
| n | y | y/m/n |
| n | m | m/n |
| n | n | n |
Fix the dependencies in the Kconfig.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/chrome-platform/ed8adc69-c505-4108-bf63-92911b0395c7@infradead.org/T/#u
Fixes: ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
drivers/platform/chrome/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index 1614b9d3c5c2..10941ac37305 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -161,7 +161,8 @@ config CROS_EC_PROTO
config CROS_KBD_LED_BACKLIGHT
tristate "Backlight LED support for Chrome OS keyboards"
- depends on LEDS_CLASS && (ACPI || MFD_CROS_EC_DEV)
+ depends on LEDS_CLASS
+ depends on MFD_CROS_EC_DEV || (MFD_CROS_EC_DEV=n && ACPI)
help
This option enables support for the keyboard backlight LEDs on
select Chrome OS systems.
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
2025-04-14 13:24 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency Tzung-Bi Shih
@ 2025-04-14 22:10 ` Randy Dunlap
0 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2025-04-14 22:10 UTC (permalink / raw)
To: Tzung-Bi Shih, bleung, sfr; +Cc: chrome-platform, linux-next, srosek
On 4/14/25 6:24 AM, Tzung-Bi Shih wrote:
> After applying 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight:
> Remove OF match"), cros_kbd_led_backlight no longer depends on CROS_EC
> directly.
>
> Remove the redundant dependency.
>
> Fixes: 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight: Remove OF match")
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/platform/chrome/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
> index f523ae3d3be0..1614b9d3c5c2 100644
> --- a/drivers/platform/chrome/Kconfig
> +++ b/drivers/platform/chrome/Kconfig
> @@ -161,7 +161,7 @@ config CROS_EC_PROTO
>
> config CROS_KBD_LED_BACKLIGHT
> tristate "Backlight LED support for Chrome OS keyboards"
> - depends on LEDS_CLASS && (ACPI || CROS_EC || MFD_CROS_EC_DEV)
> + depends on LEDS_CLASS && (ACPI || MFD_CROS_EC_DEV)
> help
> This option enables support for the keyboard backlight LEDs on
> select Chrome OS systems.
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
2025-04-14 13:24 ` [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies Tzung-Bi Shih
@ 2025-04-14 22:11 ` Randy Dunlap
2025-04-15 2:35 ` Tzung-Bi Shih
0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2025-04-14 22:11 UTC (permalink / raw)
To: Tzung-Bi Shih, bleung, sfr; +Cc: chrome-platform, linux-next, srosek
On 4/14/25 6:24 AM, Tzung-Bi Shih wrote:
> ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")
> allows CROS_EC_PROTO to be a module.
>
> The config is possible to be:
> - CONFIG_ACPI=y
> - CONFIG_CROS_EC=m
> - CONFIG_MFD_CROS_EC_DEV=m
> - CONFIG_CROS_EC_PROTO=m
> - CONFIG_CROS_KBD_LED_BACKLIGHT=y
>
> As a result:
> ld: vmlinux.o: in function `keyboard_led_set_brightness_ec_pwm':
> cros_kbd_led_backlight.c:(.text+0x3554e4c): undefined reference to `cros_ec_cmd_xfer_status'
> ld: vmlinux.o: in function `keyboard_led_get_brightness_ec_pwm':
> cros_kbd_led_backlight.c:(.text+0x3554f41): undefined reference to `cros_ec_cmd_xfer_status'
>
> The built-in code in CROS_KBD_LED_BACKLIGHT can't find symbols defined in
> the module CROS_EC_PROTO.
>
> Let A=ACPI (bool), M=MFD_CROS_EC_DEV (tristate), and
> K=CROS_KBD_LED_BACKLIGHT (tristate). The possible values are:
>
> | A | M | choice for K |
> ------------------------
> | y | y | y/m/n |
> | y | m | m/n |
> | y | n | y/m/n |
> | n | y | y/m/n |
> | n | m | m/n |
> | n | n | n |
>
> Fix the dependencies in the Kconfig.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/chrome-platform/ed8adc69-c505-4108-bf63-92911b0395c7@infradead.org/T/#u
> Fixes: ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/platform/chrome/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
> index 1614b9d3c5c2..10941ac37305 100644
> --- a/drivers/platform/chrome/Kconfig
> +++ b/drivers/platform/chrome/Kconfig
> @@ -161,7 +161,8 @@ config CROS_EC_PROTO
>
> config CROS_KBD_LED_BACKLIGHT
> tristate "Backlight LED support for Chrome OS keyboards"
> - depends on LEDS_CLASS && (ACPI || MFD_CROS_EC_DEV)
> + depends on LEDS_CLASS
> + depends on MFD_CROS_EC_DEV || (MFD_CROS_EC_DEV=n && ACPI)
> help
> This option enables support for the keyboard backlight LEDs on
> select Chrome OS systems.
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
2025-04-14 22:11 ` Randy Dunlap
@ 2025-04-15 2:35 ` Tzung-Bi Shih
0 siblings, 0 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2025-04-15 2:35 UTC (permalink / raw)
To: Randy Dunlap; +Cc: bleung, sfr, chrome-platform, linux-next, srosek
On Mon, Apr 14, 2025 at 03:11:29PM -0700, Randy Dunlap wrote:
> On 4/14/25 6:24 AM, Tzung-Bi Shih wrote:
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Closes: https://lore.kernel.org/chrome-platform/ed8adc69-c505-4108-bf63-92911b0395c7@infradead.org/T/#u
> > Fixes: ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")
> > Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
>
> Tested-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
Just realized I copied wrong email address for the reporter. Will fix that
when applying the patch.
Thank you for your reporting and testing.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies
2025-04-14 13:24 [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
2025-04-14 13:24 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency Tzung-Bi Shih
2025-04-14 13:24 ` [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies Tzung-Bi Shih
@ 2025-04-15 2:45 ` Tzung-Bi Shih
2 siblings, 0 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2025-04-15 2:45 UTC (permalink / raw)
To: bleung, sfr; +Cc: chrome-platform, linux-next, srosek, rdunlap
On Mon, Apr 14, 2025 at 09:24:25PM +0800, Tzung-Bi Shih wrote:
> The first patch removes a redundant dependency.
>
> The second patch fixes the build errors discovered in [1].
>
> [1]: https://lore.kernel.org/chrome-platform/ed8adc69-c505-4108-bf63-92911b0395c7@infradead.org/T/#u
>
> Tzung-Bi Shih (2):
> platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
> platform/chrome: cros_kbd_led_backlight: Fix build dependencies
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
commit: 9aea0edcc3e92f5c40184b96d004b4af5a8d264f
[2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
commit: 31d3bd592df5bf2912b8d97b0652ac3f0cd335cf
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-04-15 2:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 13:24 [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
2025-04-14 13:24 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency Tzung-Bi Shih
2025-04-14 22:10 ` Randy Dunlap
2025-04-14 13:24 ` [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies Tzung-Bi Shih
2025-04-14 22:11 ` Randy Dunlap
2025-04-15 2:35 ` Tzung-Bi Shih
2025-04-15 2:45 ` [PATCH 0/2] platform/chrome: cros_kbd_led_backlight: Fix dependencies Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).