summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2017-01-26 10:58:15 -0600
committerMartin Roth <martinroth@google.com>2017-02-04 23:15:12 +0100
commitaaa4ae766d6bd731247c2b8bd009d1018136494f (patch)
tree04ac329ca71d5d385761c0ec28403ed10ecfccee /src
parent3054ca164e07b8f2dc2532e5672cd070e025ac70 (diff)
downloadcoreboot-aaa4ae766d6bd731247c2b8bd009d1018136494f.tar.xz
google/jecht: Fix LED for guado/rikku variants
When guado/rikku/tidus were rolled into jecht, an error was made in set_power_led() as guado/rikku set the polarity differently than tidus. Fix the power LED for guado/rikku by setting the polarity correctly. Test: boot guado/rikku and observe proper function of power LED under S0, S3, and S5 power states. Change-Id: I23072ac60bc9683776f748ca1326d98257c3c54f Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/18249 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/jecht/led.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mainboard/google/jecht/led.c b/src/mainboard/google/jecht/led.c
index 50cf32e3e1..286b65e542 100644
--- a/src/mainboard/google/jecht/led.c
+++ b/src/mainboard/google/jecht/led.c
@@ -19,10 +19,18 @@
void set_power_led(int state)
{
+ int polarity;
+
+ if (IS_ENABLED(CONFIG_BOARD_GOOGLE_TIDUS)) {
+ polarity = state == LED_OFF ? 0x00 : 0x01;
+ } else {
+ polarity = state == LED_BLINK ? 0x01 : 0x00;
+ }
+
it8772f_gpio_led(IT8772F_GPIO_DEV,
1, /* set */
0x01, /* select */
- state == LED_OFF ? 0x00 : 0x01, /* polarity */
+ polarity, /* polarity */
state == LED_BLINK ? 0x01 : 0x00, /* pullup/pulldown */
0x01, /* output */
state == LED_BLINK ? 0x00 : 0x01, /* I/O function */