# Kernel driver ina3221

_Peios Kernel / Hardware and drivers / Hardware monitoring_

> Supported chips:

<a id="rst-kernel-driver-ina3221"></a>

Supported chips:

> - Texas Instruments INA3221
>
>   Prefix: 'ina3221'
>
>   Addresses: I2C 0x40 - 0x43
>
>   Datasheet: Publicly available at the Texas Instruments website
>
>   > [https://www.ti.com/](<https://www.ti.com/>)

Author: Andrew F. Davis &lt;[afd@ti.com](<mailto:afd@ti.com>)&gt;

<a id="rst-description"></a>

## Description

The Texas Instruments INA3221 monitors voltage, current, and power on the high side of up to three D.C. power supplies. The INA3221 monitors both shunt drop and supply voltage, with programmable conversion times and averaging, current and power are calculated host-side from these.

<a id="rst-sysfs-entries"></a>

## Sysfs entries


<table>
<tbody>
<tr>
<td>


in\[123\]\_label

</td>
<td>


Voltage channel labels

</td>
</tr>
<tr>
<td>


in\[123\]\_enable

</td>
<td>


Voltage channel enable controls

</td>
</tr>
<tr>
<td>


in\[123\]\_input

</td>
<td>


Bus voltage(mV) channels

</td>
</tr>
<tr>
<td>


curr\[123\]\_input

</td>
<td>


Current(mA) measurement channels

</td>
</tr>
<tr>
<td>


shunt\[123\]\_resistor

</td>
<td>


Shunt resistance(uOhm) channels

</td>
</tr>
<tr>
<td>


curr\[123\]\_crit

</td>
<td>


Critical alert current(mA) setting, activates the corresponding alarm when the respective current is above this value

</td>
</tr>
<tr>
<td>


curr\[123\]\_crit_alarm

</td>
<td>


Critical alert current limit exceeded

</td>
</tr>
<tr>
<td>


curr\[123\]\_max

</td>
<td>


Warning alert current(mA) setting, activates the corresponding alarm when the respective current average is above this value.

</td>
</tr>
<tr>
<td>


curr\[123\]\_max_alarm

</td>
<td>


Warning alert current limit exceeded

</td>
</tr>
<tr>
<td>


in\[456\]\_input

</td>
<td>


Shunt voltage(uV) for channels 1, 2, and 3 respectively

</td>
</tr>
<tr>
<td>


in7_input

</td>
<td>


Sum of shunt voltage(uV) channels

</td>
</tr>
<tr>
<td>


in7_label

</td>
<td>


Channel label for sum of shunt voltage

</td>
</tr>
<tr>
<td>


curr4_input

</td>
<td>


Sum of current(mA) measurement channels, (only available when all channels use the same resistor value for their shunt resistors)

</td>
</tr>
<tr>
<td>


curr4_crit

</td>
<td>


Critical alert current(mA) setting for sum of current measurements, activates the corresponding alarm when the respective current is above this value (only effective when all channels use the same resistor value for their shunt resistors)

</td>
</tr>
<tr>
<td>


curr4_crit_alarm

</td>
<td>


Critical alert current limit exceeded for sum of current measurements.

</td>
</tr>
<tr>
<td>


samples

</td>
<td>


Number of samples using in the averaging mode.

Supports the list of number of samples:

> 1, 4, 16, 64, 128, 256, 512, 1024

</td>
</tr>
<tr>
<td>


update_interval

</td>
<td>


Data conversion time in millisecond, following:

> update_interval = C x S x (BC + SC)
>
> - C:  number of enabled channels
>
> - S:  number of samples
>
> - BC: bus-voltage conversion time in millisecond
>
> - SC: shunt-voltage conversion time in millisecond

Affects both Bus- and Shunt-voltage conversion time. Note that setting update_interval to 0ms sets both BC and SC to 140 us (minimum conversion time).

</td>
</tr>
</tbody>
</table>
