Re: leds-pwm: issue in __led_pwm_set()

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

 



Cc the atmel maintainers that may want to chime in.

On 27/09/2013 17:51, Milo Kim wrote:
> On 09/26/2013 04:48 PM, Alexandre Belloni wrote:
>>
>> Hum, maybe my wording was wrong. What I meant is that when that
>> disabling the PWM channel by using the PWM_DIS
>>   register, the PWM is not driving the pin anymore. Then, the level goes
>> from low (which is correct) to high. Also, the datasheet specifies that
>> the pwm has to be enabled to get the correct level when duty == 0 or
>> duty == period.
>>
>> IIRC, this is not the same on TI SoC where duty == 0 don't give you the
>> expected behavior and I can understand why there is a pwm_disable()
>> there. Maybe we have to have a way to differentiate both cases ?
>>
> Based on your result, PWM_DIS should be updated when the driver is
> unloaded - no PWM consumer anymore.
>
> Why don't you move PWM_DIS register access code from
> atmel_pwm_disable() to atmel_pwm_remove()?
> If it makes sense, the PWM_EN code also needs to be moved to _probe().
>

If we do what you suggest, I'm afraid we will enable pwm channels that
have no consumers. Isn't pwm_disable() suppose to disable the pwm
channels ? I believe that is what is done on the other platforms.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux