summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/ww_ring/ww_ring.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-03-17 15:37:54 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-22 19:54:17 +0200
commit4e0de324ebf9c0586695901aed19b2d4545cf0c6 (patch)
tree9ce10d0f21d39defd2d698578e3c1e79a2426ce6 /src/drivers/i2c/ww_ring/ww_ring.h
parent507a0cbff8815a9cb6a9b1b6521300516d6b5c2e (diff)
downloadcoreboot-4e0de324ebf9c0586695901aed19b2d4545cf0c6.tar.xz
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.h')
-rw-r--r--src/drivers/i2c/ww_ring/ww_ring.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/drivers/i2c/ww_ring/ww_ring.h b/src/drivers/i2c/ww_ring/ww_ring.h
index 628cd6c504..d2804ed46e 100644
--- a/src/drivers/i2c/ww_ring/ww_ring.h
+++ b/src/drivers/i2c/ww_ring/ww_ring.h
@@ -14,17 +14,21 @@
#ifndef __SRC_DRIVERS_VIDEO_WW_RING__H__
#define __SRC_DRIVERS_VIDEO_WW_RING__H__
-#if IS_ENABLED(CONFIG_CHROMEOS)
-#include <vboot_api.h>
-
+/*
+ * Different types of display patterns to be shown by the LED ring while
+ * contrlled by coreboot.
+ */
+enum display_pattern {
+ WWR_ALL_OFF, /* Turn the LEDs off. */
+ WWR_RECOVERY_PUSHED, /* Recovery button push detected on start up. */
+ WWR_WIPEOUT_REQUEST, /* Held long enough for wipout request. */
+ WWR_RECOVERY_REQUEST, /* Held long enough for recovery request. */
+};
/*
* ww_ring_display_pattern
*
* Display pattern on the ring LEDs.
*/
-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);
-#else
-static inline int ww_ring_display_pattern(unsigned i2c_bus, int screen_type) { return 0;}
-#endif
#endif