Re: [PATCH] pwm: atmel-pwm: fix calculation of prescale value

2014-09-25 Thread Nikolaus Voss
Hi Thierry, On Thu, 25 Sep 2014, Thierry Reding wrote: Please Cc the linux-...@vger.kernel.org mailing list for PWM-related patches in the future. ok, I ran get_maintainer.pl on an old kernel... Also a couple more comments: In the patch description: "pwm frequency" should be "PWM frequency"

Re: [PATCH] pwm: atmel-pwm: fix calculation of prescale value

2014-09-25 Thread Thierry Reding
On Thu, Sep 25, 2014 at 09:47:34AM +0200, Nikolaus Voss wrote: > On Thu, 25 Sep 2014, Thierry Reding wrote: [...] > >>- } > >>+ div >>= 1; > >>+ ++pres; > > > >Unless you really need the prefix increment behaviour (you don't in this > >case) I prefer using the postfix

Re: [PATCH] pwm: atmel-pwm: fix calculation of prescale value

2014-09-24 Thread Thierry Reding
On Tue, Sep 23, 2014 at 03:30:21PM +0200, Nikolaus Voss wrote: > The prescale value used for calculating the period was incremented > afterwards, thus the resulting prescale value is by one too high. > This resulted in a pwm frequency only half as high as requested. > > This patch moves the 64 bit

Re: [PATCH] pwm: atmel-pwm: fix calculation of prescale value

2014-09-24 Thread Bo Shen
Hi, Correct the PWM maintainer Thierry Reding's e-mail address. and Add linux-arm-kernel ML. On 09/25/2014 09:50 AM, Bo Shen wrote: Hi Nikolaus Voss, On 09/23/2014 09:30 PM, Nikolaus Voss wrote: The prescale value used for calculating the period was incremented afterwards, thus the resulting

Re: [PATCH] pwm: atmel-pwm: fix calculation of prescale value

2014-09-24 Thread Bo Shen
Hi Nikolaus Voss, On 09/23/2014 09:30 PM, Nikolaus Voss wrote: The prescale value used for calculating the period was incremented afterwards, thus the resulting prescale value is by one too high. This resulted in a pwm frequency only half as high as requested. This patch moves the 64 bit divisi

[PATCH] pwm: atmel-pwm: fix calculation of prescale value

2014-09-23 Thread Nikolaus Voss
The prescale value used for calculating the period was incremented afterwards, thus the resulting prescale value is by one too high. This resulted in a pwm frequency only half as high as requested. This patch moves the 64 bit division out of the prescale loop to correct the above issue and make th