mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 00:26:30 +00:00
This implements keyboard backlight control for Nami, Vayne, Pantheon, and Sona. On Sona, GPIOC4 is directly connected to the LED strings. Thus, we use PWM to control the brightness. On the other variants, the LED strings are connected to LM3509. Thus, we control the brightness through I2C. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:76182445,b:78141647 BRANCH=none TEST=Verify keyboard backlight brightness changes on Nami. Verify keyboard backlight turns on/off on lid close/open, sleep/suspend. on Nami. Verify 'kblight' returns x set by 'kblight x' on Sona. Change-Id: I400ea2bc7a58a3cc57eb959179d2139a99ac176c Reviewed-on: https://chromium-review.googlesource.com/1022833 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Aaron Durbin <adurbin@google.com>