Messages in this thread | | | Date | Tue, 5 Jun 2018 11:10:02 +0200 | From | Thierry Reding <> | Subject | Re: [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] | |