diff options
author | Scott <scollyer@chromium.org> | 2017-01-31 15:32:28 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-03 17:52:19 -0800 |
commit | c19a3cad62defafd385f4ad6ffd1d506e8aac6cc (patch) | |
tree | 0e3ea5bd3f98908ff05d36d460b000c0abb35c79 /board/eve/board.h | |
parent | ae41381a72b1338e20074423f070924bbc47e589 (diff) | |
download | chrome-ec-c19a3cad62defafd385f4ad6ffd1d506e8aac6cc.tar.gz |
eve: Add per port control of charge LEDs
Eve has two charge LEDs. This CL adds support to set a given color for
either left, right, or both LEDs. In addition, the LED policy for Eve
has been enhanced to accommodate separate charge LEDs.
Added amber and white color option plus console command 'led' can
choose the left/right side by adding 0|1 after the color.
S0: Default both LEDs are blue. If charger is connected, then the
active charging port's LED will be amber or green based on battery
level.
S3: If not charging, then both LEDs are blinking white. If charging
then follow same policy as S5.
S5: If not charging, then both LEDs are off. If charging then follow
previous policy, but applied only to the charging port's LED. The port
that isn't actively charging will have its LED off.
BRANCH=none
BUG=chrome-os-partner:60797
TEST=manual Verified the LEDs follow the operation as defined above.
Change-Id: I6f91d8a28999360aa620c7178d48c41625a1fa54
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/437404
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'board/eve/board.h')
-rw-r--r-- | board/eve/board.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/eve/board.h b/board/eve/board.h index 73f15489d0..faace6e46a 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -204,6 +204,11 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT }; +/* + * The PWM channel enums for the LEDs need to be in Red, Green, Blue order as + * the 'set_color()' function assumes this order. The left vs right order + * doesn't matter as long as each side follows RGB order. + */ enum pwm_channel { PWM_CH_KBLIGHT, PWM_CH_LED_L_RED, |