From: ChiYuan Huang <u0084500@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, Rob Herring <robh+dt@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
cy_huang <cy_huang@richtek.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] regulator: rt6160: Add support for Richtek RT6160
Date: Wed, 2 Jun 2021 09:48:34 +0800 [thread overview]
Message-ID: <CADiBU380OPfhBv9-cToR2sstxPWQwgt2_TEisLi7zPn4P5rvBQ@mail.gmail.com> (raw)
In-Reply-To: <20210601155239.GD4089@sirena.org.uk>
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.
prev parent reply other threads:[~2021-06-02 1:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 5:47 [PATCH v4 1/2] regulator: rt6160: Add DT binding document for Richtek RT6160 cy_huang
2021-05-26 5:47 ` [PATCH v4 2/2] regulator: rt6160: Add support " cy_huang
2021-05-26 10:51 ` Mark Brown
2021-05-26 15:04 ` ChiYuan Huang
2021-05-27 3:14 ` ChiYuan Huang
2021-06-01 15:52 ` Mark Brown
2021-06-02 1:48 ` ChiYuan Huang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADiBU380OPfhBv9-cToR2sstxPWQwgt2_TEisLi7zPn4P5rvBQ@mail.gmail.com \
--to=u0084500@gmail.com \
--cc=broonie@kernel.org \
--cc=cy_huang@richtek.com \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).