]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mfd: cros_ec: Register keyboard backlight subdevice
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 26 May 2024 18:17:18 +0000 (20:17 +0200)
committerLee Jones <lee@kernel.org>
Fri, 14 Jun 2024 09:09:40 +0000 (10:09 +0100)
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@weissschuh.net>
Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-4-ee577415a521@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/cros_ec_dev.c

index a52d59cc2b1ecba0998f465cd53d9b8de5c6a5a4..4444b361aeae1b659874c05da5f870edcc348447 100644 (file)
@@ -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[] = {