diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-03-17 15:37:54 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-22 19:54:17 +0200 |
commit | 4e0de324ebf9c0586695901aed19b2d4545cf0c6 (patch) | |
tree | 9ce10d0f21d39defd2d698578e3c1e79a2426ce6 /src/drivers/i2c/ww_ring/ww_ring.c | |
parent | 507a0cbff8815a9cb6a9b1b6521300516d6b5c2e (diff) |
i2c/ww_ring: decouple LED display from vboot
The patterns displayed on the LED ring while under the coreboot
control are not driven by the vboot, but by the board code instead,
The four distinct states of the LED display are:
- all off
- recovery button push detected, waiting for it to be released
- wipeout request pending - recovery button was pushed long enough
to trigger this request
- recovery request pending - recovery button was pushed long enough
to trigger this request.
BRANCH=storm
BUG=chrome-os-partner:36059
TEST=no functional changes
Change-Id: I38d9a3028013b902a7a67ccd4eb1c5d533bf071c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bdfff0e646283da6a2faaacf33e0179d2fea221c
Original-Change-Id: Ie279151b6060a2888268a2e9a0d4dc22ecaba460
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/260649
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9868
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/ww_ring/ww_ring.c')
-rw-r--r-- | src/drivers/i2c/ww_ring/ww_ring.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/drivers/i2c/ww_ring/ww_ring.c b/src/drivers/i2c/ww_ring/ww_ring.c index e1f255a858..243543a021 100644 --- a/src/drivers/i2c/ww_ring/ww_ring.c +++ b/src/drivers/i2c/ww_ring/ww_ring.c @@ -114,7 +114,7 @@ typedef struct { /* A structure to bind controller programs to a vboot state. */ typedef struct { - enum VbScreenType_t vb_screen; + enum display_pattern led_pattern; const TiLp55231Program * programs[WW_RING_NUM_LED_CONTROLLERS]; } WwRingStateProg; @@ -143,8 +143,7 @@ static const WwRingStateProg state_programs[] = { * for test purposes the blank screen program is set to blinking, will * be changed soon. */ - {VB_SCREEN_BLANK, {&led_blink_program, &led_blink_program} }, - /* Other vboot state programs are coming. */ + {WWR_ALL_OFF, {&led_blink_program, &led_blink_program} }, }; /* */ /****************************************************************/ @@ -388,7 +387,7 @@ static int ledc_init_validate(TiLp55231 *ledc) * Find a program matching screen type, and run it on both controllers, if * found. */ -int ww_ring_display_pattern(unsigned i2c_bus, enum VbScreenType_t screen_type) +int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern) { int i; static int initted; @@ -399,7 +398,7 @@ int ww_ring_display_pattern(unsigned i2c_bus, enum VbScreenType_t screen_type) } for (i = 0; i < ARRAY_SIZE(state_programs); i++) - if (state_programs[i].vb_screen == screen_type) { + if (state_programs[i].led_pattern == pattern) { int j; for (j = 0; j < WW_RING_NUM_LED_CONTROLLERS; j++) { @@ -411,8 +410,8 @@ int ww_ring_display_pattern(unsigned i2c_bus, enum VbScreenType_t screen_type) return 0; } - printk(BIOS_WARNING, "%s: did not find program for screen %d\n", - __func__, screen_type); + printk(BIOS_WARNING, "%s: did not find program for pattern %d\n", + __func__, pattern); return -1; } |