]>
Commit | Line | Data |
---|---|---|
f7c2fe38 FL |
1 | Kernel driver ina2xx |
2 | ==================== | |
3 | ||
4 | Supported chips: | |
b32570a4 | 5 | |
f7c2fe38 | 6 | * Texas Instruments INA219 |
b32570a4 MCC |
7 | |
8 | ||
f7c2fe38 FL |
9 | Prefix: 'ina219' |
10 | Addresses: I2C 0x40 - 0x4f | |
b32570a4 | 11 | |
f7c2fe38 | 12 | Datasheet: Publicly available at the Texas Instruments website |
b32570a4 | 13 | |
49dc2fb0 | 14 | https://www.ti.com/ |
f7c2fe38 | 15 | |
dc92cd0c | 16 | * Texas Instruments INA220 |
b32570a4 | 17 | |
dc92cd0c | 18 | Prefix: 'ina220' |
b32570a4 | 19 | |
dc92cd0c | 20 | Addresses: I2C 0x40 - 0x4f |
b32570a4 | 21 | |
dc92cd0c | 22 | Datasheet: Publicly available at the Texas Instruments website |
b32570a4 | 23 | |
49dc2fb0 | 24 | https://www.ti.com/ |
dc92cd0c | 25 | |
f7c2fe38 | 26 | * Texas Instruments INA226 |
b32570a4 | 27 | |
f7c2fe38 | 28 | Prefix: 'ina226' |
b32570a4 | 29 | |
f7c2fe38 | 30 | Addresses: I2C 0x40 - 0x4f |
b32570a4 | 31 | |
f7c2fe38 | 32 | Datasheet: Publicly available at the Texas Instruments website |
b32570a4 | 33 | |
49dc2fb0 | 34 | https://www.ti.com/ |
f7c2fe38 | 35 | |
dc92cd0c | 36 | * Texas Instruments INA230 |
b32570a4 | 37 | |
dc92cd0c | 38 | Prefix: 'ina230' |
b32570a4 | 39 | |
dc92cd0c | 40 | Addresses: I2C 0x40 - 0x4f |
b32570a4 | 41 | |
dc92cd0c | 42 | Datasheet: Publicly available at the Texas Instruments website |
b32570a4 | 43 | |
49dc2fb0 | 44 | https://www.ti.com/ |
dc92cd0c | 45 | |
add513be | 46 | * Texas Instruments INA231 |
b32570a4 | 47 | |
add513be | 48 | Prefix: 'ina231' |
b32570a4 | 49 | |
add513be | 50 | Addresses: I2C 0x40 - 0x4f |
b32570a4 | 51 | |
add513be | 52 | Datasheet: Publicly available at the Texas Instruments website |
b32570a4 | 53 | |
49dc2fb0 | 54 | https://www.ti.com/ |
add513be | 55 | |
3ad86700 | 56 | Author: Lothar Felten <lothar.felten@gmail.com> |
f7c2fe38 FL |
57 | |
58 | Description | |
59 | ----------- | |
60 | ||
61 | The INA219 is a high-side current shunt and power monitor with an I2C | |
62 | interface. The INA219 monitors both shunt drop and supply voltage, with | |
63 | programmable conversion times and filtering. | |
64 | ||
dc92cd0c GR |
65 | The INA220 is a high or low side current shunt and power monitor with an I2C |
66 | interface. The INA220 monitors both shunt drop and supply voltage. | |
67 | ||
f7c2fe38 FL |
68 | The INA226 is a current shunt and power monitor with an I2C interface. |
69 | The INA226 monitors both a shunt voltage drop and bus supply voltage. | |
70 | ||
add513be KH |
71 | INA230 and INA231 are high or low side current shunt and power monitors |
72 | with an I2C interface. The chips monitor both a shunt voltage drop and | |
73 | bus supply voltage. | |
dc92cd0c | 74 | |
8a5fc795 BG |
75 | The shunt value in micro-ohms can be set via platform data or device tree at |
76 | compile-time or via the shunt_resistor attribute in sysfs at run-time. Please | |
f6aed68e | 77 | refer to the Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml for bindings |
31e7ad74 | 78 | if the device tree is used. |
72a87a47 BG |
79 | |
80 | Additionally ina226 supports update_interval attribute as described in | |
7ebd8b66 | 81 | Documentation/hwmon/sysfs-interface.rst. Internally the interval is the sum of |
72a87a47 BG |
82 | bus and shunt voltage conversion times multiplied by the averaging rate. We |
83 | don't touch the conversion times and only modify the number of averages. The | |
84 | lower limit of the update_interval is 2 ms, the upper limit is 2253 ms. | |
85 | The actual programmed interval may vary from the desired value. | |
9a629d7a NC |
86 | |
87 | General sysfs entries | |
b32570a4 | 88 | --------------------- |
9a629d7a | 89 | |
b32570a4 | 90 | ======================= =============================== |
9a629d7a NC |
91 | in0_input Shunt voltage(mV) channel |
92 | in1_input Bus voltage(mV) channel | |
93 | curr1_input Current(mA) measurement channel | |
94 | power1_input Power(uW) measurement channel | |
95 | shunt_resistor Shunt resistance(uOhm) channel | |
b32570a4 | 96 | ======================= =============================== |
9a629d7a NC |
97 | |
98 | Sysfs entries for ina226, ina230 and ina231 only | |
b32570a4 | 99 | ------------------------------------------------ |
9a629d7a | 100 | |
b32570a4 | 101 | ======================= ==================================================== |
5a56a39b AQ |
102 | in0_lcrit Critical low shunt voltage |
103 | in0_crit Critical high shunt voltage | |
104 | in0_lcrit_alarm Shunt voltage critical low alarm | |
105 | in0_crit_alarm Shunt voltage critical high alarm | |
106 | in1_lcrit Critical low bus voltage | |
107 | in1_crit Critical high bus voltage | |
108 | in1_lcrit_alarm Bus voltage critical low alarm | |
109 | in1_crit_alarm Bus voltage critical high alarm | |
110 | power1_crit Critical high power | |
111 | power1_crit_alarm Power critical high alarm | |
9a629d7a NC |
112 | update_interval data conversion time; affects number of samples used |
113 | to average results for shunt and bus voltages. | |
b32570a4 | 114 | ======================= ==================================================== |
5a56a39b AQ |
115 | |
116 | .. note:: | |
117 | ||
118 | - Configure `shunt_resistor` before configure `power1_crit`, because power | |
119 | value is calculated based on `shunt_resistor` set. | |
120 | - Because of the underlying register implementation, only one `*crit` setting | |
121 | and its `alarm` can be active. Writing to one `*crit` setting clears other | |
122 | `*crit` settings and alarms. Writing 0 to any `*crit` setting clears all | |
123 | `*crit` settings and alarms. |