summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-sunxi/Kconfig10
-rw-r--r--board/sunxi/board.c4
-rw-r--r--configs/pinephone_defconfig3
3 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 89f0e77bcdb..07d7ea2b7ad 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -1245,15 +1245,17 @@ config SPL_SUNXI_LED_STATUS
if SPL_SUNXI_LED_STATUS
-config SPL_SUNXI_LED_STATUS_BIT
+config SPL_SUNXI_LED_STATUS_GPIO
int "GPIO number for GPIO status LED"
help
GPIO number for the GPIO controlling the GPIO status LED in SPL.
-config SPL_SUNXI_LED_STATUS_STATE
- bool "GPIO status LED initial state is on"
+config SPL_SUNXI_LED_STATUS_ACTIVE_HIGH
+ bool "GPIO status LED is active high"
+ default y
help
- Whether the initial state of the status LED in SPL must be on or off.
+ Whether the GPIO of the status LED must be set high or low to turn
+ the LED on.
endif # SPL_SUNXI_LED_STATUS
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index d7722d1858a..3d1afec7c66 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -563,8 +563,8 @@ static void sunxi_spl_store_dram_size(phys_addr_t dram_size)
static void status_led_init(void)
{
#if CONFIG_IS_ENABLED(SUNXI_LED_STATUS)
- unsigned int state = CONFIG_SPL_SUNXI_LED_STATUS_STATE;
- unsigned int gpio = CONFIG_SPL_SUNXI_LED_STATUS_BIT;
+ unsigned int state = IS_ENABLED(CONFIG_SPL_SUNXI_LED_STATUS_ACTIVE_HIGH);
+ unsigned int gpio = CONFIG_SPL_SUNXI_LED_STATUS_GPIO;
gpio_request(gpio, "gpio_led");
gpio_direction_output(gpio, state);
diff --git a/configs/pinephone_defconfig b/configs/pinephone_defconfig
index ed7dbc1852b..3a4f4ec51cf 100644
--- a/configs/pinephone_defconfig
+++ b/configs/pinephone_defconfig
@@ -9,8 +9,7 @@ CONFIG_DRAM_ZQ=3881949
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
CONFIG_PINEPHONE_DT_SELECTION=y
CONFIG_SPL_SUNXI_LED_STATUS=y
-CONFIG_SPL_SUNXI_LED_STATUS_BIT=114
-CONFIG_SPL_SUNXI_LED_STATUS_STATE=y
+CONFIG_SPL_SUNXI_LED_STATUS_GPIO=114
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_CMD_PSTORE=y
CONFIG_CMD_PSTORE_MEM_ADDR=0x61000000