mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Louvel" <paul.louvel@bootlin.com>
To: "Conor Dooley" <conor@kernel.org>,
	"Paul Louvel" <paul.louvel@bootlin.com>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Herve Codina" <herve.codina@bootlin.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>
Subject: Re: [PATCH 1/5] regulator: dt-bindings: Add regulator-boot-force-off property
Date: Wed, 21 Oct 2026 19:11:51 +0200	[thread overview]
Message-ID: <DMAOMKRB8DT6.2DUZQCDZW47X2@bootlin.com> (raw)
In-Reply-To: <20261021-wind-reopen-490475bc470d@spud>

On Wed Oct 21, 2026 at 7:01 PM CEST, Conor Dooley wrote:
> On Wed, Oct 21, 2026 at 12:27:42PM +0200, Paul Louvel wrote:
>> Introduce a new property to immediately disable the regulator at boot
>> time.
>> This property is useful when a consumer device may query the state of
>> the regulator at boot time, and want to disable it right away, without a
>> prior regulator_enable().
>> 
>> Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
>> ---
>>  Documentation/devicetree/bindings/regulator/regulator.yaml | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>> 
>> diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/Documentation/devicetree/bindings/regulator/regulator.yaml
>> index 019aeb664cae..2da8f70d7e7a 100644
>> --- a/Documentation/devicetree/bindings/regulator/regulator.yaml
>> +++ b/Documentation/devicetree/bindings/regulator/regulator.yaml
>> @@ -41,6 +41,14 @@ properties:
>>      description: boolean, regulator should never be disabled
>>      type: boolean
>>  
>> +  regulator-boot-force-off:
>> +    description: a regulator may be enabled by default when the system powers up.
>> +      A consumer may query the regulator's state during boot and disable it if
>> +      it is already enabled, potentially resulting in an unbalanced disable
>> +      operation. This property ensures that the regulator is disabled at boot,
>> +      regardless of its previous state.
>
> To be honest, I'm not sure how the commentary about querying the state
> or being unbalanced is relevant to the description - that sounds like
> something specific to the linux regulator framework?

Yes it is. Maybe I miss something, does this binding is used outside linux ?

>
> In fact, I'm not sure why this is needed at all? Can't you just change
> the software so that it is okay to disable a regulator that has an
> explicit enable count of zero?
>

Do you mean by calling regulator_force_disable() instead ? I thinked about that
but I don't think this is ideal.
Or just patch the core to allow unbalanced disable downstream ?
My intent was to provide an upstream solution to the problem I described in the
cover letter.

>> +    type: boolean
>> +
>>    regulator-boot-on:
>>      description: bootloader/firmware enabled regulator.
>>        It's expected that this regulator was left on by the bootloader.
>> 
>> -- 
>> 2.56.0
>> 





-- 
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2026-10-21 17:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 10:27 [PATCH 0/5] Add TI LM51772 buck-boost voltage regulator Paul Louvel
2026-10-21 10:27 ` [PATCH 1/5] regulator: dt-bindings: Add regulator-boot-force-off property Paul Louvel
2026-10-21 17:01   ` Conor Dooley
2026-10-21 17:11     ` Paul Louvel [this message]
2026-10-21 10:27 ` [PATCH 2/5] regulator: dt-bindings: Add TI LM51772 support Paul Louvel
2026-10-21 10:27 ` [PATCH 3/5] regulator: core: Add mechanism to force disable a regulator at boot Paul Louvel
2026-10-21 10:27 ` [PATCH 4/5] regulator: Support regulators where the voltage selector spans two registers Paul Louvel
2026-10-21 10:27 ` [PATCH 5/5] regulator: Add TI LM51772 support Paul Louvel
2026-10-21 15:10   ` Uwe Kleine-König

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=DMAOMKRB8DT6.2DUZQCDZW47X2@bootlin.com \
    --to=paul.louvel@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=herve.codina@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=robh@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®