> From: Thierry Reding [mailto:thierry.red...@avionic-design.de]
> Sent: Wednesday, March 13, 2013 1:59 PM
> To: Andrew Chew
> Cc: Peter Ujfalusi; Alex Courbot; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/2 v2] ARM: OMAP: board-4430sdp: Provide regulator
> to pwm-backlight
> 
> * PGP Signed by an unknown key
> 
> On Wed, Mar 13, 2013 at 01:38:31PM -0700, Andrew Chew wrote:
> > > > +/* Dummy regulator for pwm-backlight driver */ static struct
> > > > +regulator_consumer_supply backlight_supply =
> > > > +       REGULATOR_SUPPLY("enable", NULL);
> > >
> > > 'enable' is just too generic, the device name should be also provided:
> > >   REGULATOR_SUPPLY("enable", "pwm-backlight");
> >
> > You're right.  I don't like how generic it is as well.  But I don't
> > think "pwm-backlight" works...at least, not for me when I test it.
> > What does work is "backlight.x" where x is some number (for me, it's 1).
> > Problem is, I don't know what it would be for you.  If only there was
> > a way to wildcard that...
> >
> > Would it be better if we called the regulator something other than
> > "enable"?  Maybe "backlight-enable", or "bl-enable" for brevity?
> 
> The second parameter needs to match the device name. For the 4430sdp
> board this should be "pwm-backlight" since the name will be generated from
> the .name and .id fields of the struct platform_device. .id = -1 will result 
> in no
> .<id> suffix being attached, so the device should be named "pwm-backlight".
> The first parameter needs to match the name of the supply that the driver
> requests, so "enable" is correct since the call to regulator_get() uses that.

Ah, I see.  That makes sense.  Thanks, Thierry!  "pwm-backlight" it is, then,
and I'll make sure to check for this for the other boards.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to