[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210601155239.GD4089@sirena.org.uk>
Date: Tue, 1 Jun 2021 16:52:39 +0100
From: Mark Brown <broonie@...nel.org>
To: ChiYuan Huang <u0084500@...il.com>
Cc: lgirdwood@...il.com, Rob Herring <robh+dt@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
cy_huang <cy_huang@...htek.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH v4 2/2] regulator: rt6160: Add support for Richtek RT6160
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists