# Kernel driver ina238

_Peios Kernel / Hardware and drivers / Hardware monitoring_

> Supported chips:

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

<!-- SPDX-License-Identifier: GPL-2.0-only -->

Supported chips:

> - Texas Instruments INA228
>
>   Prefix: 'ina228'
>
>   Addresses: I2C 0x40 - 0x4f
>
>   - **Datasheet:**
>
>     [https://www.ti.com/lit/gpn/ina228](<https://www.ti.com/lit/gpn/ina228>)
>
> - Texas Instruments INA237
>
>   Prefix: 'ina237'
>
>   Addresses: I2C 0x40 - 0x4f
>
>   - **Datasheet:**
>
>     [https://www.ti.com/lit/gpn/ina237](<https://www.ti.com/lit/gpn/ina237>)
>
> - Texas Instruments INA238
>
>   Prefix: 'ina238'
>
>   Addresses: I2C 0x40 - 0x4f
>
>   - **Datasheet:**
>
>     [https://www.ti.com/lit/gpn/ina238](<https://www.ti.com/lit/gpn/ina238>)
>
> - Texas Instruments INA700
>
>   - **Datasheet:**
>
>     [https://www.ti.com/product/ina700](<https://www.ti.com/product/ina700>)
>
> - Texas Instruments INA780
>
>   - **Datasheet:**
>
>     [https://www.ti.com/product/ina780a](<https://www.ti.com/product/ina780a>)
>
> - Silergy SQ52206
>
>   Prefix: 'SQ52206'
>
>   Addresses: I2C 0x40 - 0x4f

Author: Nathan Rossi &lt;[nathan.rossi@digi.com](<mailto:nathan.rossi@digi.com>)&gt;

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

## Description

The INA238 is a current shunt, power and temperature monitor with an I2C interface. It includes a number of programmable functions including alerts, conversion rate, sample averaging and selectable shunt voltage accuracy.

The shunt value in micro-ohms can be set via device properties, either from platform code or from device tree data. Please refer to Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml for bindings if device tree is used.

INA237 is a functionally equivalent variant of INA238 with slightly different accuracy. INA228 is another variant of INA238 with higher ADC resolution. This chip also reports the energy.

INA700 and INA780 are variants of the chip series with built-in shunt resistor. They also report the energy.

SQ52206 is a mostly compatible chip from Sylergy. It reports the energy as well as the peak power consumption.

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

## Sysfs entries


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


in0_input

</td>
<td>


Shunt voltage (mV)

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


in0_min

</td>
<td>


Minimum shunt voltage threshold (mV)

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


in0_min_alarm

</td>
<td>


Minimum shunt voltage alarm

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


in0_max

</td>
<td>


Maximum shunt voltage threshold (mV)

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


in0_max_alarm

</td>
<td>


Maximum shunt voltage alarm

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


in1_input

</td>
<td>


Bus voltage (mV)

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


in1_min

</td>
<td>


Minimum bus voltage threshold (mV)

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


in1_min_alarm

</td>
<td>


Minimum shunt voltage alarm

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


in1_max

</td>
<td>


Maximum bus voltage threshold (mV)

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


in1_max_alarm

</td>
<td>


Maximum shunt voltage alarm

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


power1_input

</td>
<td>


Power measurement (uW)

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


power1_max

</td>
<td>


Maximum power threshold (uW)

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


power1_max_alarm

</td>
<td>


Maximum power alarm

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


power1_input_highest

</td>
<td>


- **Peak Power (uW)**

  (SQ52206 only)

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


curr1_input

</td>
<td>


Current measurement (mA)

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


curr1_min

</td>
<td>


Minimum current threshold (mA)

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


curr1_min_alarm

</td>
<td>


Minimum current alarm

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


curr1_max

</td>
<td>


Maximum current threshold (mA)

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


curr1_max_alarm

</td>
<td>


Maximum current alarm

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


energy1_input

</td>
<td>


- **Energy measurement (uJ)**

  (SQ52206, INA237, and INA780 only)

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


temp1_input

</td>
<td>


Die temperature measurement (mC)

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


temp1_max

</td>
<td>


Maximum die temperature threshold (mC)

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


temp1_max_alarm

</td>
<td>


Maximum die temperature alarm

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