[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b731087b-a6f9-044a-783c-c78129474cd5@linaro.org>
Date: Thu, 25 Aug 2022 17:49:40 +0300
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Andreas Böhler <dev@...ehler.at>
Cc: Robert Marko <robert.marko@...tura.hr>,
Luka Perkov <luka.perkov@...tura.hr>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-hwmon@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] Documentation: devicetree: update bindings for
tps23861
On 25/08/2022 17:37, Andreas Böhler wrote:
> The tps23861 driver does not initialize the chip and relies on it being
> in auto-mode by default. On some devices, these controllers default to
> OFF-Mode and hence cannot be used at all.
>
Thank you for your patch. There is something to discuss/improve.
> This brings minimal support for initializing the controller in a user-
> defined mode.
>
> Signed-off-by: Andreas Böhler <dev@...ehler.at>
Use subject prefixes matching the subsystem (git log --oneline -- ...).
> ---
> .../bindings/hwmon/ti,tps23861.yaml | 76 +++++++++++++++++++
> 1 file changed, 76 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml b/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml
> index 3bc8e73dfbf0..ed3a703478fb 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml
> @@ -35,6 +35,50 @@ required:
> - compatible
> - reg
>
> +patternProperties:
> + "^port@([0-3])$":
No need for ()
> + type: object
> + description: Represents ports of the device and their specific configuration.
> +
> + properties:
> + reg:
> + description: The port number
> + items:
> + minimum: 0
> + maximum: 3
> +
> + mode:
> + description: The operating mode the device should be initialized with
> + items:
If this is real array, you need maxItems, but it looks one item, so no
need for "items".
> + - enum:
> + - auto
> + - semiauto
> + - manual
> + - off
And how "off" is different from disabled or powered off?
> +
> + enable:
> + description: Whether the port should be enabled
This looks confusing... Looks like boolean property, but instead you
define some numbers. What are the values for these numbers? Why these
are numbers not booleans?
Second - what does it mean "enable"? We have a generic "status" property
for it - isn't this the same?
Third, all these properties (especially PoE) look like you keep
describing here network device but this is HWMON part.
> + items:
> + minimum: 0
> + maximum: 1
> +
> + power:
> + description: Whether the port should be powered on
> + items:
> + minimum: 0
> + maximum: 1
> +
> + poe_plus:
No underscores in property names.
> + description: Whether the port should support PoE+
> + items:
> + minimum: 0
> + maximum: 1
> +
Best regards,
Krzysztof
Powered by blists - more mailing lists