[lkml]   [2016]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] regulator: pwm: Fix regulator ramp delay for continuous mode

On Wed, Jul 6, 2016 at 5:27 AM, Boris Brezillon
<> wrote:
> On Mon, 27 Jun 2016 21:53:11 -0700
> Douglas Anderson <> wrote:
>> The original commit adding support for continuous voltage mode didn't
>> handle the regulator ramp delay properly. It treated the delay as a
>> fixed delay in uS despite the property being defined as uV / uS. Let's
>> adjust it. Luckily there appear to be no users of this ramp delay for
>> PWM regulators (as per grepping through device trees in linuxnext).
>> Note also that the upper bound of usleep_range probably shouldn't be a
>> full 1 ms longer than the lower bound since I've seen plenty of hardware
>> with a ramp rate of ~5000 uS / uV and for small jumps the total delays
>> are in the tens of uS. 1000 is way too much. We'll try to be dynamic
>> and use 10%
> I realize I may have introduced another bug when adding the
> ->enable()/disable() methods: we are only waiting for the ramp up delay
> when changing the voltage, but it should probably be applied when
> enabling the PWM, and conditionally applied when changing the voltage
> only if the PWM is enabled.

I'll certainly let Mark comment here, but:

* For enabling the PWM, I think you want want "regulator-enable-ramp-delay".

* Right, we probably shouldn't be delaying if the regulator is off.
I'll add that to my patch.


 \ /
  Last update: 2016-07-06 21:01    [W:0.146 / U:9.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site