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. Thierry
pgp_6Rdqha4r3.pgp
Description: PGP signature
