cm-t35: move the leds code to common place
PATCH 1/1 cm-t35: move the leds code to common place
Compulab boards can use the same leds code, so move the leds related code to live under board/compulab/common directory.
---
Tom,
AFAIU the merge window closes on Thursday.
Can we please have this patch in for 2014.01?
Thanks!
Sorry, if anyone gets this message twice...
I had a problem with my mailer...
board/compulab/cm_t35/Makefile | 2 +-
board/compulab/common/Makefile | 1 +
board/compulab/{cm_t35 => common}/leds.c | 0
3 files changed, 2 insertions(+), 1 deletion(-)
rename board/compulab/{cm_t35 => common}/leds.c (100%)board/compulab/cm_t35/Makefile +1 -1
@@ -11,7 +11,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := cm_t35.o leds.o $(COBJS-y) +COBJS := cm_t35.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/compulab/common/Makefile +1 -0
@@ -16,6 +16,7 @@ LIB = $(obj)lib$(VENDOR).o COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o COBJS-$(CONFIG_LCD) += omap3_display.o +COBJS-$(CONFIG_STATUS_LED) += leds.o COBJS := $(COBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/compulab/common/leds.c renamed from board/compulab/cm_t35/leds.c +0 -0
Signature · 1 line
1.8.1.5
PATCH 1/1 cm-t35: use gpio_led driver for status led
Switch to using the generic gpio_led driver instead of the private to cm_t35 board led implementation.
--- board/compulab/cm_t35/Makefile | 2 +- board/compulab/cm_t35/leds.c | 33 --------------------------------- include/configs/cm_t35.h | 9 +++++---- 3 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 board/compulab/cm_t35/leds.c
board/compulab/cm_t35/Makefile +1 -1
@@ -11,7 +11,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := cm_t35.o leds.o $(COBJS-y) +COBJS := cm_t35.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/compulab/cm_t35/leds.c deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* (C) Copyright 2011 - 2013 CompuLab, Ltd. <www.compulab.co.il> -* -* Author: Igor Grinberg <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <status_led.h> -#include <asm/gpio.h> - -static unsigned int leds[] = {GREEN_LED_GPIO }; - -void __led_init (led_id_t mask,int state) -{ -if (gpio_request (leds[mask],"" ) !=0 ) { -printf ("%s: failed requesting GPIO%u\n" , __func__, leds[mask]); -return ; - } - -gpio_direction_output (leds[mask],0 ); -} - -void __led_set (led_id_t mask,int state) -{ -gpio_set_value (leds[mask], state ==STATUS_LED_ON ); -} - -void __led_toggle (led_id_t mask) -{ -gpio_set_value (leds[mask], !gpio_get_value (leds[mask])); -}
include/configs/cm_t35.h +5 -4
@@ -303,12 +303,13 @@/* Status LED */ #define CONFIG_STATUS_LED /* Status LED enabled */ #define CONFIG_BOARD_SPECIFIC_LED -#define STATUS_LED_GREEN 0 -#define STATUS_LED_BIT STATUS_LED_GREEN +#define CONFIG_GPIO_LED +#define GREEN_LED_GPIO 186/* CM-T35 Green LED is GPIO186 */ +#define GREEN_LED_DEV 0 +#define STATUS_LED_BIT GREEN_LED_GPIO#define STATUS_LED_STATE STATUS_LED_ON#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) -#define STATUS_LED_BOOT STATUS_LED_BIT -#define GREEN_LED_GPIO 186/* CM-T35 Green LED is GPIO186 */ +#define STATUS_LED_BOOT GREEN_LED_DEV#define CONFIG_SPLASHIMAGE_GUARD
Signature · 1 line
1.8.1.5
[U-Boot] cm-t35: use gpio_led driver for status led
Quoted 5 lines · Igor Grinberg
Switch to using the generic
gpio_leddriver instead of the private tocm_t35board led implementation.Signed-off-by Igor Grinberg <[email protected]>Tested-by Nikita Kiryanov <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131112/98d38759/attachment.pgp>
PATCH 1/1 cm-t35: move the leds code to common place
In reply to Igor GrinbergHi Tom,
Please, disregard this patch in favor to the new one I've just sent.
Thanks and sorry for the noise!
Quoted 53 lines · Igor Grinberg
Compulab boards can use the same leds code, so move the leds related code to live under board/compulab/common directory.
Signed-off-by Igor Grinberg <[email protected]>Tested-by Nikita Kiryanov <[email protected]>---
Tom,AFAIU the merge window closes on Thursday.
Can we please have this patch in for 2014.01?Thanks!
Sorry, if anyone gets this message twice...
I had a problem with my mailer...board/compulab/cm_t35/Makefile | 2 +- board/compulab/common/Makefile | 1 + board/compulab/{cm_t35 => common}/leds.c | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename board/compulab/{cm_t35 => common}/leds.c (100%)board/compulab/cm_t35/Makefile +1
-1@@ -11,7 +11,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := cm_t35.o leds.o $(COBJS-y) +COBJS := cm_t35.o $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))board/compulab/common/Makefile +1
-0@@ -16,6 +16,7 @@ LIB = $(obj)lib$(VENDOR).o COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o COBJS-$(CONFIG_LCD) += omap3_display.o +COBJS-$(CONFIG_STATUS_LED) += leds.o COBJS := $(COBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)board/compulab/common/leds.c renamed from board/compulab/cm_t35/leds.c +0
-0
Signature · 2 lines
Regards, Igor.