From: Mark Brown <broonie@kernel.org>
To: Mike Looijmans <mike.looijmans@topic.nl>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 2/2] regulator: pwm-regulator: Revert "Add validity checks in continuous .get_voltage"
Date: Fri, 6 Nov 2026 13:37:18 +0000 [thread overview]
Message-ID: <27e5c94a-acf2-4e32-92df-e3de124e0bc6@sirena.org.uk> (raw)
In-Reply-To: <20261106130010.340950-2-mike.looijmans@topic.nl>
[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]
On Fri, Nov 06, 2026 at 01:59:56PM +0100, Mike Looijmans wrote:
> This reverts commit c92688cac239 ("regulator: pwm-regulator: Add validity
> checks in continuous .get_voltage").
And again... please don't try to sneak changes past people :/
> The core, and in particular the machine_constraints_voltage() method,
> expects the regulator to report what the current setting is, even if that
> is outside the allowed range. The core will then bring the voltage into
> that range. It cannot do that if the regulator refuses to return its
> setting, and causes probe() to fail for a pwm-regulator when it has
> restrictions to the PWM range with messages like:
> dsp7-pwm: failed to get the current voltage: -ENOTRECOVERABLE
> pwm-regulator dsp7-supply-pwm: error -ENOTRECOVERABLE: Failed to register
> regulator pwm-regulator
> pwm-regulator dsp7-supply-pwm: probe with driver pwm-regulator failed
> with error -131
>
> Besides that, regulator_get_voltage() is not supposed to return any
> state information, as is mentioned in the API documentation.
>
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> ---
>
> drivers/regulator/pwm-regulator.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
> index f50530c77d92f..00fcf9a172b47 100644
> --- a/drivers/regulator/pwm-regulator.c
> +++ b/drivers/regulator/pwm-regulator.c
> @@ -158,9 +158,6 @@ static int pwm_regulator_get_voltage(struct regulator_dev *rdev)
> pwm_get_state(drvdata->pwm, &pstate);
>
> voltage = pwm_get_relative_duty_cycle(&pstate, duty_unit);
> - if (voltage < min(max_uV_duty, min_uV_duty) ||
> - voltage > max(max_uV_duty, min_uV_duty))
> - return -ENOTRECOVERABLE;
>
> /*
> * The dutycycle for min_uV might be greater than the one for max_uV.
> ---
> base-commit: f66469d9905b39d2c260a15d7d6db450f4db67c1
> branch: linux-master-pwm-regulator
>
> --
> 2.43.0
>
>
> Met vriendelijke groet / kind regards,
>
> Mike Looijmans
> System Expert
>
>
> TOPIC Embedded Products B.V.
> Materiaalweg 4, 5681 RJ Best
> The Netherlands
>
> T: +31 (0) 499 33 69 69
> E: mike.looijmans@topic.nl
> W: www.topic.nl
>
> Please consider the environment before printing this e-mail
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-11-06 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.44efb263-5265-4fae-9cff-e8eaefbc0afd@emailsignatures365.codetwo.com>
2026-11-06 12:59 ` [PATCH 1/2] regulator: pwm-regulator: Revert "Calculate the output voltage for disabled PWMs" Mike Looijmans
[not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.6954786b-65e0-4206-a0c4-60cd251dbec9@emailsignatures365.codetwo.com>
2026-11-06 12:59 ` [PATCH 2/2] regulator: pwm-regulator: Revert "Add validity checks in continuous .get_voltage" Mike Looijmans
2026-11-06 13:37 ` Mark Brown [this message]
2026-11-06 13:36 ` [PATCH 1/2] regulator: pwm-regulator: Revert "Calculate the output voltage for disabled PWMs" Mark Brown
2026-11-06 13:56 ` Mike Looijmans
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=27e5c94a-acf2-4e32-92df-e3de124e0bc6@sirena.org.uk \
--to=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mike.looijmans@topic.nl \
/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®