[PATCH 00/16] hw/sensor: add the INA230 and INA238 power monitors

Emmanuel Blot via qemu development posted 16 patches 2 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261105-sensor-ina23x-v1-0-5433ed104990@free.fr
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
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(+)
[PATCH 00/16] hw/sensor: add the INA230 and INA238 power monitors
Posted by Emmanuel Blot via qemu development 2 weeks, 3 days ago
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>