diff options
author | Rob Barnes <robbarnes@google.com> | 2021-05-11 08:17:43 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-19 15:52:50 +0000 |
commit | 958e53d9cb2e0531eb33a5901e43efa237ffb835 (patch) | |
tree | ded54ec89716b4c8b08b6c89cc0ddd7e15d9fa41 /baseboard/guybrush | |
parent | e8682830acd203312c2d8ffb4e474bf926c2c97f (diff) | |
download | chrome-ec-958e53d9cb2e0531eb33a5901e43efa237ffb835.tar.gz |
guybrush: Alias kb backlight gpio
When keyboard backlight is 0%, the backlight led driver should be
disabled to save power. By aliasing this GPIO, the common
keyboard_backlight handler will toggle this GPIO on kblight_enable.
BUG=b:187757151
TEST=Set backlight to 0, 50, 0 and observe the enable gpio is 0, 1, 0
BRANCH=None
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I22b0bb31720e9e17e9d896759be6b2ccf8c69d42
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2887551
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'baseboard/guybrush')
-rw-r--r-- | baseboard/guybrush/baseboard.c | 2 | ||||
-rw-r--r-- | baseboard/guybrush/baseboard.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c index 51f8e44f35..564133c55f 100644 --- a/baseboard/guybrush/baseboard.c +++ b/baseboard/guybrush/baseboard.c @@ -908,7 +908,6 @@ static void baseboard_chipset_suspend(void) { /* Disable display and keyboard backlights. */ gpio_set_level(GPIO_EC_DISABLE_DISP_BL, 1); - gpio_set_level(GPIO_EN_KB_BL, 0); ioex_set_level(IOEX_USB_A1_RETIMER_EN, 0); } DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, baseboard_chipset_suspend, @@ -918,7 +917,6 @@ static void baseboard_chipset_resume(void) { /* Enable display and keyboard backlights. */ gpio_set_level(GPIO_EC_DISABLE_DISP_BL, 0); - gpio_set_level(GPIO_EN_KB_BL, 1); ioex_set_level(IOEX_USB_A1_RETIMER_EN, 1); /* Some retimers take several ms to be ready, so defer setup call */ hook_call_deferred(&baseboard_a1_retimer_setup_data, 20 * MSEC); diff --git a/baseboard/guybrush/baseboard.h b/baseboard/guybrush/baseboard.h index 455c5bd971..5f3ec9fd5b 100644 --- a/baseboard/guybrush/baseboard.h +++ b/baseboard/guybrush/baseboard.h @@ -105,7 +105,8 @@ #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_KEYBOARD_VIVALDI -#define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV +#define GPIO_EN_KEYBOARD_BACKLIGHT GPIO_EN_KB_BL +#define GPIO_KBD_KSO2 GPIO_EC_KSO_02_INV /* Sensors */ #define CONFIG_TABLET_MODE |