platform/chrome: Add Chrome OS keyboard backlight LEDs support
Subsystems (2)
PATCH v3 1/1 platform/chrome: Add Chrome OS keyboard backlight LEDs support
This is a driver for ACPI-based keyboard backlight LEDs found on Chromebooks. The driver locates \\_SB.KBLT ACPI device and exports backlight as "chromeos::kbd_backlight" LED class device in sysfs.
---
Changes from previous submissions:
v2->v3:
- dropped call to platform_set_drvdata() as suggested by Guenter
v1->v2:
- moved from drivers/leds to drivers/platform/chrome
- added method to retrieve brightness from ACPI
- renamed to cros_kbd_led_backlight
- config option renamed to CROS_KBD_LED_BACKLIGHT
- no longer setting initial brightness to max brightness (although on Pixel 1 - Link - ACPI initially reports 100 as brightness anyway)
drivers/platform/chrome/Kconfig | 10 ++ drivers/platform/chrome/Makefile | 15 +-- drivers/platform/chrome/cros_kbd_led_backlight.c | 122 +++++++++++++++++++++++ 3 files changed, 140 insertions(+), 7 deletions(-)
drivers/platform/chrome/Kconfig +10 -0
@@ -64,4 +64,14 @@ config CROS_EC_PROTO help ChromeOS EC communication protocol helpers. +config CROS_KBD_LED_BACKLIGHT + tristate "Backlight LED support for Chrome OS keyboards" + depends on LEDS_CLASS && ACPI + help + This option enables support for the keyboard backlight LEDs on + select Chrome OS systems. + + To compile this driver as a module, choose M here: the + module will be called cros_kbd_led_backlight. + endif # CHROMEOS_PLATFORMS
drivers/platform/chrome/Makefile +8 -7
@@ -1,8 +1,9 @@ -obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o -obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o -cros_ec_devs-objs := cros_ec_dev.o cros_ec_sysfs.o \ - cros_ec_lightbar.o cros_ec_vbc.o -obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_devs.o -obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpc.o -obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o +obj-$(CONFIG_CHROMEOS_LAPTOP) += chromeos_laptop.o +obj-$(CONFIG_CHROMEOS_PSTORE) += chromeos_pstore.o +cros_ec_devs-objs := cros_ec_dev.o cros_ec_sysfs.o \ + cros_ec_lightbar.o cros_ec_vbc.o +obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_devs.o +obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpc.o +obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o +obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT) += cros_kbd_led_backlight.o
drivers/platform/chrome/cros_kbd_led_backlight.c new file +122 -0
122 lines not on this page · raw message
Signature · 5 lines
2.7.0.rc3.207.g0ac5344 -- Dmitry
Quoted 15 lines · Dmitry Torokhov
This is a driver for ACPI-based keyboard backlight LEDs found on Chromebooks. The driver locates \\_SB.KBLT ACPI device and exports backlight as "
chromeos::kbd_backlight" LED class device in sysfs.Signed-off-by Simon Que <[email protected]>Signed-off-by Duncan Laurie <[email protected]>Tested-by Evan McClain <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
Changes from previous submissions:
v2->v3:
- dropped call toplatform_set_drvdata()as suggested by Guenter
Quoted 7 lines
v1->v2:
- moved fromdrivers/ledstodrivers/platform/chrome
- added method to retrieve brightness from ACPI
- renamed tocros_kbd_led_backlight
- config option renamed toCROS_KBD_LED_BACKLIGHT
- no longer setting initial brightness to max brightness (although on Pixel 1 - Link - ACPI initially reports 100 as brightness anyway)
Ugh. I dropped the ball on this and other patches. Applied now.
-Olof