Kernel driver ina3221

Supported chips:

  • Texas Instruments INA3221

    Prefix: ‘ina3221’

    Addresses: I2C 0x40 - 0x43

    Datasheet: Publicly available at the Texas Instruments website

Author: Andrew F. Davis <afd@ti.com>

Description

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

Sysfs entries

in[123]_labelVoltage channel labels
in[123]_enableVoltage channel enable controls
in[123]_inputBus voltage(mV) channels
curr[123]_inputCurrent(mA) measurement channels
shunt[123]_resistorShunt resistance(uOhm) channels
curr[123]_critCritical alert current(mA) setting, activates thecorresponding alarm when the respective currentis above this value
curr[123]_crit_alarmCritical alert current limit exceeded
curr[123]_maxWarning alert current(mA) setting, activates thecorresponding alarm when the respective currentaverage is above this value.
curr[123]_max_alarmWarning alert current limit exceeded
in[456]_inputShunt voltage(uV) for channels 1, 2, and 3 respectively
in7_inputSum of shunt voltage(uV) channels
in7_labelChannel label for sum of shunt voltage
curr4_inputSum of current(mA) measurement channels,(only available when all channels use the same resistorvalue for their shunt resistors)
curr4_critCritical alert current(mA) setting for sum of currentmeasurements, activates the corresponding alarmwhen the respective current is above this value(only effective when all channels use the same resistorvalue for their shunt resistors)
curr4_crit_alarmCritical alert current limit exceeded for sum ofcurrent measurements.
samples

Number of samples using in the averaging mode.

Supports the list of number of samples:

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

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 BCand SC to 140 us (minimum conversion time).