* [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property
@ 2022-05-04 6:52 Zev Weiss
2022-05-04 6:52 ` [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding Zev Weiss
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Zev Weiss @ 2022-05-04 6:52 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski
Cc: Zev Weiss, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc
Some regulators do not provide power to anything within the system
described by a device tree, and simply supply an external output. The
regulator-external-output property can now be used to mark such
regulators.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
Documentation/devicetree/bindings/regulator/regulator.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/Documentation/devicetree/bindings/regulator/regulator.yaml
index a9b66ececccf..0e418e68b0e6 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/regulator.yaml
@@ -226,6 +226,12 @@ properties:
description: Maximum difference between current and target voltages
that can be changed safely in a single step.
+ regulator-external-output:
+ description: The regulator's output is external to the system
+ described by the device-tree; no devices within the system are
+ downstream of it.
+ type: boolean
+
patternProperties:
".*-supply$":
description: Input supply phandle(s) for this node
--
2.36.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 6:52 [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Zev Weiss @ 2022-05-04 6:52 ` Zev Weiss 2022-05-04 12:55 ` Mark Brown 2022-05-04 12:36 ` [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Mark Brown 2022-05-04 20:54 ` (subset) " Mark Brown 2 siblings, 1 reply; 10+ messages in thread From: Zev Weiss @ 2022-05-04 6:52 UTC (permalink / raw) To: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski Cc: Zev Weiss, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc This describes an external output supplied by a regulator, such as a power outlet on a power distribution unit (PDU). Signed-off-by: Zev Weiss <zev@bewilderbeest.net> --- .../regulator/reg-external-output.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/reg-external-output.yaml diff --git a/Documentation/devicetree/bindings/regulator/reg-external-output.yaml b/Documentation/devicetree/bindings/regulator/reg-external-output.yaml new file mode 100644 index 000000000000..c00bee5bd9f2 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/reg-external-output.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/regulator/reg-external-output.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Regulator external output + +maintainers: + - Zev Weiss <zev@bewilderbeest.net> + +description: | + This describes an external output supplied by a regulator, such as + a power outlet on a power distribution unit (PDU). + +properties: + compatible: + const: reg-external-output + + vout-supply: + description: + Phandle of the regulator supplying the output, which should have + the regulator-external-output property. + +required: + - compatible + - vout-supply + +additionalProperties: false + +examples: + - | + output { + compatible = "reg-external-output"; + vout-supply = <&output_reg>; + }; -- 2.36.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 6:52 ` [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding Zev Weiss @ 2022-05-04 12:55 ` Mark Brown 2022-05-04 20:33 ` Zev Weiss 0 siblings, 1 reply; 10+ messages in thread From: Mark Brown @ 2022-05-04 12:55 UTC (permalink / raw) To: Zev Weiss Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc [-- Attachment #1: Type: text/plain, Size: 1141 bytes --] On Tue, May 03, 2022 at 11:52:48PM -0700, Zev Weiss wrote: > This describes an external output supplied by a regulator, such as a > power outlet on a power distribution unit (PDU). OK, so this is that represnetation of the connection - which raises the question about why the regulator needs a property? > +description: | > + This describes an external output supplied by a regulator, such as > + a power outlet on a power distribution unit (PDU). > + > +properties: > + compatible: > + const: reg-external-output > + > + vout-supply: > + description: > + Phandle of the regulator supplying the output, which should have > + the regulator-external-output property. > + > +required: I think at a minimum anything like this would need some sort of representation of how the output physically appears so that people can work out how outputs are mapped to the hardware they see. However we already have a subsystem for external connectors - extcon. Perhaps this should be a regulator client in the extcon API? It's common for connectors to include some sort of power provision so it seems like this would fit right in. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 12:55 ` Mark Brown @ 2022-05-04 20:33 ` Zev Weiss 2022-05-04 20:49 ` Mark Brown 2022-05-05 8:33 ` Krzysztof Kozlowski 0 siblings, 2 replies; 10+ messages in thread From: Zev Weiss @ 2022-05-04 20:33 UTC (permalink / raw) To: Mark Brown Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc On Wed, May 04, 2022 at 05:55:53AM PDT, Mark Brown wrote: >On Tue, May 03, 2022 at 11:52:48PM -0700, Zev Weiss wrote: >> This describes an external output supplied by a regulator, such as a >> power outlet on a power distribution unit (PDU). > >OK, so this is that represnetation of the connection - which raises the >question about why the regulator needs a property? > >> +description: | >> + This describes an external output supplied by a regulator, such as >> + a power outlet on a power distribution unit (PDU). >> + >> +properties: >> + compatible: >> + const: reg-external-output >> + >> + vout-supply: >> + description: >> + Phandle of the regulator supplying the output, which should have >> + the regulator-external-output property. >> + >> +required: > >I think at a minimum anything like this would need some sort of >representation of how the output physically appears so that people can >work out how outputs are mapped to the hardware they see. I don't quite understand what you're describing here -- could you elaborate on what you mean by "how the output physically appears", and what that might look like in a DT binding? >However we >already have a subsystem for external connectors - extcon. Perhaps this >should be a regulator client in the extcon API? It's common for >connectors to include some sort of power provision so it seems like this >would fit right in. Interesting -- I wasn't previously aware of the extcon subsystem, thanks for the pointer. However, after looking at it a bit, I'm not sure I see how it'd be applicable here, since it looks like it's built to handle hardware that's at least sophisticated enough for software to tell whether or not something's plugged in, which isn't the case here. The connector is just a ground pin and +12VDC pin, no presence-detection mechanism or anything else. Outside of the regulator itself there's really no "device" there for software to talk to or otherwise interact with at all. Thanks, Zev ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 20:33 ` Zev Weiss @ 2022-05-04 20:49 ` Mark Brown 2022-05-04 21:35 ` Zev Weiss 2022-05-05 8:33 ` Krzysztof Kozlowski 1 sibling, 1 reply; 10+ messages in thread From: Mark Brown @ 2022-05-04 20:49 UTC (permalink / raw) To: Zev Weiss Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc [-- Attachment #1: Type: text/plain, Size: 1630 bytes --] On Wed, May 04, 2022 at 01:33:58PM -0700, Zev Weiss wrote: > On Wed, May 04, 2022 at 05:55:53AM PDT, Mark Brown wrote: > > I think at a minimum anything like this would need some sort of > > representation of how the output physically appears so that people can > > work out how outputs are mapped to the hardware they see. > I don't quite understand what you're describing here -- could you elaborate > on what you mean by "how the output physically appears", and what that might > look like in a DT binding? For example if the output comes out on a socket then that socket should be described. > > However we > > already have a subsystem for external connectors - extcon. Perhaps this > > should be a regulator client in the extcon API? It's common for > > connectors to include some sort of power provision so it seems like this > > would fit right in. > Interesting -- I wasn't previously aware of the extcon subsystem, thanks for > the pointer. However, after looking at it a bit, I'm not sure I see how > it'd be applicable here, since it looks like it's built to handle hardware > that's at least sophisticated enough for software to tell whether or not > something's plugged in, which isn't the case here. The connector is just a > ground pin and +12VDC pin, no presence-detection mechanism or anything else. > Outside of the regulator itself there's really no "device" there for > software to talk to or otherwise interact with at all. Sure, but there's no reason why it can't scale down to something simpler. It's easier to support something simpler than have to extend to support something more complicated. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 20:49 ` Mark Brown @ 2022-05-04 21:35 ` Zev Weiss 2022-05-05 12:05 ` Mark Brown 0 siblings, 1 reply; 10+ messages in thread From: Zev Weiss @ 2022-05-04 21:35 UTC (permalink / raw) To: Mark Brown Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc, MyungJoo Ham, Chanwoo Choi [Adding extcon maintainers...] On Wed, May 04, 2022 at 01:49:12PM PDT, Mark Brown wrote: >On Wed, May 04, 2022 at 01:33:58PM -0700, Zev Weiss wrote: >> On Wed, May 04, 2022 at 05:55:53AM PDT, Mark Brown wrote: > >> > I think at a minimum anything like this would need some sort of >> > representation of how the output physically appears so that people can >> > work out how outputs are mapped to the hardware they see. > >> I don't quite understand what you're describing here -- could you elaborate >> on what you mean by "how the output physically appears", and what that might >> look like in a DT binding? > >For example if the output comes out on a socket then that socket should >be described. > Okay -- in the case of an Open19 power shelf like the ahe-50dc, there are 50 instances of this, 48 of which are in four ganged connectors each with 12 pairs of pins, but two of which have their own dedicated little individual sockets. The connectors are physically different, but they're all identical as far as software is concerned, so I'm not clear on why it would need to be expressed in any DT properties or the like. Or did you just mean explanatory free-form text in the description field? >> > However we >> > already have a subsystem for external connectors - extcon. Perhaps this >> > should be a regulator client in the extcon API? It's common for >> > connectors to include some sort of power provision so it seems like this >> > would fit right in. > >> Interesting -- I wasn't previously aware of the extcon subsystem, thanks for >> the pointer. However, after looking at it a bit, I'm not sure I see how >> it'd be applicable here, since it looks like it's built to handle hardware >> that's at least sophisticated enough for software to tell whether or not >> something's plugged in, which isn't the case here. The connector is just a >> ground pin and +12VDC pin, no presence-detection mechanism or anything else. >> Outside of the regulator itself there's really no "device" there for >> software to talk to or otherwise interact with at all. > >Sure, but there's no reason why it can't scale down to something >simpler. It's easier to support something simpler than have to extend >to support something more complicated. Alright, so would you suggest creating something like drivers/extcon/extcon-regulator-output.c, and just having its extcon functionality be something of a stub for now? Thanks, Zev ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 21:35 ` Zev Weiss @ 2022-05-05 12:05 ` Mark Brown 0 siblings, 0 replies; 10+ messages in thread From: Mark Brown @ 2022-05-05 12:05 UTC (permalink / raw) To: Zev Weiss Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc, MyungJoo Ham, Chanwoo Choi [-- Attachment #1: Type: text/plain, Size: 1498 bytes --] On Wed, May 04, 2022 at 02:35:08PM -0700, Zev Weiss wrote: > On Wed, May 04, 2022 at 01:49:12PM PDT, Mark Brown wrote: > > For example if the output comes out on a socket then that socket should > > be described. > Okay -- in the case of an Open19 power shelf like the ahe-50dc, there are 50 > instances of this, 48 of which are in four ganged connectors each with 12 > pairs of pins, but two of which have their own dedicated little individual > sockets. The connectors are physically different, but they're all identical > as far as software is concerned, so I'm not clear on why it would need to be > expressed in any DT properties or the like. Or did you just mean > explanatory free-form text in the description field? Explanatory description would be one example of something that should be described, yes - if there is control for switching the supplies on and off the user is going to need to be able to figure out which software control corresponds to which physical connection. Other devices may have more things that need autoamtion (eg, jack detection). > > Sure, but there's no reason why it can't scale down to something > > simpler. It's easier to support something simpler than have to extend > > to support something more complicated. > Alright, so would you suggest creating something like > drivers/extcon/extcon-regulator-output.c, and just having its extcon > functionality be something of a stub for now? I'm not super familiar with extcon but that seems plausible. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding 2022-05-04 20:33 ` Zev Weiss 2022-05-04 20:49 ` Mark Brown @ 2022-05-05 8:33 ` Krzysztof Kozlowski 1 sibling, 0 replies; 10+ messages in thread From: Krzysztof Kozlowski @ 2022-05-05 8:33 UTC (permalink / raw) To: Zev Weiss, Mark Brown Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc On 04/05/2022 22:33, Zev Weiss wrote: > On Wed, May 04, 2022 at 05:55:53AM PDT, Mark Brown wrote: >> On Tue, May 03, 2022 at 11:52:48PM -0700, Zev Weiss wrote: >>> This describes an external output supplied by a regulator, such as a >>> power outlet on a power distribution unit (PDU). >> >> OK, so this is that represnetation of the connection - which raises the >> question about why the regulator needs a property? This remained unanswered... the binding looks like approach the problem from wrong side. It's like defining consumers of clock inside clock controller. It does not scale, it's not in Devicetree style/intentions. You should have a dedicated port or connector which takes a regulator as a supply (and for supply we already have bindings). We already have only one connector: git grep connector -- Documentation/devicetree/ (extcon is not the best choice for bindings, it's tied to Linux implementation, not to hardware) Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property 2022-05-04 6:52 [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Zev Weiss 2022-05-04 6:52 ` [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding Zev Weiss @ 2022-05-04 12:36 ` Mark Brown 2022-05-04 20:54 ` (subset) " Mark Brown 2 siblings, 0 replies; 10+ messages in thread From: Mark Brown @ 2022-05-04 12:36 UTC (permalink / raw) To: Zev Weiss Cc: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, linux-kernel, devicetree, Greg Kroah-Hartman, openbmc [-- Attachment #1: Type: text/plain, Size: 474 bytes --] On Tue, May 03, 2022 at 11:52:47PM -0700, Zev Weiss wrote: > Some regulators do not provide power to anything within the system > described by a device tree, and simply supply an external output. The > regulator-external-output property can now be used to mark such > regulators. Why not just add a device representing this output? Presumably it has some other properties (eg, labelling for a connector) and may need some integration with some form of control mechanism. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (subset) [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property 2022-05-04 6:52 [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Zev Weiss 2022-05-04 6:52 ` [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding Zev Weiss 2022-05-04 12:36 ` [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Mark Brown @ 2022-05-04 20:54 ` Mark Brown 2 siblings, 0 replies; 10+ messages in thread From: Mark Brown @ 2022-05-04 20:54 UTC (permalink / raw) To: robh+dt, lgirdwood, krzysztof.kozlowski+dt, zev Cc: devicetree, gregkh, linux-kernel, openbmc On Tue, 3 May 2022 23:52:47 -0700, Zev Weiss wrote: > Some regulators do not provide power to anything within the system > described by a device tree, and simply supply an external output. The > regulator-external-output property can now be used to mark such > regulators. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [3/6] regulator: core: Add error flags to sysfs attributes commit: 0f2d636e7d1fd76f704dd3ea5089ce29a8aee049 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-05-05 12:05 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-05-04 6:52 [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Zev Weiss 2022-05-04 6:52 ` [PATCH 2/6] dt-bindings: regulator: Add reg-external-output binding Zev Weiss 2022-05-04 12:55 ` Mark Brown 2022-05-04 20:33 ` Zev Weiss 2022-05-04 20:49 ` Mark Brown 2022-05-04 21:35 ` Zev Weiss 2022-05-05 12:05 ` Mark Brown 2022-05-05 8:33 ` Krzysztof Kozlowski 2022-05-04 12:36 ` [PATCH 1/6] dt-bindings: regulator: Add regulator-external-output property Mark Brown 2022-05-04 20:54 ` (subset) " Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).