diff options
Diffstat (limited to 'src/mainboard/google/tidus/led.c')
-rw-r--r-- | src/mainboard/google/tidus/led.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/src/mainboard/google/tidus/led.c b/src/mainboard/google/tidus/led.c index c0bf33278c..a21b3b52b4 100644 --- a/src/mainboard/google/tidus/led.c +++ b/src/mainboard/google/tidus/led.c @@ -14,35 +14,18 @@ */ #include <types.h> -#include <arch/io.h> #include <superio/ite/it8772f/it8772f.h> #include "onboard.h" -void set_power_led(u8 led_pin_map, int state) +void set_power_led(int state) { - switch (state) { - case LED_ON: - case LED_OFF: - it8772f_gpio_led(IT8772F_GPIO_DEV, - 1 /* set */, - 0x01 /* select */, - state /* polarity: non-inverting */, - 0x00 /* 0=pulldown */, - 0x01 /* output */, - 0x01 /* 1=Simple IO function */, - led_pin_map, - IT8772F_GPIO_BLINK_FREQUENCY_1_HZ); - break; - case LED_BLINK: - it8772f_gpio_led(IT8772F_GPIO_DEV, - 1 /* set */, - 0x01 /* select */, - 0x01 /* polarity */, - 0x01 /* 1=pullup */, - 0x01 /* output */, - 0x00, /* 0=Alternate function */ - led_pin_map, - IT8772F_GPIO_BLINK_FREQUENCY_1_HZ); - break; - } + it8772f_gpio_led(IT8772F_GPIO_DEV, + 1, /* set */ + 0x01, /* select */ + state == LED_OFF ? 0x00 : 0x01, /* polarity */ + state == LED_BLINK ? 0x01 : 0x00, /* pullup/pulldown */ + 0x01, /* output */ + state == LED_BLINK ? 0x00 : 0x01, /* I/O function */ + SIO_GPIO_BLINK_GPIO10, + IT8772F_GPIO_BLINK_FREQUENCY_1_HZ); } |