lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220825143737.77732-1-dev@aboehler.at>
Date:   Thu, 25 Aug 2022 16:37:36 +0200
From:   Andreas Böhler <dev@...ehler.at>
To:     unlisted-recipients:; (no To-header on input)
Cc:     dev@...ehler.at, 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: [PATCH v3 1/2] Documentation: devicetree: update bindings for tps23861

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@...ehler.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ