From: Romain Gantois <romain.gantois@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: core: do not ignore repeated requests on stepped regulators
Date: Wed, 21 May 2025 13:50:22 +0200 [thread overview]
Message-ID: <6190301.lOV4Wx5bFT@fw-rgant> (raw)
In-Reply-To: <65ea2969-b528-4a7d-b6ae-21376fe2e517@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
On Wednesday, 21 May 2025 12:07:05 CEST Mark Brown wrote:
> On Wed, May 21, 2025 at 10:47:24AM +0200, Romain Gantois wrote:
> > Currently, the regulator_set_voltage() function will assume a noop if a
> > consumer requests the same voltage range twice in a row.
> >
> > This can lead to unexpected behavior if the target regulator has a maximum
> > voltage step constraint. With such constraints, the regulator core may
> > clamp the requested voltage to a lesser value, to ensure that the voltage
> > delta stays under the specified limit.
>
> No, if there's an issue here we should handle it the first time we set
> the voltage by doing multiple steps in one set_voltage() call. Having
> individual client drivers all having to repeatedly call set_voltage() is
> obviously not a good API.
Understood, would it make sense to handle this directly in
regulator_set_voltage_unlocked()? For example by checking for a max_uV_step
condition and repeating calls to regulator_do_balance_voltage() until the
resulting voltage stabilizes?
Thanks,
--
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-05-21 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 8:47 Romain Gantois
2025-05-21 10:07 ` Mark Brown
2025-05-21 11:50 ` Romain Gantois [this message]
2025-05-21 12:25 ` Mark Brown
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=6190301.lOV4Wx5bFT@fw-rgant \
--to=romain.gantois@bootlin.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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
all inboxes | Powered by JetHome®