diff options
author | Tommy Chung <tommy.chung@quanta.corp-partner.google.com> | 2021-10-08 10:54:21 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-12 17:13:08 +0000 |
commit | f0c36b07d9efa2f5b12e5de7e794d723e8468e26 (patch) | |
tree | 85d126eac329bc043617ef6ee10c02ab548e6286 | |
parent | f56237955913b612bb630558d1ba042fd6aa76e5 (diff) | |
download | chrome-ec-f0c36b07d9efa2f5b12e5de7e794d723e8468e26.tar.gz |
lantis: Fix LED behavior
LED behaviors on lantis should be defined as following table
(LEFT/RIGHT is C0/C1 port on lantis respectively).
Current LED behavior when S0ix in DC/Fully charged mode behavior
is "blink white 0.5s(on)/0.5s(off)", but it should be "blink white
1s(on)/1s(off)". Fix this by executing power_ticks++ once instead of
twice in each tick calling in.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
| | | | |
| | DC mode | AC in RIGHT | AC in LEFT |
|_ _ _ _ _|_ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _|
| | OFF |Charging: | OFF |
| | (Blink white | Amber |(Fully charged |
| | 1s(on)/1s(off) | | when S0ix: |
| |when battery<10%)|Fully charged: | Blink white |
| | | White |1s(on)/1s(off)) |
| | (Blink white | | |
| | 1s(on)/1s(off) |Fully charged | |
| | when S0ix) |when S0ix: | |
|RIGHT LED| | Blink white | |
| | |1s(on)/1s(off) | |
| | | | |
| | |Battery error: | |
| | | Blink white | |
| | |0.5s(on)/0.5s(off) | |
| | | | |
| | |Force idle: | |
| | |(for factory) | |
| | | Blink amber | |
| | |1s(on)/1s(off) | |
|_ _ _ _ _|_ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _|
| | OFF | OFF |Charging: |
| | (Blink white |(Fully charged | Amber |
| | 1s(on)/1s(off) | when S0ix: | |
| | when S0ix) | Blink white |Fully charged: |
| | |1s(on)/1s(off)) | White |
| | | | |
| | | |Fully charged |
| | | |when S0ix: |
| | | | Blink white |
|LEFT LED | | |1s(on)/1s(off) |
| | | | |
| | | |Battery error: |
| | | | Blink white |
| | | |0.5s(on)/0.5s(off) |
| | | | |
| | | |Force idle: |
| | | |(for factory) |
| | | | Blink amber |
| | | |1s(on)/1s(off) |
|_ _ _ _ _|_ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _|
BUG=none
BRANCH=dedede
TEST=make sure that all LEFT/RIGHT LED's behaviors correct.
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: I1ed0f621a20a19a5ac05f2f0aaa6886c8b227f59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3211325
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Commit-Queue: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | board/lantis/led.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/lantis/led.c b/board/lantis/led.c index 97afef2f02..fb5406b252 100644 --- a/board/lantis/led.c +++ b/board/lantis/led.c @@ -164,9 +164,12 @@ static void led_set_battery(void) if (get_cbi_fw_config_tablet_mode() == TABLET_MODE_ABSENT) { if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND) && charge_get_state() != PWR_STATE_CHARGE) { - led_set_color_battery(RIGHT_PORT, power_ticks++ & 0x2 ? + + power_ticks++; + + led_set_color_battery(RIGHT_PORT, power_ticks & 0x2 ? LED_WHITE : LED_OFF); - led_set_color_battery(LEFT_PORT, power_ticks++ & 0x2 ? + led_set_color_battery(LEFT_PORT, power_ticks & 0x2 ? LED_WHITE : LED_OFF); return; } |