diff mbox

[U-Boot,v5,03/41] dm: led: Tidy up SPL options for the led and led-gpio

Message ID 1440975352-28528-4-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Aug. 30, 2015, 10:55 p.m. UTC
At present SPL does not have its own option. But these features can
increase SPL code size. Adjust the Kconfig and Makefile so that
separate a SPL option can be selected.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v5:
- Add new patch to tidy up SPL options for the led and led-gpio

Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/led/Kconfig  | 9 ++++++++-
 drivers/led/Makefile | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

Comments

Simon Glass Sept. 3, 2015, 5:57 p.m. UTC | #1
On 30 August 2015 at 16:55, Simon Glass <sjg@chromium.org> wrote:
> At present SPL does not have its own option. But these features can
> increase SPL code size. Adjust the Kconfig and Makefile so that
> separate a SPL option can be selected.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v5:
> - Add new patch to tidy up SPL options for the led and led-gpio
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  drivers/led/Kconfig  | 9 ++++++++-
>  drivers/led/Makefile | 4 ++--
>  2 files changed, 10 insertions(+), 3 deletions(-)

Applied to u-boot-rockchip.
diff mbox

Patch

diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig
index 2987337..fe74403 100644
--- a/drivers/led/Kconfig
+++ b/drivers/led/Kconfig
@@ -11,7 +11,7 @@  config LED
 
 config SPL_LED
 	bool "Enable LED support in SPL"
-	depends on LED
+	depends on SPL && SPL_DM
 	help
 	  The LED subsystem adds a small amount of overhead to the image.
 	  If this is acceptable and you have a need to use LEDs in SPL,
@@ -27,4 +27,11 @@  config LED_GPIO
 	  The GPIO driver must used driver model. LEDs are configured using
 	  the device tree.
 
+config SPL_LED_GPIO
+	bool "LED support for GPIO-connected LEDs in SPL"
+        depends on SPL_LED && DM_GPIO
+	help
+	  This option is an SPL-variant of the LED_GPIO option.
+	  See the help of LED_GPIO for details.
+
 endmenu
diff --git a/drivers/led/Makefile b/drivers/led/Makefile
index 990129e..02367fd 100644
--- a/drivers/led/Makefile
+++ b/drivers/led/Makefile
@@ -5,5 +5,5 @@ 
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-$(CONFIG_LED) += led-uclass.o
-obj-$(CONFIG_LED_GPIO) += led_gpio.o
+obj-y += led-uclass.o
+obj-$(CONFIG_$(SPL_)LED_GPIO) += led_gpio.o