* [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config
@ 2013-09-18 21:52 Pali Rohár
2013-09-18 22:26 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2013-09-18 21:52 UTC (permalink / raw)
To: Tony Lindgren, Russell King; +Cc: linux-omap, linux-kernel, Pali Rohár
Without max_current data in board file lp5523 driver does not change current.
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 9326890..d0f857c 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -180,38 +180,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = {
.name = "lp5523:kb1",
.chan_nr = 0,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb2",
.chan_nr = 1,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb3",
.chan_nr = 2,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb4",
.chan_nr = 3,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:b",
.chan_nr = 4,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:g",
.chan_nr = 5,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:r",
.chan_nr = 6,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb5",
.chan_nr = 7,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb6",
.chan_nr = 8,
.led_current = 50,
+ .max_current = 255,
}
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-18 21:52 [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config Pali Rohár
@ 2013-09-18 22:26 ` Tony Lindgren
2013-09-19 21:01 ` Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2013-09-18 22:26 UTC (permalink / raw)
To: Pali Rohár; +Cc: Russell King, linux-omap, linux-kernel
* Pali Rohár <pali.rohar@gmail.com> [130918 15:02]:
> Without max_current data in board file lp5523 driver does not change current.
Hmm is this a regression or are there other reasons to merge
this during the -rc cycle?
Regards,
Tony
> 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 9326890..d0f857c 100644
> --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> @@ -180,38 +180,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = {
> .name = "lp5523:kb1",
> .chan_nr = 0,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:kb2",
> .chan_nr = 1,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:kb3",
> .chan_nr = 2,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:kb4",
> .chan_nr = 3,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:b",
> .chan_nr = 4,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:g",
> .chan_nr = 5,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:r",
> .chan_nr = 6,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:kb5",
> .chan_nr = 7,
> .led_current = 50,
> + .max_current = 255,
> }, {
> .name = "lp5523:kb6",
> .chan_nr = 8,
> .led_current = 50,
> + .max_current = 255,
> }
> };
>
> --
> 1.7.10.4
>
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-18 22:26 ` Tony Lindgren
@ 2013-09-19 21:01 ` Pali Rohár
2013-09-19 21:29 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2013-09-19 21:01 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Russell King, linux-omap, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 2621 bytes --]
On Thursday 19 September 2013 00:26:43 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [130918 15:02]:
> > Without max_current data in board file lp5523 driver does
> > not change current.
>
> Hmm is this a regression or are there other reasons to merge
> this during the -rc cycle?
>
I think this is regression, drivers/leds/leds-lp55xx-common.c
code refuse to change led_current sysfs attribute if value is
higher than max_current specified in board file. And because in
board file max_current is not specified it is by default zero as
global variable. So changing led_current is not possible because
any positive value is more than zero. First I saw this behaviour
in 3.10, but I forgot to send this patch.
> Regards,
>
> Tony
>
> > 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
> > 9326890..d0f857c 100644
> > --- a/arch/arm/mach-omap2/board-rx51-peripherals.c
> > +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
> > @@ -180,38 +180,47 @@ static struct lp55xx_led_config
> > rx51_lp5523_led_config[] = {
> >
> > .name = "lp5523:kb1",
> > .chan_nr = 0,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:kb2",
> > .chan_nr = 1,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:kb3",
> > .chan_nr = 2,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:kb4",
> > .chan_nr = 3,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:b",
> > .chan_nr = 4,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:g",
> > .chan_nr = 5,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:r",
> > .chan_nr = 6,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:kb5",
> > .chan_nr = 7,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }, {
> >
> > .name = "lp5523:kb6",
> > .chan_nr = 8,
> > .led_current = 50,
> >
> > + .max_current = 255,
> >
> > }
> >
> > };
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-19 21:01 ` Pali Rohár
@ 2013-09-19 21:29 ` Tony Lindgren
2013-09-19 22:20 ` Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2013-09-19 21:29 UTC (permalink / raw)
To: Pali Rohár; +Cc: Russell King, linux-omap, linux-kernel
* Pali Rohár <pali.rohar@gmail.com> [130919 14:10]:
> On Thursday 19 September 2013 00:26:43 Tony Lindgren wrote:
> > * Pali Rohár <pali.rohar@gmail.com> [130918 15:02]:
> > > Without max_current data in board file lp5523 driver does
> > > not change current.
> >
> > Hmm is this a regression or are there other reasons to merge
> > this during the -rc cycle?
> >
>
> I think this is regression, drivers/leds/leds-lp55xx-common.c
> code refuse to change led_current sysfs attribute if value is
> higher than max_current specified in board file. And because in
> board file max_current is not specified it is by default zero as
> global variable. So changing led_current is not possible because
> any positive value is more than zero. First I saw this behaviour
> in 3.10, but I forgot to send this patch.
OK thanks, can you please update the patch description with
that so I can merge it for the -rc cycle? Ideally of course
with the breaking commit too.
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-19 21:29 ` Tony Lindgren
@ 2013-09-19 22:20 ` Pali Rohár
2013-09-23 12:50 ` [PATCH v2] " Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2013-09-19 22:20 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Russell King, linux-omap, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 3116 bytes --]
On Thursday 19 September 2013 23:29:22 Tony Lindgren wrote:
> * Pali Rohár <pali.rohar@gmail.com> [130919 14:10]:
> > On Thursday 19 September 2013 00:26:43 Tony Lindgren wrote:
> > > * Pali Rohár <pali.rohar@gmail.com> [130918 15:02]:
> > > > Without max_current data in board file lp5523 driver
> > > > does not change current.
> > >
> > > Hmm is this a regression or are there other reasons to
> > > merge this during the -rc cycle?
> >
> > I think this is regression,
> > drivers/leds/leds-lp55xx-common.c code refuse to change
> > led_current sysfs attribute if value is higher than
> > max_current specified in board file. And because in board
> > file max_current is not specified it is by default zero as
> > global variable. So changing led_current is not possible
> > because any positive value is more than zero. First I saw
> > this behaviour in 3.10, but I forgot to send this patch.
>
> OK thanks, can you please update the patch description with
> that so I can merge it for the -rc cycle? Ideally of course
> with the breaking commit too.
>
> Regards,
>
> Tony
I do not know which commit broke it. There was some change in lp driver which
caused that driver not worked with testing applications. Now it should be fixed.
So I resending my patch with updated description.
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 value 255.
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 9326890..d0f857c 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -180,38 +180,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = {
.name = "lp5523:kb1",
.chan_nr = 0,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb2",
.chan_nr = 1,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb3",
.chan_nr = 2,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb4",
.chan_nr = 3,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:b",
.chan_nr = 4,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:g",
.chan_nr = 5,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:r",
.chan_nr = 6,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb5",
.chan_nr = 7,
.led_current = 50,
+ .max_current = 255,
}, {
.name = "lp5523:kb6",
.chan_nr = 8,
.led_current = 50,
+ .max_current = 255,
}
};
--
1.7.10.4
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-19 22:20 ` Pali Rohár
@ 2013-09-23 12:50 ` Pali Rohár
2013-09-23 13:06 ` joerg Reisenweber
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2013-09-23 12:50 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Russell King, linux-omap, linux-kernel, joerg
[-- Attachment #1: Type: Text/Plain, Size: 1965 bytes --]
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,
}
};
--
1.7.10.4
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-23 12:50 ` [PATCH v2] " Pali Rohár
@ 2013-09-23 13:06 ` joerg Reisenweber
2013-10-08 18:29 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: joerg Reisenweber @ 2013-09-23 13:06 UTC (permalink / raw)
To: Pali Rohár, Tony Lindgren; +Cc: Russell King, linux-omap, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 2664 bytes --]
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
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
(alas the above page got scrapped due to resignation(!!), so here some
supplementary links:)
http://www.georgedillon.com/web/html_email_is_evil.shtml
http://www.nonhtmlmail.org/campaign.html
http://www.georgedillon.com/web/html_email_is_evil_still.shtml
http://www.gerstbach.at/2004/ascii/ (German)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] RX-51: Add missing max_current to rx51_lp5523_led_config
2013-09-23 13:06 ` joerg Reisenweber
@ 2013-10-08 18:29 ` Tony Lindgren
0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2013-10-08 18:29 UTC (permalink / raw)
To: joerg Reisenweber; +Cc: Pali Rohár, Russell King, linux-omap, linux-kernel
* 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-08 18:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 21:52 [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config Pali Rohár
2013-09-18 22:26 ` Tony Lindgren
2013-09-19 21:01 ` Pali Rohár
2013-09-19 21:29 ` Tony Lindgren
2013-09-19 22:20 ` Pali Rohár
2013-09-23 12:50 ` [PATCH v2] " Pali Rohár
2013-09-23 13:06 ` joerg Reisenweber
2013-10-08 18:29 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).