summaryrefslogtreecommitdiff
path: root/board/kinox/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/kinox/led.c')
-rw-r--r--board/kinox/led.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/kinox/led.c b/board/kinox/led.c
index 636804c7a6..00381fa7f4 100644
--- a/board/kinox/led.c
+++ b/board/kinox/led.c
@@ -182,6 +182,17 @@ static void led_resume(void)
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, led_resume, HOOK_PRIO_DEFAULT);
+void board_led_auto_control(void)
+{
+ /* Restore the previous signal */
+ if (chipset_in_state(CHIPSET_STATE_ON))
+ led_resume();
+ else if (chipset_in_state(CHIPSET_STATE_SUSPEND))
+ led_suspend_hook();
+ else if (chipset_in_state(CHIPSET_STATE_ANY_OFF))
+ led_shutdown_hook();
+}
+
void led_alert(int enable)
{
if (enable) {