lkml.org 
[lkml]   [2017]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] pwm: pca9685: fix prescaler initialization
On Thu, Jan 19, 2017 at 06:10:08PM +0200, Andy Shevchenko wrote:
> Combining with your proposal I would see the best approach is to set
> pca->period_ns accordingly to current prescaler value if you want to.

Yes, I agree.

> In your patch I see no benefit, since it's quite unlikely user will want
> to have 5ms period among all possibilities.

It is the hardware default, but you are right, the user probably does
not care about that.

> So, summarize, I prefer (in order of preference from high to low):
> - enforce default prescaler value based on default period (it's just one
> line to write a register)
> - calculate default period based on actual prescaler value

Let's go with this one. I'll spin up a v2 where I calculate the
period_ns value from the current prescaler value in the probe function.

--

Thierry: I think you could merge v1 of patch 1/2 from my series
independently.

I'll send v2 of patch 2/2 with aforementioned changes in the next days.

Thanks,
Clemens

\
 
 \ /
  Last update: 2017-01-19 17:52    [W:0.116 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site