diff options
-rw-r--r-- | board/elemi/board.c | 12 | ||||
-rw-r--r-- | board/elemi/gpio.inc | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/board/elemi/board.c b/board/elemi/board.c index 82ddcca710..1533207759 100644 --- a/board/elemi/board.c +++ b/board/elemi/board.c @@ -278,6 +278,18 @@ const struct pwm_t pwm_channels[] = { }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); +static void kb_backlight_enable(void) +{ + gpio_set_level(GPIO_EC_KB_BL_EN, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, kb_backlight_enable, HOOK_PRIO_DEFAULT); + +static void kb_backlight_disable(void) +{ + gpio_set_level(GPIO_EC_KB_BL_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, kb_backlight_disable, HOOK_PRIO_DEFAULT); + /******************************************************************************/ /* Volteer specific USB daughter-board configuration */ diff --git a/board/elemi/gpio.inc b/board/elemi/gpio.inc index aa4dbba6f7..a858a33a12 100644 --- a/board/elemi/gpio.inc +++ b/board/elemi/gpio.inc @@ -95,6 +95,7 @@ UNIMPLEMENTED(USB_C1_LS_EN) /* Misc Signals */ GPIO(EC_H1_PACKET_MODE, PIN(7, 5), GPIO_OUT_LOW) /* H1 Packet Mode */ +GPIO(EC_KB_BL_EN, PIN(8, 6), GPIO_OUT_LOW) /* Keyboard backlight enable */ /* * Despite their names, M2_SSD_PLN and M2_SSD_PLA are active-low, and M2_SSD_PLN * is open-drain. |