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>
diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile
index 7a858be..41b552a 100644
--- a/board/ti/beagle/Makefile
+++ b/board/ti/beagle/Makefile
@@ -6,4 +6,4 @@
#
obj-y := beagle.o
-obj-$(CONFIG_STATUS_LED) += led.o
+obj-$(CONFIG_LED_STATUS) += led.o
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 23c7933..a6908d4 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -16,7 +16,7 @@
#include <common.h>
#include <dm.h>
#include <ns16550.h>
-#ifdef CONFIG_STATUS_LED
+#ifdef CONFIG_LED_STATUS
#include <status_led.h>
#endif
#include <twl4030.h>
@@ -96,8 +96,8 @@
/* boot param addr */
gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
- status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);
#endif
return 0;
diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c
index a913a4c..30b8b93 100644
--- a/board/ti/beagle/led.c
+++ b/board/ti/beagle/led.c
@@ -15,26 +15,26 @@
#define BEAGLE_LED_USR0 150
#define BEAGLE_LED_USR1 149
-#ifdef STATUS_LED_GREEN
+#ifdef CONFIG_LED_STATUS_GREEN
void green_led_off(void)
{
- __led_set (STATUS_LED_GREEN, 0);
+ __led_set(CONFIG_LED_STATUS_GREEN, 0);
}
void green_led_on(void)
{
- __led_set (STATUS_LED_GREEN, 1);
+ __led_set(CONFIG_LED_STATUS_GREEN, 1);
}
#endif
static int get_led_gpio(led_id_t mask)
{
-#ifdef STATUS_LED_BIT
- if (STATUS_LED_BIT & mask)
+#ifdef CONFIG_LED_STATUS0
+ if (CONFIG_LED_STATUS_BIT & mask)
return BEAGLE_LED_USR0;
#endif
-#ifdef STATUS_LED_BIT1
- if (STATUS_LED_BIT1 & mask)
+#ifdef CONFIG_LED_STATUS1
+ if (CONFIG_LED_STATUS_BIT1 & mask)
return BEAGLE_LED_USR1;
#endif