From: Krzysztof Kozlowski <krzk@kernel.org>
To: gfuchedgi@gmail.com, Robert Marko <robert.marko@sartura.hr>,
Luka Perkov <luka.perkov@sartura.hr>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] dt-bindings: hwmon: update TI TPS23861 bindings with per-port schema
Date: Tue, 12 Aug 2025 09:20:26 +0200 [thread overview]
Message-ID: <eab6d2d2-9337-40fe-81c7-95dc1956ce6f@kernel.org> (raw)
In-Reply-To: <20250811-hwmon-tps23861-add-class-restrictions-v2-2-ebd122ec5e3b@gmail.com>
On 11/08/2025 18:13, Gregory Fuchedgi via B4 Relay wrote:
> From: Gregory Fuchedgi <gfuchedgi@gmail.com>
>
> Update schema after per-port poe class restrictions and a few other options
> were implemented.
A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
>
> Signed-off-by: Gregory Fuchedgi <gfuchedgi@gmail.com>
> ---
> .../devicetree/bindings/hwmon/ti,tps23861.yaml | 86 ++++++++++++++++++++++
> 1 file changed, 86 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml b/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml
> index ee7de53e19184d4c3df7564624532306d885f6e4..578f4dad7eab630b218e9e30b23fc611a760d332 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml
> @@ -24,12 +24,62 @@ properties:
> reg:
> maxItems: 1
>
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> shunt-resistor-micro-ohms:
> description: The value of current sense resistor in microohms.
> default: 255000
> minimum: 250000
> maximum: 255000
>
> + reset-gpios:
> + description: Optional GPIO for the reset pin.
> + maxItems: 1
> +
> + shutdown-gpios:
powerdown-gpios, see gpio-consumer-common.yaml
> + description: |
Drop |
> + Optional GPIO for the shutdown pin. Used to prevent PoE activity before
> + the driver had a chance to configure the chip.
> + maxItems: 1
> +
> + interrupts:
> + description: |
> + The interrupt specifier. Only required if PoE class is restricted to less
Drop first sentence, redundant. Interrupts property cannot be anything
else than interrupt specifier.
> + than class 4 in the device tree.
> + maxItems: 1
> +
> +patternProperties:
> + "^port@[0-3]$":
This goes to ports property.
> + type: object
> + description: Port specific nodes.
> + unevaluatedProperties: false
> + required:
> + - reg
required goes to the end.
> +
> + properties:
> + reg:
> + description: Port index.
> + items:
> + minimum: 0
Drop minimum.
> + maximum: 3
> +
> + class:
> + description: The maximum power class a port should accept.
What are the values? Where is the property defined - which schema - that
you do not use vendor prefix?
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
Drop minimum.
> + maximum: 4
> +
> + off-by-default:
Same question - which common schema defines this?
> + description: Indicates the port is off by default.
> + type: boolean
> +
> + label:
> + description: Optional port label
Skip all "optional" here and other places. Schema tells it, not free
form text. Say something useful here or just ": true".
> +
> required:
> - compatible
> - reg
> @@ -51,3 +101,39 @@ examples:
> shunt-resistor-micro-ohms = <255000>;
> };
> };
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + tps23861@28 {
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
> + #address-cells = <1>;
> + #size-cells = <0>;
Follow closely DTS coding style.
> + compatible = "ti,tps23861";
> + reg = <0x28>;
> + shunt-resistor-micro-ohms = <255000>;
> + reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> + shutdown-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
> + interrupt-parent = <&gpio1>;
> + interrupts = <14 0>;
0 looks like invalid flag. Use proper defines and proper values.
> + label = "my_poe_controller";
Use useful names or just drop it.
> + port@0 {
> + reg = <0>;
> + class = <2>; // Max PoE class allowed.
> + off-by-default;
> + label = "myport";
Also not useful.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-08-12 7:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 16:13 [PATCH v2 0/2] hwmon: (tps23861) add class restrictions and semi-auto mode support Gregory Fuchedgi via B4 Relay
2025-08-11 16:13 ` [PATCH v2 1/2] " Gregory Fuchedgi via B4 Relay
2025-08-11 16:13 ` [PATCH v2 2/2] dt-bindings: hwmon: update TI TPS23861 bindings with per-port schema Gregory Fuchedgi via B4 Relay
2025-08-12 7:20 ` Krzysztof Kozlowski [this message]
2025-08-13 3:00 ` Gregory Fuchedgi
2025-08-17 7:23 ` Krzysztof Kozlowski
2025-08-18 17:31 ` Rob Herring
2025-08-19 17:50 ` Gregory Fuchedgi
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=eab6d2d2-9337-40fe-81c7-95dc1956ce6f@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=gfuchedgi@gmail.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=luka.perkov@sartura.hr \
--cc=robert.marko@sartura.hr \
--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;
as well as URLs for NNTP newsgroup(s).