UPSTREAM: 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.
BUG=none
BRANCH=none
TEST=none
Change-Id: Ibd9e844d796709ce93b275eb0c06c296ef7ed95f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: aaa4ae766d
Original-Change-Id: I23072ac60bc9683776f748ca1326d98257c3c54f
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18249
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/438058
This commit is contained in:
parent
282502e4b4
commit
b013e98df0
1 changed files with 9 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue