[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240526-cros_ec-kbd-led-framework-v3-4-ee577415a521@weissschuh.net>
Date: Sun, 26 May 2024 20:17:18 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Lee Jones <lee@...nel.org>, Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>, Tzung-Bi Shih <tzungbi@...nel.org>,
Pavel Machek <pavel@....cz>
Cc: chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
Dustin Howett <dustin@...ett.net>,
Mario Limonciello <mario.limonciello@....com>, linux-leds@...r.kernel.org,
Rajas Paranjpe <paranjperajas@...il.com>,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH v3 4/4] mfd: cros_ec: Register keyboard backlight subdevice
Load cros_kbd_led_backlight when the EC reports EC_FEATURE_PWM_KEYB.
This makes cros_kbd_led_backlight work on machines without specific
ACPI or OF support for the keyboard backlight.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
drivers/mfd/cros_ec_dev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index a52d59cc2b1e..4444b361aeae 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -99,6 +99,10 @@ static const struct mfd_cell cros_ec_wdt_cells[] = {
{ .name = "cros-ec-wdt", }
};
+static const struct mfd_cell cros_ec_keyboard_leds_cells[] = {
+ { .name = "cros-keyboard-leds", },
+};
+
static const struct cros_feature_to_cells cros_subdevices[] = {
{
.id = EC_FEATURE_CEC,
@@ -125,6 +129,11 @@ static const struct cros_feature_to_cells cros_subdevices[] = {
.mfd_cells = cros_ec_wdt_cells,
.num_cells = ARRAY_SIZE(cros_ec_wdt_cells),
},
+ {
+ .id = EC_FEATURE_PWM_KEYB,
+ .mfd_cells = cros_ec_keyboard_leds_cells,
+ .num_cells = ARRAY_SIZE(cros_ec_keyboard_leds_cells),
+ },
};
static const struct mfd_cell cros_ec_platform_cells[] = {
--
2.45.1
Powered by blists - more mailing lists