taeko: modify keyboard backlight setting
BRANCH=main
TEST=make -j BOARD=taeko
@@ -52,24 +52,22 @@ __override void board_cbi_init(void)
static void board_chipset_resume(void)
{
/* Allow keyboard backlight to be enabled */
-
- if (ec_cfg_has_keyboard_backlight() == 1)
- gpio_set_level(GPIO_EC_KB_BL_EN_L, 1);
- else
+ if (ec_cfg_has_keyboard_backlight() == 1) {
+ /* GPIO_EC_KB_BL_EN_L is low active pin */
gpio_set_level(GPIO_EC_KB_BL_EN_L, 0);
}
+}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
/* Called on AP S0 -> S3 transition */
static void board_chipset_suspend(void)
{
/* Turn off the keyboard backlight if it's on. */
-
- if (ec_cfg_has_keyboard_backlight() == 1)
- gpio_set_level(GPIO_EC_KB_BL_EN_L, 0);
- else
+ if (ec_cfg_has_keyboard_backlight() == 1) {
+ /* GPIO_EC_KB_BL_EN_L is low active pin */
gpio_set_level(GPIO_EC_KB_BL_EN_L, 1);
}
+}
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
#ifdef CONFIG_CHARGE_RAMP_SW
