All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Böhler" <dev@aboehler.at>
To: unlisted-recipients:; (no To-header on input)
Cc: dev@aboehler.at, Robert Marko <robert.marko@sartura.hr>,
	Luka Perkov <luka.perkov@sartura.hr>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 1/2] Documentation: devicetree: update bindings for tps23861
Date: Thu, 25 Aug 2022 16:37:36 +0200	[thread overview]
Message-ID: <20220825143737.77732-1-dev@aboehler.at> (raw)

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.

This brings minimal support for initializing the controller in a user-
defined mode.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
---
 .../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])$":
+    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:
+          - enum:
+              - auto
+              - semiauto
+              - manual
+              - off
+
+      enable:
+        description: Whether the port should be enabled
+        items:
+          minimum: 0
+          maximum: 1
+
+      power:
+        description: Whether the port should be powered on
+        items:
+          minimum: 0
+          maximum: 1
+
+      poe_plus:
+        description: Whether the port should support PoE+
+        items:
+          minimum: 0
+          maximum: 1
+
+    required:
+      - reg
+
+    additionalProperties: false
+
 additionalProperties: false
 
 examples:
@@ -47,5 +91,37 @@ examples:
               compatible = "ti,tps23861";
               reg = <0x30>;
               shunt-resistor-micro-ohms = <255000>;
+
+              port@0 {
+                  reg = <0>;
+                  mode = "auto";
+                  enable = <1>;
+                  power = <1>;
+                  poe_plus = <1>;
+              };
+
+              port@1 {
+                  reg = <1>;
+                  mode = "semiauto";
+                  enable = <1>;
+                  power = <0>;
+                  poe_plus = <1>;
+              };
+
+              port@2 {
+                  reg = <2>;
+                  mode = "manual";
+                  enable = <0>;
+                  power = <0>;
+                  poe_plus = <0>;
+              };
+
+              port@3 {
+                  reg = <3>;
+                  mode = "off";
+                  enable = <0>;
+                  power = <0>;
+                  poe_plus = <1>;
+              };
           };
     };
-- 
2.37.2


             reply	other threads:[~2022-08-25 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 14:37 Andreas Böhler [this message]
2022-08-25 14:37 ` [PATCH v3 2/2] hwmon: tps23861: add support for initializing the chip Andreas Böhler
2022-08-25 14:49 ` [PATCH v3 1/2] Documentation: devicetree: update bindings for tps23861 Krzysztof Kozlowski
2022-08-25 15:02 ` Guenter Roeck
2022-08-25 15:07   ` Robert Marko
2022-08-25 15:29     ` Guenter Roeck
2022-08-25 15:31       ` Robert Marko
2022-08-26  6:56         ` Krzysztof Kozlowski
2022-08-26 12:19           ` Guenter Roeck
2022-08-25 18:51 ` Rob Herring

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=20220825143737.77732-1-dev@aboehler.at \
    --to=dev@aboehler.at \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.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+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.