platform/chrome: Add Chrome OS keyboard backlight LEDs support
PATCH v4 1/1 platform/chrome: Add Chrome OS keyboard backlight LEDs support
From: Simon Que <[email protected]>
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:
v3->v4:
- resend with proper authorship information
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 10 lines · Dmitry Torokhov
From: Simon Que <[email protected]>
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]>
Quoted 6 lines
---
Changes from previous submissions:
v3->v4:
- resend with proper authorship information
Ack. Applied v3, fixing up author.
-Olof
Quoted 13 lines · Olof Johansson
Quoted 12 lines · Dmitry Torokhov
From: Simon Que <[email protected]>
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]>---
Quoted 6 lines
Quoted 4 lines
Changes from previous submissions:
v3->v4:
- resend with proper authorship informationAck. Applied v3, fixing up author.
Any chance it will make 4.7?
Thanks.
Signature · 1 line
Dmitry
Quoted 14 lines · Dmitry Torokhov
Quoted 13 lines · Olof Johansson
Quoted 12 lines · Dmitry Torokhov
From: Simon Que <[email protected]>
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]>---
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Changes from previous submissions:
v3->v4:
- resend with proper authorship informationAck. Applied v3, fixing up author.
Any chance it will make 4.7?
Yep.
-Olof