Re: [PATCH V3 1/4] dt-bindings: hwmon: ina3221: Convert to json-schema

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

 





On 22/09/2023 22:01, Rob Herring wrote:
On Thu, Sep 21, 2023 at 02:08:15PM +0100, Jon Hunter wrote:
From: Ninad Malwade <nmalwade@xxxxxxxxxx>

Convert the TI INA3221 bindings from the free-form text format to
json-schema.

Note that the INA3221 input channels default to enabled in the chip.
Unless channels are explicitly disabled in device-tree, input
channels will be enabled.

Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
Signed-off-by: Ninad Malwade <nmalwade@xxxxxxxxxx>
Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
---
  .../devicetree/bindings/hwmon/ina3221.txt     | 54 ----------
  .../devicetree/bindings/hwmon/ti,ina3221.yaml | 98 +++++++++++++++++++
  2 files changed, 98 insertions(+), 54 deletions(-)
  delete mode 100644 Documentation/devicetree/bindings/hwmon/ina3221.txt
  create mode 100644 Documentation/devicetree/bindings/hwmon/ti,ina3221.yaml


...

+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        power-sensor@40 {
+            compatible = "ti,ina3221";
+            reg = <0x40>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            input@0 {
+                reg = <0x0>;
+                status = "disabled";

Examples should be enabled.


Yes normally that would be the case. However, per the discussion with Guenter and the comment in the changelog, for this device channels are enabled in the chip by default. And so to disable them, we need to explicitly disable in device-tree.

Jon

--
nvpublic




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux