From: Tzung-Bi Shih <tzungbi@kernel.org>
To: bleung@chromium.org, sfr@canb.auug.org.au
Cc: chrome-platform@lists.linux.dev, tzungbi@kernel.org,
linux-next@vger.kernel.org, srosek@chromium.org
Subject: [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies
Date: Mon, 14 Apr 2025 21:24:27 +0800 [thread overview]
Message-ID: <20250414132427.204078-3-tzungbi@kernel.org> (raw)
In-Reply-To: <20250414132427.204078-1-tzungbi@kernel.org>
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
next prev parent reply other threads:[~2025-04-14 13:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Tzung-Bi Shih [this message]
2025-04-14 22:11 ` [PATCH 2/2] platform/chrome: cros_kbd_led_backlight: Fix build dependencies 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250414132427.204078-3-tzungbi@kernel.org \
--to=tzungbi@kernel.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=srosek@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox