From: Krzysztof Kozlowski <krzk@kernel.org>
To: Flaviu Nistor <flaviu.nistor@googlemail.com>
Cc: Flaviu Nistor <flaviu.nistor@gmail.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: hwmon: Add TI TPS389008
Date: Wed, 19 Mar 2025 20:19:27 +0100 [thread overview]
Message-ID: <bb1c12dc-dc71-4c7f-9969-2fe31f632f6b@kernel.org> (raw)
In-Reply-To: <20250319170234.63723-3-flaviu.nistor@gmail.com>
On 19/03/2025 18:02, Flaviu Nistor wrote:
> Add device tree bindings and an example for the
> TI TPS389008 voltage monitor.
>
> Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
> ---
This wasn't ever tested, so limited review.
BTW, bindings are before the user.
> +properties:
> + compatible:
> + oneOf:
> + - const: ti,tps38908
> + - items:
> + - enum:
> + - ti,tps38908
> + - ti,tps38906
> + - ti,tps38904
> + - const: ti,tps38908
> +
> + reg:
> + maxItems: 1
> +
> + "#address-cells":
> + description: Required only if a child node is present.
Drop description
> + const: 1
> +
> + "#size-cells":
> + description: Required only if a child node is present.
Drop description
> + const: 0
> +
> +patternProperties:
> + "^vmon@[1-8]$":
s/vmon/channel/
> + description: |
> + The node contains optional child nodes for up to x channels.
> + There are 8 channels for TPS389008, 6 channels for TPS389006,
> + and 4 channels for TPS389004. Each child node describes the information
Then you need allOf:if:then: disallowing these for specific variants.
> + of the input source. Input channels default to disabled in the chip.
> + Unless channels are explicitly enabled in device-tree,
> + input channels will be disabled.
> + type: object
> + additionalProperties: false
> + properties:
> + reg:
> + description: |
> + Must be 1 to 8,
Don't repeat constraints in free form text.
> corresponding to the VMONx
> + ports of the TPS389008, TPS389006, or TPS389004, respectively.
Drop entire description
> + enum: [ 1, 2, 3, 4, 5, 6, 7, 8 ]
> +
> + label:
> + description: Name of the input source.
> +
> + ti,vrange-mult-4x:
> + description: |
> + Must have values 5 or 20 in order for the analog
> + conversion to be done correctly.
> + Value 5 indicates multiply by 1 (x1), and value 20 indicates
> + multiply by 4 (x4).
> + type: boolean
> +
> + ti,vmon-enable:
Drop. Status tells it, no?
> + description: |
> + Sets each channel status. By default, all input channels are disabled.
> + - 0 = channel disabled
> + - 1 = channel active
> + type: boolean
> +
> + required:
> + - reg
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + vmon@37 {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "ti,tps389008", "ti,tps389006", "ti,tps389004";
Test your code before sending, not after.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-03-19 19:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 17:02 [PATCH 0/2] hwmon: Add support for TI TPS389008 Flaviu Nistor
2025-03-19 17:02 ` [PATCH 1/2] " Flaviu Nistor
2025-03-19 21:21 ` Guenter Roeck
2025-03-19 17:02 ` [PATCH 2/2] dt-bindings: hwmon: Add " Flaviu Nistor
2025-03-19 18:25 ` Rob Herring (Arm)
2025-03-19 19:19 ` Krzysztof Kozlowski [this message]
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=bb1c12dc-dc71-4c7f-9969-2fe31f632f6b@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=flaviu.nistor@gmail.com \
--cc=flaviu.nistor@googlemail.com \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh@kernel.org \
/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