lkml.org 
[lkml]   [2016]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RFT] regulator: max8972: Fix setting ramp delay
From
2016-05-30 16:48 GMT+08:00 Krzysztof Kozlowski <k.kozlowski@samsung.com>:
> On 05/29/2016 01:16 PM, Axel Lin wrote:
>> Current code can set ramp delay to a wrong setting that the return value
>> from .set_voltage_time_sel is not enough for proper delay.
>
> I don't understand what yo wanted to say here. What wrong setting is
> possible? Why do you mention set_voltage_time_sel() here?
>
> Can you elaborate?
>
> The only difference I spotted is how you round up the ramp_delay values.

Assume rdev->constraints->ramp_delay is 20000.

Original code will set MAX8973_RAMP_12mV_PER_US.

However, in regulator_set_voltage_time_sel()
return DIV_ROUND_UP(abs(new_volt - old_volt), ramp_delay);

This return value is not enough if the device is using MAX8973_RAMP_12mV_PER_US
setting.

\
 
 \ /
  Last update: 2016-05-30 11:01    [W:0.059 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site