diff mbox series

[v2,4/4] dt-bindings: hwmon: ltc2945: add device tree doc for ltc2945

Message ID 20201111091259.46773-5-alexandru.ardelean@analog.com (mailing list archive)
State Changes Requested
Headers show
Series hwmon: (ltc2945): add support for sense resistor | expand

Commit Message

Alexandru Ardelean Nov. 11, 2020, 9:12 a.m. UTC
This change adds a device-tree binding documentation for the Linear
Technology (now Analog Devices) LTC2945 Wide Range I2C Power Monitor.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 .../bindings/hwmon/adi,ltc2945.yaml           | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc2945.yaml

Comments

Rob Herring (Arm) Nov. 16, 2020, 5:36 p.m. UTC | #1
On Wed, 11 Nov 2020 11:12:59 +0200, Alexandru Ardelean wrote:
> This change adds a device-tree binding documentation for the Linear
> Technology (now Analog Devices) LTC2945 Wide Range I2C Power Monitor.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  .../bindings/hwmon/adi,ltc2945.yaml           | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc2945.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/adi,ltc2945.yaml b/Documentation/devicetree/bindings/hwmon/adi,ltc2945.yaml
new file mode 100644
index 000000000000..e49d7da09f74
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/adi,ltc2945.yaml
@@ -0,0 +1,49 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/adi,ltc2945.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Linear Technology LTC2945 Wide Range I2C Power Monitor
+
+maintainers:
+  - Guenter Roeck <linux@roeck-us.net>
+
+description: |
+  The LTC2945  is a rail-to-rail system monitor that measures current, voltage,
+  and power consumption.
+
+properties:
+  compatible:
+    enum:
+      - adi,ltc2945
+
+  reg:
+    maxItems: 1
+
+  shunt-resistor-micro-ohms:
+    description:
+      The value of curent sense resistor in microohms. If not provided,
+      a default value of 1000 microohms is used.
+    default: 1000
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+           #address-cells = <1>;
+           #size-cells = <0>;
+
+           ltc2945_i2c: ltc2945@6f {
+                   compatible = "adi,ltc2945";
+                   reg = <0x6f>;
+
+                   shunt-resistor-micro-ohms = <20000>;
+           };
+    };
+...