drivers: sensor: Add driver for TI INA23x

This driver supports the TI INA230 and INA231 Bidirectional Current
and Power Monitors. The devices work on the I2C interface and are
created from DT nodes with a compatible property matching "ti,ina23x".

The following datasheets were referenced while developing the driver:
https://www.ti.com/product/INA230
https://www.ti.com/product/INA231

Twister passed:
twister -T tests/drivers/build_all/sensor/

Testing was performed on the stm32g071b_disco board with the following:
Load:    ~170 ohms
Voltage: 5V

Measured Values:
Voltage: 5.1 V
Current: 0.032 A
Power:   0.157 W

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
This commit is contained in:
Sam Hurst 2021-05-03 10:36:56 -07:00 committed by Christopher Friedt
commit 1382d64ed5
13 changed files with 678 additions and 0 deletions

View file

@ -112,6 +112,8 @@ source "drivers/sensor/iis2mdc/Kconfig"
source "drivers/sensor/iis3dhhc/Kconfig"
source "drivers/sensor/ina23x/Kconfig"
source "drivers/sensor/isl29035/Kconfig"
source "drivers/sensor/ism330dhcx/Kconfig"