summaryrefslogtreecommitdiff
path: root/drivers/misc/gpio_led.c
diff options
context:
space:
mode:
authorUri Mashiach <uri.mashiach@compulab.co.il>2017-01-19 10:51:45 +0200
committerTom Rini <trini@konsulko.com>2017-01-21 15:12:33 -0500
commit2d8d190c8394b43c0989cdb04a50cb48d4e1f8da (patch)
treea19e034f406aba9bfc07e8ef0d4fafc6fa4a04b7 /drivers/misc/gpio_led.c
parent79267edd10fde0815c382157b9cb280166637fac (diff)
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 'drivers/misc/gpio_led.c')
-rw-r--r--drivers/misc/gpio_led.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/misc/gpio_led.c b/drivers/misc/gpio_led.c
index 164c30db382..b913069849a 100644
--- a/drivers/misc/gpio_led.c
+++ b/drivers/misc/gpio_led.c
@@ -17,7 +17,7 @@ static led_id_t gpio_led_inv[] = CONFIG_GPIO_LED_INVERTED_TABLE;
static int gpio_led_gpio_value(led_id_t mask, int state)
{
- int i, gpio_value = (state == STATUS_LED_ON);
+ int i, gpio_value = (state == CONFIG_LED_STATUS_ON);
for (i = 0; i < ARRAY_SIZE(gpio_led_inv); i++) {
if (gpio_led_inv[i] == mask)
@@ -56,51 +56,51 @@ void __led_toggle(led_id_t mask)
/* 'generic' override of colored LED stubs, to use GPIO functions instead */
-#ifdef STATUS_LED_RED
+#ifdef CONFIG_LED_STATUS_RED
void red_led_on(void)
{
- __led_set(STATUS_LED_RED, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
}
void red_led_off(void)
{
- __led_set(STATUS_LED_RED, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
}
#endif
-#ifdef STATUS_LED_GREEN
+#ifdef CONFIG_LED_STATUS_GREEN
void green_led_on(void)
{
- __led_set(STATUS_LED_GREEN, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_GREEN, CONFIG_LED_STATUS_ON);
}
void green_led_off(void)
{
- __led_set(STATUS_LED_GREEN, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_GREEN, CONFIG_LED_STATUS_OFF);
}
#endif
-#ifdef STATUS_LED_YELLOW
+#ifdef CONFIG_LED_STATUS_YELLOW
void yellow_led_on(void)
{
- __led_set(STATUS_LED_YELLOW, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_YELLOW, CONFIG_LED_STATUS_ON);
}
void yellow_led_off(void)
{
- __led_set(STATUS_LED_YELLOW, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_YELLOW, CONFIG_LED_STATUS_OFF);
}
#endif
-#ifdef STATUS_LED_BLUE
+#ifdef CONFIG_LED_STATUS_BLUE
void blue_led_on(void)
{
- __led_set(STATUS_LED_BLUE, STATUS_LED_ON);
+ __led_set(CONFIG_LED_STATUS_BLUE, CONFIG_LED_STATUS_ON);
}
void blue_led_off(void)
{
- __led_set(STATUS_LED_BLUE, STATUS_LED_OFF);
+ __led_set(CONFIG_LED_STATUS_BLUE, CONFIG_LED_STATUS_OFF);
}
#endif