platform/chrome: cros_kbd_led_backlight: Fix dependencies
Tzung-Bi Shih
maintainercover platform/chrome: cros_kbd_led_backlight: Fix dependencies
The first patch removes a redundant dependency.
The second patch fixes the build errors discovered in [1].
[1]: https://lore.kernel.org/chrome-platform/[email protected]/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(-)
Signature · 1 line
2.43.0
Tzung-Bi Shih
maintainerPATCH 1/2 platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
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.
--- drivers/platform/chrome/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/Kconfig +1 -1
@@ -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.
Signature · 1 line
2.43.0
Re: [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove CROS_EC dependency
Quoted 8 lines · Tzung-Bi Shih
After applying
3a1d61dc3202("platform/chrome:cros_kbd_led_backlight:
Remove OF match"),cros_kbd_led_backlightno longer depends onCROS_ECdirectly.Remove the redundant dependency.
Fixes 3a1d61dc3202 ("platform/chrome: cros_kbd_led_backlight: Remove OF match")Signed-off-by Tzung-Bi Shih <[email protected]>
Thanks.
Quoted 17 lines
--- drivers/platform/chrome/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/chrome/Kconfig +1
-1@@ -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.
Signature · 1 line
~Randy
Tzung-Bi Shih
maintainerPATCH 2/2 platform/chrome: cros_kbd_led_backlight: Fix build dependencies
In reply to Tzung-Bi Shihccf395bde6ae ("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.
--- drivers/platform/chrome/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/chrome/Kconfig +2 -1
@@ -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.
Signature · 1 line
2.43.0
Re: [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
Quoted 31 lines · Tzung-Bi Shih
ccf395bde6ae("platform/chrome:cros_ec_proto: Allow to build as module") allowsCROS_EC_PROTOto 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=yAs 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_BACKLIGHTcan't find symbols defined in the moduleCROS_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 |
Quoted 6 lines
Fix the dependencies in the
Kconfig.Reported-by Stephen Rothwell <[email protected]>Fixes ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")Signed-off-by Tzung-Bi Shih <[email protected]>
Thanks.
Quoted 18 lines
--- drivers/platform/chrome/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/platform/chrome/Kconfig +2
-1@@ -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.
Signature · 1 line
~Randy
Tzung-Bi Shih
maintainerRe: [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
Quoted 8 lines · Randy Dunlap
Quoted 4 lines · Tzung-Bi Shih
Reported-by Stephen Rothwell <[email protected]>Fixes ccf395bde6ae ("platform/chrome: cros_ec_proto: Allow to build as module")Signed-off-by Tzung-Bi Shih <[email protected]>Tested-by Randy Dunlap <[email protected]>Acked-by Randy Dunlap <[email protected]>
Just realized I copied wrong email address for the reporter. Will fix that when applying the patch.
Thank you for your reporting and testing.
Tzung-Bi Shih
maintainerQuoted 11 lines · Tzung-Bi Shih
The first patch removes a redundant dependency.
The second patch fixes the build errors discovered in [1].
[1]: https://lore.kernel.org/chrome-platform/[email protected]/T/#u
Tzung-Bi Shih (2):
platform/chrome:cros_kbd_led_backlight: RemoveCROS_ECdependency 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: 31d3bd592df5bf2912b8d97b0652ac3f0cd335cfThanks!