Re: [PATCH v1 2/2] dt-bindings: hwmon: add adi,ltc4271

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/11/23 01:32, Lothar Felten wrote:
Add dt-bindings for Analog Devices LTC4271 PoE PSE.

Signed-off-by: Lothar Felten <lothar.felten@xxxxxxxxx>
---
  .../bindings/hwmon/adi,ltc4271.example.dts    | 28 ++++++++++
  .../bindings/hwmon/adi,ltc4271.yaml           | 51 +++++++++++++++++++
  MAINTAINERS                                   |  1 +
  3 files changed, 80 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc4271.example.dts
  create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc4271.yaml

diff --git a/Documentation/devicetree/bindings/hwmon/adi,ltc4271.example.dts b/Documentation/devicetree/bindings/hwmon/adi,ltc4271.example.dts
new file mode 100644
index 000000000..829f7c5a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adi,ltc4271.example.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+/plugin/; // silence any missing phandle references
+
+/{
+	compatible = "foo";
+model = "foo";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	example-0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		i2c {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ltc4271@20 {
+				compatible = "adi,ltc4271";
+				reg = <0x20>;
+				shunt-resistor-micro-ohms = <250000>;
+			};
+		};
+
+	};
+};
+

Is that something new ? I don't recall seeing similar .example files.

Note that this won't work well with the current driver implementation.
You would need two or three nodes to describe a single LTC4271
(at least according to comments in the driver).

Guenter

diff --git a/Documentation/devicetree/bindings/hwmon/adi,ltc4271.yaml b/Documentation/devicetree/bindings/hwmon/adi,ltc4271.yaml
new file mode 100644
index 000000000..696e91a8e
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adi,ltc4271.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/adi,ltc4271.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices LTC4271 PoE PSE
+
+maintainers:
+  - Lothar Felten <lothar.felten@xxxxxxxxx>
+
+description: |
+  The LTC4271 is a IEEE 802.3at Quad Port Power-over-Ethernet PSE Controller.
+
+  Datasheets:
+  https://www.analog.com/en/products/ltc4271.html
+
+
+properties:
+  compatible:
+    enum:
+      - adi,ltc4271
+
+  reg:
+    maxItems: 1
+
+  shunt-resistor-micro-ohms:
+    description: The value of current sense resistor in microohms.
+    default: 250000
+    minimum: 250000
+    maximum: 500000
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        ltc4271@20 {
+            compatible = "adi,ltc4271";
+            reg = <0x20>;
+            shunt-resistor-micro-ohms = <250000>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 789742390..483956f76 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12187,6 +12187,7 @@ LTC4271 ANALOG DEVICES PoE PSE DRIVER
  M:	Lothar Felten <lothar.felten@xxxxxxxxx>
  L:	linux-hwmon@xxxxxxxxxxxxxxx
  S:	Maintained
+F:	Documentation/devicetree/bindings/hwmon/adi,ltc4271.yaml
  F:	Documentation/hwmon/ltc4271.rst
  F:	drivers/hwmon/ltc4271.c




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux