From: "André Draszik" <andre.draszik@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
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>,
Michael Walle <mwalle@kernel.org>
Cc: Peter Griffin <peter.griffin@linaro.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Will McVicker <willmcvicker@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: regulator: add max20339 binding
Date: Tue, 17 Sep 2024 07:17:12 +0100 [thread overview]
Message-ID: <a4c36c387557ffc1690c30a666a607f2fc19dbc2.camel@linaro.org> (raw)
In-Reply-To: <90c9f1a8-fcfb-49f5-803e-cb0ec14463cb@kernel.org>
Hi Krzysztof,
On Mon, 2024-09-16 at 21:56 +0200, Krzysztof Kozlowski wrote:
> On 16/09/2024 18:48, André Draszik wrote:
> > Add device tree binding for Maxim MAX20339 overvoltage protector with
> > load switches.
>
> Subject:
> regulator: dt-bindings:
>
> See submitting patches.
OK
> > Signed-off-by: André Draszik <andre.draszik@linaro.org>
> > ---
> > .../bindings/regulator/maxim,max20339.yaml | 171 +++++++++++++++++++++
> > MAINTAINERS | 6 +
> > 2 files changed, 177 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/maxim,max20339.yaml
> > b/Documentation/devicetree/bindings/regulator/maxim,max20339.yaml
> > new file mode 100644
> > index 000000000000..ef6490cf5a6b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/maxim,max20339.yaml
> > @@ -0,0 +1,171 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/regulator/maxim,max20339.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Maxim Integrated MAX20339 overvoltage protector with load switches
> > +
> > +maintainers:
> > + - André Draszik <andre.draszik@linaro.org>
> > +
> > +description: |
>
> Do not need '|' unless you need to preserve formatting.
Will drop.
> > + The MAX20339 is an overvoltage protection (OVP) device with integrated load
> > + switches and ESD Protection for USB Type-C applications. It protects low
> > + voltage systems against voltage faults and surges. It also integrates two
> > + load switches with current limiting, configurable by hard- and software.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - maxim,max20339
> > +
> > + dig-supply:
> > + description:
> > + Input supply for the device itself (DIG pin, 1.7V to 1.9V). In absence of
> > + Vdig, the IN pin will power the device.
> > +
> > + gpio:
> > + type: object
> > +
> > + properties:
> > + "#gpio-cells":
> > + const: 2
> > +
> > + gpio-controller: true
> > +
> > + gpio-line-names:
> > + description: Strings describing the names of each gpio line.
>
> Drop description.
OK.
> > + maxItems: 1
> > +
> > + required:
> > + - "#gpio-cells"
> > + - gpio-controller
> > +
> > + additionalProperties: false
>
> Does any existing driver require this to be separate node? I don't see
> here any resources, so these properties should be in main device node.
OK. There was no specific reason, other than visual separation, and easier
'required' handling; will update.
> > +
> > + insw-supply:
> > + description:
> > + Input supply for the outputs (IN pin, 3.9V to 28.0V). Also used as supply
> > + for the device itself in case dig-supply is not wired up.
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + lsw1-supply:
> > + description: Input supply for the outputs (LSW1IN pin, 4.0V to 10.0V)
> > +
> > + lsw2-supply:
> > + description: Input supply for the outputs (LSW2IN pin, 4.0V to 10.0V)
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + regulators:
> > + type: object
> > +
> > + properties:
> > + insw:
> > + type: object
> > + $ref: regulator.yaml#
> > + description: Represents the switch connecting IN to OUT, INSW.
> > +
> > + properties:
> > + regulator-ov-protection-microvolt:
> > + enum: [5850000, 9700000, 14500000]
> > +
> > + unevaluatedProperties: false
> > +
> > + patternProperties:
> > + "^lsw[12]$":
> > + type: object
> > + $ref: regulator.yaml#
> > + description: Represents the load switches LSW1 and LSW2.
> > +
> > + properties:
> > + regulator-ov-protection-microvolt:
> > + enum: [0, 1]
> > +
> > + shunt-resistor-micro-ohms:
> > + description:
> > + Value in micro Ohm of the resistor connected between the SETx
> > + pin and GND. This value is required to be able to calculate and
> > + program the current limiting threshold register.
> > +
> > + required:
> > + - shunt-resistor-micro-ohms
> > +
> > + unevaluatedProperties: false
> > +
> > + required:
> > + - lsw1
> > + - lsw2
> > +
> > + additionalProperties: false
> > +
> > +anyOf:
> > + - oneOf:
> > + - required:
> > + - dig-supply
> > + - required:
> > + - insw-supply
> > + - required:
> > + - dig-supply
> > + - insw-supply
>
> oneOf looks redundant here. you allow any combination, right?
You're right, and yes, I allow either dig-supply, or insw-supply, or both,
and at least one of them must be specified.
Thanks,
Andre'
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - regulators
>
>
> Best regards,
> Krzysztof
>
next prev parent reply other threads:[~2024-09-17 6:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 16:48 [PATCH 0/2] Maxim MAX20339 regulator driver André Draszik
2024-09-16 16:48 ` [PATCH 1/2] dt-bindings: regulator: add max20339 binding André Draszik
2024-09-16 19:53 ` Peter Griffin
2024-09-17 5:15 ` André Draszik
2024-09-16 19:56 ` Krzysztof Kozlowski
2024-09-17 6:17 ` André Draszik [this message]
2024-09-16 16:48 ` [PATCH 2/2] regulator: max20339: add Maxim MAX20339 regulator driver André Draszik
2024-09-16 20:06 ` Krzysztof Kozlowski
2024-09-17 8:03 ` André Draszik
2024-09-17 8:15 ` Krzysztof Kozlowski
2024-09-17 8:16 ` Krzysztof Kozlowski
2024-09-17 8:59 ` Mark Brown
2024-09-17 16:55 ` Krzysztof Kozlowski
2024-09-17 9:19 ` Mark Brown
2024-09-17 11:41 ` André Draszik
2024-09-18 8:49 ` Mark Brown
2024-09-20 7:23 ` kernel test robot
2024-09-20 16:28 ` kernel test robot
2024-09-16 17:01 ` [PATCH 0/2] " André Draszik
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=a4c36c387557ffc1690c30a666a607f2fc19dbc2.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.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;
as well as URLs for NNTP newsgroup(s).