lkml.org 
[lkml]   [2021]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 2/2] regulator: rt6160: Add support for Richtek RT6160
HI, Mark:

Mark Brown <broonie@kernel.org> 於 2021年6月1日 週二 下午11:52寫道:
>
> On Thu, May 27, 2021 at 11:14:17AM +0800, ChiYuan Huang wrote:
>
> > I review the regulator_set_ramp_delay_regmap API.
> > If seems I need to fill in the ramp_delay_table by the descend order.
> > But this chip ramp delay table is designed the ascending value reg bit
> > field [0 1 2 3] by
> > the ascending order [1000 2500 5000 10000] uV/uS
> > Even if I tried to filler in descending order, I also need a inverted operation.
>
> I see... that really should be supportable, and I'd have expected
> find_closest_bigger() to DTRT here, it's not obvious it's expecting
> ordering.
>
> > And I found the regulator_set_ramp_delay_regmap API has some logic error.
> > From the include/linux/regulator/driver.h, the set_ramp_delay function says to
> > set the less or equal one ramp delay value.
> > But your logic will get the larger or equal one from the descending
> > ramp delay table.
>
> The code is correct here, the documentation should be fixed - with a
> delay like this we should be erring on the side of delaying too long to
> be safe.

If so, I will upload v7 patch series to meet this selection logic.
Thanks.

\
 
 \ /
  Last update: 2021-06-02 03:49    [W:0.086 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site