poppy: Add LED support for sysrq debug mode
BRANCH=None
TEST=Verified that LED blinks when in debug mode and stops blinking on
exit from debug mode.
@@ -143,9 +143,12 @@ DECLARE_HOOK(HOOK_TICK, led_tick, HOOK_PRIO_DEFAULT);
void led_control(enum ec_led_id led_id, enum ec_led_state state)
{
- if (led_id == EC_LED_ID_RECOVERY_HW_REINIT_LED) {
enum led_color color;
+ if ((led_id != EC_LED_ID_RECOVERY_HW_REINIT_LED) &&
+ (led_id != EC_LED_ID_SYSRQ_DEBUG_LED))
+ return;
+
if (state == LED_STATE_RESET) {
led_auto_control(EC_LED_ID_LEFT_LED, 1);
led_auto_control(EC_LED_ID_RIGHT_LED, 1);
@@ -161,4 +164,3 @@ void led_control(enum ec_led_id led_id, enum ec_led_state state)
side_led_set_color(0, color);
side_led_set_color(1, color);
}
-}
