Skip to content

Commit ea9e4d2

Browse files
authored
Merge pull request #822 from FrameworkComputer/fwk.led_behavior
fwk: use s0ix flag for breath LED condition
2 parents 2104adf + 75d0f60 commit ea9e4d2

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

zephyr/program/lotus/azalea/src/power_sequence.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ void s0ix_status_handle(void)
207207
task_wake(TASK_ID_CHIPSET);
208208
}
209209
DECLARE_HOOK(HOOK_TICK, s0ix_status_handle, HOOK_PRIO_DEFAULT);
210+
211+
int check_s0ix_status(void)
212+
{
213+
return system_in_s0ix;
214+
}
215+
210216
#endif
211217

212218
void chipset_reset(enum chipset_shutdown_reason reason)

zephyr/program/lotus/include/power_sequence.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ void power_s5_up_control(int control);
3030

3131
void power_state_clear(int state);
3232

33+
int check_s0ix_status(void);
34+
3335
#endif /* __CROS_EC_POWERSEQUENCE_H */

zephyr/program/lotus/lotus/src/power_sequence.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ void s0ix_status_handle(void)
247247
task_wake(TASK_ID_CHIPSET);
248248
}
249249
DECLARE_HOOK(HOOK_TICK, s0ix_status_handle, HOOK_PRIO_DEFAULT);
250+
251+
int check_s0ix_status(void)
252+
{
253+
return system_in_s0ix;
254+
}
255+
250256
#endif
251257

252258
void chipset_reset(enum chipset_shutdown_reason reason)

zephyr/program/lotus/src/led.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "led.h"
2222
#include "led_common.h"
2323
#include "power.h"
24+
#include "power_sequence.h"
2425
#include "system.h"
2526
#include "util.h"
2627

@@ -442,7 +443,7 @@ static void board_led_set_power(void)
442443
return;
443444
}
444445

445-
if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND)) {
446+
if (check_s0ix_status()) {
446447
breath_led_run(1);
447448
return;
448449
}

0 commit comments

Comments
 (0)