Re: Re: Re: [PATCH v3 1/4] leds: leds-pwm: Convert to use devm_get_pwm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 11, 2012 at 09:57:51AM +0100, Peter Ujfalusi wrote:
> On Tuesday 11 December 2012 09:36:35 Thierry Reding wrote:
> > > > The commit message says that legacy mode is used as fallback if
> > > > devm_get_pwm() (that should really be devm_pwm_get() btw) fails but I
> > > > don't see where pwm_request() is called.
> > > 
> > > Oh, true. The fallback has been removed based on earlier comment from
> > > Bryan
> > > Wu. I will correct the commit message.
> > 
> > I'm not so sure that's a good idea. After all there may still be users
> > who rely on the legacy behaviour.
> 
> The only user of leds_pwm is arch/arm/mach-omap2/board-4430sdp.c. Even that is 
> not working because it uses wrong ID number to request the pwm.
> The legacy request type needs the id number of the PWM it want to use. But if 
> you have multiple PWM devices there is not way to guess the ID for the PWM. 
> Using the pwm_get() along with pwm_lookup is the only way to get thing 
> working.
> For example with twl4030 we have 2 PWM chips, both provides 2 PWMs. The ID 
> number of the PWMs will depend on the load order of the drivers. If they are 
> built in they are going to be in the same order most of the time, but if they 
> are modules they can be loaded in different order.
> 
> I think we should not use fallback in leds-pwm to avoid new boards to use the 
> legacy API.

Okay, if there are no intree users that may be broken, then it should be
fine to remove it. In that case you might want to remove the pwm_id
field as well instead of deprecating it in this patch.

Thierry

Attachment: pgpAdRPhuRDDD.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux