File Index
Files and directories
Sign in
FILE

ti,ina3221.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/hwmon/ti,ina3221.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/hwmon/ti,ina3221.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Texas Instruments INA3221 Current and Voltage Monitor
  8
  9maintainers:
 10  - Jean Delvare <jdelvare@suse.com>
 11  - Guenter Roeck <linux@roeck-us.net>
 12
 13properties:
 14  compatible:
 15    const: ti,ina3221
 16
 17  reg:
 18    maxItems: 1
 19
 20  ti,single-shot:
 21    description: |
 22      This chip has two power modes: single-shot (chip takes one measurement
 23      and then shuts itself down) and continuous (chip takes continuous
 24      measurements). The continuous mode is more reliable and suitable for
 25      hardware monitor type device, but the single-shot mode is more power-
 26      friendly and useful for battery-powered device which cares power
 27      consumptions while still needs some measurements occasionally.
 28
 29      If this property is present, the single-shot mode will be used, instead
 30      of the default continuous one for monitoring.
 31    $ref: /schemas/types.yaml#/definitions/flag
 32
 33  "#address-cells":
 34    description: Required only if a child node is present.
 35    const: 1
 36
 37  "#size-cells":
 38    description: Required only if a child node is present.
 39    const: 0
 40
 41patternProperties:
 42  "^input@[0-2]$":
 43    description: The node contains optional child nodes for three channels.
 44      Each child node describes the information of input source. Input channels
 45      default to enabled in the chip. Unless channels are explicitly disabled
 46      in device-tree, input channels will be enabled.
 47    type: object
 48    additionalProperties: false
 49    properties:
 50      reg:
 51        description: Must be 0, 1 and 2, corresponding to the IN1, IN2 or IN3
 52          ports of the INA3221, respectively.
 53        enum: [ 0, 1, 2 ]
 54
 55      label:
 56        description: name of the input source
 57
 58      shunt-resistor-micro-ohms:
 59        description: shunt resistor value in micro-Ohm
 60
 61      ti,summation-disable:
 62        description: |
 63          The INA3221 has a critical alert pin that can be controlled by the
 64          summation control function. This function adds the single
 65          shunt-voltage conversions for the desired channels in order to
 66          compare the combined sum to the programmed limit. The Shunt-Voltage
 67          Sum Limit register contains the programmed value that is compared
 68          to the value in the Shunt-Voltage Sum register in order to
 69          determine if the total summed limit is exceeded. If the
 70          shunt-voltage sum limit value is exceeded, the critical alert pin
 71          is asserted.
 72
 73          For the summation limit to have a meaningful value, it is necessary
 74          to use the same shunt-resistor value on all enabled channels. If
 75          this is not the case or if a channel should not be used for
 76          triggering the critical alert pin, then this property can be used
 77          exclude specific channels from the summation control function.
 78        type: boolean
 79
 80    required:
 81      - reg
 82
 83required:
 84  - compatible
 85  - reg
 86
 87additionalProperties: false
 88
 89examples:
 90  - |
 91    i2c {
 92        #address-cells = <1>;
 93        #size-cells = <0>;
 94
 95        power-sensor@40 {
 96            compatible = "ti,ina3221";
 97            reg = <0x40>;
 98            #address-cells = <1>;
 99            #size-cells = <0>;
100
101            input@0 {
102                reg = <0x0>;
103                /*
104                 * Input channels are enabled by default in the device and so
105                 * to disable, must be explicitly disabled in device-tree.
106                 */
107                status = "disabled";
108            };
109
110            input@1 {
111                reg = <0x1>;
112                shunt-resistor-micro-ohms = <5000>;
113            };
114
115            input@2 {
116                reg = <0x2>;
117                label = "VDD_5V";
118                shunt-resistor-micro-ohms = <5000>;
119            };
120        };
121    };
~/ Read-only file preview.