lkml.org 
[lkml]   [2018]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND] pwm: berlin: Don't use broken prescaler values
On Mon, Jun 04, 2018 at 02:32:41PM -0400, Thomas Hebb wrote:
> Six of the eight prescaler values available for Berlin PWM are not true
> prescalers but rather internal shifts that throw away the high bits of
> TCNT. Currently, we attempt to use those high bits, leading to erratic
> behavior. Restrict the prescaler configurations we select to only the
> two that respect the full range of TCNT.
>
> Tested on BG2CD.
>
> Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
> ---
> drivers/pwm/pwm-berlin.c | 45 ++++++++++++++++++++++------------------
> 1 file changed, 25 insertions(+), 20 deletions(-)

Antoine, Jisheng,

can you guys review this patch? I'm personally on the fence about this,
even if we can technically do the shift in software, I don't necessarily
see a reason why we can't "offload" to the hardware.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-06-05 11:10    [W:0.052 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site