diff options
author | Uri Mashiach <uri.mashiach@compulab.co.il> | 2017-01-19 08:51:45 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-01-21 20:12:33 (GMT) |
commit | 2d8d190c8394b43c0989cdb04a50cb48d4e1f8da (patch) | |
tree | a19e034f406aba9bfc07e8ef0d4fafc6fa4a04b7 /board/corscience/tricorder/led.c | |
parent | 79267edd10fde0815c382157b9cb280166637fac (diff) | |
download | u-boot-2d8d190c8394b43c0989cdb04a50cb48d4e1f8da.tar.xz |
status_led: Kconfig migration
Move all of the status LED feature to drivers/led/Kconfig.
The LED status definitions were moved from the board configuration
files to the defconfig files.
TBD: Move all of the definitions in the include/status_led.h to the
relevant board's defconfig files.
Tested boards: CL-SOM-AM57x, CM-T335
Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Diffstat (limited to 'board/corscience/tricorder/led.c')
-rw-r--r-- | board/corscience/tricorder/led.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/board/corscience/tricorder/led.c b/board/corscience/tricorder/led.c index 30f2f50..00ffc00 100644 --- a/board/corscience/tricorder/led.c +++ b/board/corscience/tricorder/led.c @@ -23,16 +23,16 @@ void __led_init(led_id_t mask, int state) void __led_toggle(led_id_t mask) { int toggle_gpio = 0; -#ifdef STATUS_LED_BIT - if (!toggle_gpio && STATUS_LED_BIT & mask) +#ifdef CONFIG_LED_STATUS0 + if (!toggle_gpio && CONFIG_LED_STATUS_BIT & mask) toggle_gpio = TRICORDER_STATUS_LED_GREEN; #endif -#ifdef STATUS_LED_BIT1 - if (!toggle_gpio && STATUS_LED_BIT1 & mask) +#ifdef CONFIG_LED_STATUS1 + if (!toggle_gpio && CONFIG_LED_STATUS_BIT1 & mask) toggle_gpio = TRICORDER_STATUS_LED_YELLOW; #endif -#ifdef STATUS_LED_BIT2 - if (!toggle_gpio && STATUS_LED_BIT2 & mask) { +#ifdef CONFIG_LED_STATUS2 + if (!toggle_gpio && CONFIG_LED_STATUS_BIT2 & mask) { uint8_t val; twl4030_i2c_read_u8(TWL4030_CHIP_LED, TWL4030_LED_LEDEN, &val); @@ -51,23 +51,23 @@ void __led_toggle(led_id_t mask) void __led_set(led_id_t mask, int state) { -#ifdef STATUS_LED_BIT - if (STATUS_LED_BIT & mask) { +#ifdef CONFIG_LED_STATUS0 + if (CONFIG_LED_STATUS_BIT & mask) { gpio_request(TRICORDER_STATUS_LED_GREEN, ""); gpio_direction_output(TRICORDER_STATUS_LED_GREEN, 0); gpio_set_value(TRICORDER_STATUS_LED_GREEN, state); } #endif -#ifdef STATUS_LED_BIT1 - if (STATUS_LED_BIT1 & mask) { +#ifdef CONFIG_LED_STATUS1 + if (CONFIG_LED_STATUS_BIT1 & mask) { gpio_request(TRICORDER_STATUS_LED_YELLOW, ""); gpio_direction_output(TRICORDER_STATUS_LED_YELLOW, 0); gpio_set_value(TRICORDER_STATUS_LED_YELLOW, state); } #endif -#ifdef STATUS_LED_BIT2 - if (STATUS_LED_BIT2 & mask) { - if (STATUS_LED_OFF == state) +#ifdef CONFIG_LED_STATUS2 + if (CONFIG_LED_STATUS_BIT2 & mask) { + if (CONFIG_LED_STATUS_OFF == state) twl4030_i2c_write_u8(TWL4030_CHIP_LED, TWL4030_LED_LEDEN, 0); else |