linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RX-51: Add missing max_current to rx51_lp5523_led_config
Date: Thu, 19 Sep 2013 23:01:57 +0200	[thread overview]
Message-ID: <201309192301.58761@pali> (raw)
In-Reply-To: <20130918222642.GK9994@atomide.com>

[-- 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 --]

  reply	other threads:[~2013-09-19 21:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201309192301.58761@pali \
    --to=pali.rohar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).