Based on master, at:
f29ccc287a
New models:
INA230 TI 36V current-shunt and power monitor
INA238 TI 85V current-shunt, power and temperature monitor
The INA devices derive current and power from the shunt voltage and
their calibration registers. ALERT output is supported. Measurements
come in through QOM properties; however, conversion delay is not
modelled.
New qtests for the INA230 and INA238.
Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
---
Emmanuel Blot (16):
hw/sensor: ina230: add current/voltage/power monitor
tests/qtest: ina230: add current/voltage/power monitor test
tests/qtest: ina230: cover voltage injection and power derivation
tests/qtest: ina230: cover the ALERT limit functions and CVRF
tests/qtest: ina230: cover the injection-property limits
tests/qtest: ina230: cover operating modes and triggered conversions
tests/qtest: ina230: cover ALERT latch persistence
tests/qtest: ina230: cover a cleared calibration per channel
hw/sensor: ina238: add current/voltage/power monitor
tests/qtest: ina238: add current/voltage/power monitor test
tests/qtest: ina238: cover voltage/temperature injection and derivation
tests/qtest: ina238: cover the ALERT path and conversion-ready flag
tests/qtest: ina238: cover the injection-property limits
tests/qtest: ina238: cover the operating modes
tests/qtest: ina238: cover conversion-ready and alert-latch semantics
tests/qtest: ina238: cover a cleared calibration per channel
hw/arm/Kconfig | 2 +
hw/sensor/Kconfig | 8 +
hw/sensor/ina230.c | 598 +++++++++++++++++++++++++++++++++
hw/sensor/ina238.c | 803 ++++++++++++++++++++++++++++++++++++++++++++
hw/sensor/meson.build | 2 +
hw/sensor/trace-events | 14 +
include/hw/sensor/ina230.h | 14 +
include/hw/sensor/ina238.h | 14 +
tests/qtest/ina230-test.c | 602 +++++++++++++++++++++++++++++++++
tests/qtest/ina238-test.c | 806 +++++++++++++++++++++++++++++++++++++++++++++
tests/qtest/meson.build | 2 +
11 files changed, 2865 insertions(+)
---
base-commit: f29ccc287a6cfdd51d3a4fd17fbe9af3310a0ac5
change-id: 20261105-sensor-ina23x-8ab9d4c91ca1
Best regards,
--
Emmanuel Blot <emmanuel.blot@free.fr>