diff mbox

[v2] RX-51: Add missing max_current to rx51_lp5523_led_config

Message ID 201309231450.12171@pali (mailing list archive)
State New, archived
Headers show

Commit Message

Pali Rohár Sept. 23, 2013, 12:50 p.m. UTC
Hi Tony,

here is new version (v2) of patch which adding max_current values to rx51 board data.
According to joerg safe value for max_current is 100 (10 mA).


RX-51: Add missing max_current to rx51_lp5523_led_config

File drivers/leds/leds-lp55xx-common.c refuse to change led_current sysfs
attribute if value is higher than max_current specified in board file. By default
global C variables are zero, so changing always failed. This patch adding missing
max_current and setting it to max safe value 100 (10 mA).

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    9 +++++++++
 1 file changed, 9 insertions(+)

Comments

joerg Reisenweber Sept. 23, 2013, 1:06 p.m. UTC | #1
On Mon 23 September 2013 14:50:12 Pali Rohár wrote:
> Hi Tony,
> 
> here is new version (v2) of patch which adding max_current values to rx51
> board data. According to joerg safe value for max_current is 100 (10 mA).
> 
> 
> RX-51: Add missing max_current to rx51_lp5523_led_config
> 
> File drivers/leds/leds-lp55xx-common.c refuse to change led_current sysfs
> attribute if value is higher than max_current specified in board file. By
> default global C variables are zero, so changing always failed. This patch
> adding missing max_current and setting it to max safe value 100 (10 mA).
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> ---
>  arch/arm/mach-omap2/board-rx51-peripherals.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c
> b/arch/arm/mach-omap2/board-rx51-peripherals.c index c3270c0..f6fe388
> 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -167,38 +167,47 @@ static struct lp55xx_led_config
> rx51_lp5523_led_config[] = { .name		= "lp5523:kb1",
>  		.chan_nr	= 0,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:kb2",
>  		.chan_nr	= 1,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:kb3",
>  		.chan_nr	= 2,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:kb4",
>  		.chan_nr	= 3,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:b",
>  		.chan_nr	= 4,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:g",
>  		.chan_nr	= 5,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:r",
>  		.chan_nr	= 6,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:kb5",
>  		.chan_nr	= 7,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}, {
>  		.name		= "lp5523:kb6",
>  		.chan_nr	= 8,
>  		.led_current	= 50,
> +		.max_current	= 100,
>  	}
>  };

Reviewed and found logically and technically correct
Signed-off-by: Joerg Reisenweber <joerg AT openmoko DOT org>

/jOERG
Tony Lindgren Oct. 8, 2013, 6:29 p.m. UTC | #2
* joerg Reisenweber <joerg@openmoko.org> [130923 06:14]:
> On Mon 23 September 2013 14:50:12 Pali Rohár wrote:
> > Hi Tony,
> > 
> > here is new version (v2) of patch which adding max_current values to rx51
> > board data. According to joerg safe value for max_current is 100 (10 mA).
> > 
> > 
> > RX-51: Add missing max_current to rx51_lp5523_led_config
> > 
> > File drivers/leds/leds-lp55xx-common.c refuse to change led_current sysfs
> > attribute if value is higher than max_current specified in board file. By
> > default global C variables are zero, so changing always failed. This patch
> > adding missing max_current and setting it to max safe value 100 (10 mA).
...
 
> Reviewed and found logically and technically correct
> Signed-off-by: Joerg Reisenweber <joerg AT openmoko DOT org>

Thanks, I'll apply this into omap-for-v3.12/fixes as it's a
regression.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index c3270c0..f6fe388 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -167,38 +167,47 @@  static struct lp55xx_led_config rx51_lp5523_led_config[] = {
 		.name		= "lp5523:kb1",
 		.chan_nr	= 0,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:kb2",
 		.chan_nr	= 1,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:kb3",
 		.chan_nr	= 2,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:kb4",
 		.chan_nr	= 3,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:b",
 		.chan_nr	= 4,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:g",
 		.chan_nr	= 5,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:r",
 		.chan_nr	= 6,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:kb5",
 		.chan_nr	= 7,
 		.led_current	= 50,
+		.max_current	= 100,
 	}, {
 		.name		= "lp5523:kb6",
 		.chan_nr	= 8,
 		.led_current	= 50,
+		.max_current	= 100,
 	}
 };