[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65ea2969-b528-4a7d-b6ae-21376fe2e517@sirena.org.uk>
Date: Wed, 21 May 2025 11:07:05 +0100
From: Mark Brown <broonie@...nel.org>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: core: do not ignore repeated requests on
stepped regulators
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists