From: Mark Brown <broonie@kernel.org>
To: Zev Weiss <zev@bewilderbeest.net>
Cc: Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org, openbmc@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Laxman Dewangan <ldewangan@nvidia.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Naresh Solanki <naresh.solanki@9elements.com>,
Patrick Rudolph <patrick.rudolph@9elements.com>
Subject: Re: [PATCH 2/3] dt-bindings: regulator: Add regulator-output bindingg
Date: Fri, 28 Oct 2022 16:51:54 +0100 [thread overview]
Message-ID: <Y1v6migO2PNV4ksW@sirena.org.uk> (raw)
In-Reply-To: <Y1tWpikPogEtV0+x@hatter.bewilderbeest.net>
[-- Attachment #1: Type: text/plain, Size: 3266 bytes --]
On Thu, Oct 27, 2022 at 09:12:22PM -0700, Zev Weiss wrote:
> I can see why it might look that way, but I'd argue it's actually not. The
> systems this is intended to support provide power to entirely separate
> external devices -- think of a power distribution unit that might have
> arbitrary things plugged into it. It seems to me like a property of the
> hardware that those things shouldn't have their power supply turned off (or
> on) just because a controller in the PDU rebooted.
We don't turn things off on reboot? We don't do anything in particular
on reboot...
> > I guess it easy
> > to understand in case of Linux which disables unclaimed regulators
> > during. But what if other system/firmware does not behave like that?
> In this case, then no change would be needed -- a system that (unlike Linux)
> doesn't twiddle regulator state on its own would just continue to not do
> that.
We don't turn unclaimed regulators off until userspace has had a chance
to start, if there's some problem with system integrators arranging to
do this we can look into how that works, for example making the delay
tunable. I don't think this is really meaningfully different from a
driver deciding to turn things off from a binding point of view.
> > And what is the "external actor"? OS is not an external actor?
> It's admittedly a bit vague, but I couldn't think of a clearer way to
> express what is a sort of nebulous concept -- essentially, some entity
> outside the "driver" (or analogous software component) using the information
> in the device-tree. In many common cases this would essentially mean "a
> human user", since in the PDU-like systems I'm targeting here the only thing
> that should ever be deciding to turn the regulator on or off is an operator
> logged in to the system to manually enable or disable an outlet. I was
> aiming to leave the wording a bit more general though, since in some other
> context I could imagine some other piece of software toggling things
> automatedly (e.g. lights getting turned on and off on a schedule or
> something, if that's what happens to be plugged in).
This is policy stuff, it doesn't translate into DTs at all.
> > I could not get the problem you want to solve with this property - I
> > looked at cover letter and at commit msg.
> The problem is that a driver deciding on its own to enable or disable the
> regulator (e.g. during boot or shutdown) would be a critical failure for the
> kind of systems I'm aiming to support.
If the driver is doing something like this it should be addressed in the
driver.
> > I can only imagine that you want to keep regulator on, after last its
> > user disappears... but for what purpose? Do you expect that after system
> > shutdown the pin will stay high so regulator will be also on? If so, you
> > need hardware design, e.g. with some pull up (if control is over GPIO).
> As described above, the regulators involved here (in these sorts of PDU-like
> systems) provide power for external systems and devices. It is critical
> that the controller's boot and shutdown sequences not alter the state of the
> regulator.
This really sounds like a full stack system integration problem, not
something that can be resolved with one software component.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Zev Weiss <zev@bewilderbeest.net>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Rob Herring <robh@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Naresh Solanki <naresh.solanki@9elements.com>,
Patrick Rudolph <patrick.rudolph@9elements.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
openbmc@lists.ozlabs.org
Subject: Re: [PATCH 2/3] dt-bindings: regulator: Add regulator-output bindingg
Date: Fri, 28 Oct 2022 16:51:54 +0100 [thread overview]
Message-ID: <Y1v6migO2PNV4ksW@sirena.org.uk> (raw)
In-Reply-To: <Y1tWpikPogEtV0+x@hatter.bewilderbeest.net>
[-- Attachment #1: Type: text/plain, Size: 3266 bytes --]
On Thu, Oct 27, 2022 at 09:12:22PM -0700, Zev Weiss wrote:
> I can see why it might look that way, but I'd argue it's actually not. The
> systems this is intended to support provide power to entirely separate
> external devices -- think of a power distribution unit that might have
> arbitrary things plugged into it. It seems to me like a property of the
> hardware that those things shouldn't have their power supply turned off (or
> on) just because a controller in the PDU rebooted.
We don't turn things off on reboot? We don't do anything in particular
on reboot...
> > I guess it easy
> > to understand in case of Linux which disables unclaimed regulators
> > during. But what if other system/firmware does not behave like that?
> In this case, then no change would be needed -- a system that (unlike Linux)
> doesn't twiddle regulator state on its own would just continue to not do
> that.
We don't turn unclaimed regulators off until userspace has had a chance
to start, if there's some problem with system integrators arranging to
do this we can look into how that works, for example making the delay
tunable. I don't think this is really meaningfully different from a
driver deciding to turn things off from a binding point of view.
> > And what is the "external actor"? OS is not an external actor?
> It's admittedly a bit vague, but I couldn't think of a clearer way to
> express what is a sort of nebulous concept -- essentially, some entity
> outside the "driver" (or analogous software component) using the information
> in the device-tree. In many common cases this would essentially mean "a
> human user", since in the PDU-like systems I'm targeting here the only thing
> that should ever be deciding to turn the regulator on or off is an operator
> logged in to the system to manually enable or disable an outlet. I was
> aiming to leave the wording a bit more general though, since in some other
> context I could imagine some other piece of software toggling things
> automatedly (e.g. lights getting turned on and off on a schedule or
> something, if that's what happens to be plugged in).
This is policy stuff, it doesn't translate into DTs at all.
> > I could not get the problem you want to solve with this property - I
> > looked at cover letter and at commit msg.
> The problem is that a driver deciding on its own to enable or disable the
> regulator (e.g. during boot or shutdown) would be a critical failure for the
> kind of systems I'm aiming to support.
If the driver is doing something like this it should be addressed in the
driver.
> > I can only imagine that you want to keep regulator on, after last its
> > user disappears... but for what purpose? Do you expect that after system
> > shutdown the pin will stay high so regulator will be also on? If so, you
> > need hardware design, e.g. with some pull up (if control is over GPIO).
> As described above, the regulators involved here (in these sorts of PDU-like
> systems) provide power for external systems and devices. It is critical
> that the controller's boot and shutdown sequences not alter the state of the
> regulator.
This really sounds like a full stack system integration problem, not
something that can be resolved with one software component.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-10-28 15:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-25 22:03 [PATCH 0/3] regulator: Add DT support for regulator-output connectors Zev Weiss
2022-09-25 22:03 ` Zev Weiss
2022-09-25 22:03 ` [PATCH 1/3] regulator: devres: Add devm_regulator_bulk_get_exclusive() Zev Weiss
2022-09-25 22:03 ` Zev Weiss
2022-09-25 22:03 ` [PATCH 2/3] dt-bindings: regulator: Add regulator-output binding Zev Weiss
2022-09-25 22:03 ` Zev Weiss
2022-09-29 21:07 ` Rob Herring
2022-09-29 21:07 ` Rob Herring
2022-09-29 21:27 ` Zev Weiss
2022-09-29 21:27 ` Zev Weiss
2022-10-27 18:42 ` Zev Weiss
2022-10-27 18:42 ` Zev Weiss
2022-10-28 1:22 ` Krzysztof Kozlowski
2022-10-28 4:12 ` [PATCH 2/3] dt-bindings: regulator: Add regulator-output bindingg Zev Weiss
2022-10-28 4:12 ` Zev Weiss
2022-10-28 15:51 ` Mark Brown [this message]
2022-10-28 15:51 ` Mark Brown
2022-10-28 19:44 ` Zev Weiss
2022-10-28 19:44 ` Zev Weiss
2022-10-31 15:45 ` Mark Brown
2022-10-31 15:45 ` Mark Brown
2022-10-31 18:50 ` Zev Weiss
2022-10-31 18:50 ` Zev Weiss
2022-10-27 18:54 ` [PATCH 2/3] dt-bindings: regulator: Add regulator-output binding Mark Brown
2022-10-27 18:54 ` Mark Brown
2022-09-25 22:03 ` [PATCH 3/3] regulator: userspace-consumer: Handle regulator-output DT nodes Zev Weiss
2022-09-25 22:03 ` Zev Weiss
2022-09-29 6:29 ` [PATCH 0/3] regulator: Add DT support for regulator-output connectors Patrick Rudolph
2022-09-29 6:29 ` Patrick Rudolph
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=Y1v6migO2PNV4ksW@sirena.org.uk \
--to=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=ldewangan@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naresh.solanki@9elements.com \
--cc=openbmc@lists.ozlabs.org \
--cc=patrick.rudolph@9elements.com \
--cc=robh@kernel.org \
--cc=zev@bewilderbeest.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.