xref: /OK3568_Linux_fs/kernel/Documentation/hwmon/ina3221.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunKernel driver ina3221
2*4882a593Smuzhiyun=====================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunSupported chips:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun  * Texas Instruments INA3221
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun    Prefix: 'ina3221'
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun    Addresses: I2C 0x40 - 0x43
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun    Datasheet: Publicly available at the Texas Instruments website
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun	       https://www.ti.com/
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunAuthor: Andrew F. Davis <afd@ti.com>
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunDescription
19*4882a593Smuzhiyun-----------
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunThe Texas Instruments INA3221 monitors voltage, current, and power on the high
22*4882a593Smuzhiyunside of up to three D.C. power supplies. The INA3221 monitors both shunt drop
23*4882a593Smuzhiyunand supply voltage, with programmable conversion times and averaging, current
24*4882a593Smuzhiyunand power are calculated host-side from these.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunSysfs entries
27*4882a593Smuzhiyun-------------
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun======================= =======================================================
30*4882a593Smuzhiyunin[123]_label           Voltage channel labels
31*4882a593Smuzhiyunin[123]_enable          Voltage channel enable controls
32*4882a593Smuzhiyunin[123]_input           Bus voltage(mV) channels
33*4882a593Smuzhiyuncurr[123]_input         Current(mA) measurement channels
34*4882a593Smuzhiyunshunt[123]_resistor     Shunt resistance(uOhm) channels
35*4882a593Smuzhiyuncurr[123]_crit          Critical alert current(mA) setting, activates the
36*4882a593Smuzhiyun			corresponding alarm when the respective current
37*4882a593Smuzhiyun			is above this value
38*4882a593Smuzhiyuncurr[123]_crit_alarm    Critical alert current limit exceeded
39*4882a593Smuzhiyuncurr[123]_max           Warning alert current(mA) setting, activates the
40*4882a593Smuzhiyun			corresponding alarm when the respective current
41*4882a593Smuzhiyun			average is above this value.
42*4882a593Smuzhiyuncurr[123]_max_alarm     Warning alert current limit exceeded
43*4882a593Smuzhiyunin[456]_input           Shunt voltage(uV) for channels 1, 2, and 3 respectively
44*4882a593Smuzhiyunin7_input               Sum of shunt voltage(uV) channels
45*4882a593Smuzhiyunin7_label               Channel label for sum of shunt voltage
46*4882a593Smuzhiyuncurr4_input             Sum of current(mA) measurement channels,
47*4882a593Smuzhiyun                        (only available when all channels use the same resistor
48*4882a593Smuzhiyun                        value for their shunt resistors)
49*4882a593Smuzhiyuncurr4_crit              Critical alert current(mA) setting for sum of current
50*4882a593Smuzhiyun                        measurements, activates the corresponding alarm
51*4882a593Smuzhiyun                        when the respective current is above this value
52*4882a593Smuzhiyun                        (only effective when all channels use the same resistor
53*4882a593Smuzhiyun                        value for their shunt resistors)
54*4882a593Smuzhiyuncurr4_crit_alarm        Critical alert current limit exceeded for sum of
55*4882a593Smuzhiyun                        current measurements.
56*4882a593Smuzhiyunsamples                 Number of samples using in the averaging mode.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun                        Supports the list of number of samples:
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun                          1, 4, 16, 64, 128, 256, 512, 1024
61*4882a593Smuzhiyun
62*4882a593Smuzhiyunupdate_interval         Data conversion time in millisecond, following:
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun                          update_interval = C x S x (BC + SC)
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun                          * C:	number of enabled channels
67*4882a593Smuzhiyun                          * S:	number of samples
68*4882a593Smuzhiyun                          * BC:	bus-voltage conversion time in millisecond
69*4882a593Smuzhiyun                          * SC:	shunt-voltage conversion time in millisecond
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun                        Affects both Bus- and Shunt-voltage conversion time.
72*4882a593Smuzhiyun                        Note that setting update_interval to 0ms sets both BC
73*4882a593Smuzhiyun                        and SC to 140 us (minimum conversion time).
74*4882a593Smuzhiyun======================= =======================================================
75