Hi Tomasz,

El 12/06/2014 21:08, Tomasz Figa escribió:
> Hi Guillermo,
> 
> On 12.06.2014 16:01, Guillermo Rodriguez wrote:
>> I will prepare a patch and send it to the list. Will also check if it is 
>> applicable to mainline as well.
>>
>> Thank you,
>>
>> Guillermo
>>
>> El 12/06/2014 15:52, Juergen Borleis escribió:
>>> Hi Guillermo,
>>>
>>> On Thursday 12 June 2014 15:47:53 Guillermo Rodriguez wrote:
>>>> I am aware this thread is a bit old but I have a patch ready that fixes
>>>> this behaviour. Is anyone interested?
>>>
>>> We are always interested :) Maybe Linux mainline as well.
> 
> What is the latest kernel version you observed this behavior on? AFAIK
> on mainline Linux, since version 3.12, the pwm-samsung driver doesn't
> stop a channel immediately, but instead lets it fully finish current
> period and stop at 0 (the timer is downcounting).

I am currently using 3.7. The latest available in 
OSELAS.BSP-Pengutronix-Mini2440-2013.10.0 is 3.11, which still suffers from the 
same problem (however both 3.10 and 3.11 are broken for the mini2440).

Yesterday I checked to see if my changes were applicable to mainstream and 
realized that indeed a fix for this problem was introduced in 3.12. The fix is 
equivalent to what I did for 3.7 -- instead of clearing the START bit, just 
disable autoreload (which is the recommended procedure according to Samsung's 
documentation), as this guarantees that the PWM output will be left in a known 
state.

I will still send the patch as it is applicable to older kernels.

Guillermo

Reply via email to