Skip to content

hw/sensor: TMP421 improvements

Emmanuel Blot via qemu-arm qemu-devel 1 version New

Get series with b4
b4 am [email protected] change-id 20261105-sensor-tmp421-9d69ce545c66

Versions newest first

  1. v1 Latest15 of 16 patches 0 repliesNew

15 of 16 patches are in this archive. The cover letter announces 16.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16hw/sensor: tmp421: do not report a stale errno on a parse failurehw/sensor/tmp421.c+2 -20 replies
2/16hw/sensor: tmp421: name the parent object field parent_objhw/sensor/tmp421.c+3 -30 replies
3/16hw/sensor: tmp421: implement Resettable resethw/sensor/tmp421.c+13 -130 replies
4/16hw/sensor: tmp421: model device variants with a class descriptorhw/sensor/tmp421.c+46 -520 replies
6/16hw/sensor: tmp421: implement register write masks, one-shot and N-factorhw/sensor/tmp421.c+60 -50 replies
7/16hw/sensor: tmp421: describe the temperature propertieshw/sensor/tmp421.c+2 -00 replies
8/16hw/sensor: tmp421: keep the measurement across a range changehw/sensor/tmp421.c+81 -150 replies
9/16hw/sensor: tmp421: migrate the exact measurementhw/sensor/tmp421.c+58 -20 replies
10/16hw/sensor: tmp421: publish the variant type nameshw/sensor/tmp421.c include/hw/sensor/tmp421.h+20 -30 replies
11/16hw/arm/aspeed: use the TMP421 type-name macroshw/arm/aspeed_ast2400_palmetto.c hw/arm/aspeed_ast2400_supermicrox11.c hw/arm/aspeed_ast2500_supermicro-x11spi.c +8 more+38 -220 replies
12/16tests/qtest: tmp421: cover device IDs and reset defaultstests/qtest/meson.build tests/qtest/tmp421-test.c+85 -00 replies
13/16tests/qtest: tmp421: cover temperature encoding and rangetests/qtest/tmp421-test.c+102 -00 replies
14/16tests/qtest: tmp421: cover per-variant channels and enablementtests/qtest/tmp421-test.c+37 -00 replies
15/16tests/qtest: tmp421: cover software reset and N-factor registerstests/qtest/tmp421-test.c+37 -00 replies
16/16tests/qtest: tmp421: cover the register form of the migration streamtests/qtest/tmp421-test.c+66 -00 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchJamin Lin
1/16
2/16
3/16
4/16
6/16
7/16
8/16
9/16
10/16
11/16R-b
12/16
13/16
14/16
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/16] hw/sensor: TMP421 improvements

Based on master, at:
f29ccc287a

The TMP421 variants are now described by a class descriptor instead of a lookup table. Channel enablement, register write masks, the one-shot trigger and the per-channel N-factor registers are modelled, reset follows Resettable API, and the variant type names move to a header so boards stop open-coding the strings.

The new TMP421 state is stored in optional subsections.

New qtest for the TMP421 family, checking a migration round trip.

---
Emmanuel Blot (16):
hw/sensor: tmp421: do not report a stale errno on a parse failure hw/sensor: tmp421: name the parent object field parent_obj hw/sensor: tmp421: implement Resettable reset
hw/sensor: tmp421: model device variants with a class descriptor hw/sensor: tmp421: honor per-variant channels and channel enablement hw/sensor: tmp421: implement register write masks, one-shot and N-factor hw/sensor: tmp421: describe the temperature properties hw/sensor: tmp421: keep the measurement across a range change hw/sensor: tmp421: migrate the exact measurement
hw/sensor: tmp421: publish the variant type names hw/arm/aspeed: use the TMP421 type-name macros
tests/qtest: tmp421: cover device IDs and reset defaults tests/qtest: tmp421: cover temperature encoding and range tests/qtest: tmp421: cover per-variant channels and enablement tests/qtest: tmp421: cover software reset and N-factor registers tests/qtest: tmp421: cover the register form of the migration stream

 hw/arm/aspeed_ast2400_palmetto.c          |   3 +-
 hw/arm/aspeed_ast2400_supermicrox11.c     |   3 +-
 hw/arm/aspeed_ast2500_supermicro-x11spi.c |   3 +-
 hw/arm/aspeed_ast2500_tiogapass.c         |  10 +-
 hw/arm/aspeed_ast2500_witherspoon.c       |   7 +-
 hw/arm/aspeed_ast2500_yosemitev2.c        |  10 +-
 hw/arm/aspeed_ast2600_bletchley.c         |   3 +-
 hw/arm/aspeed_ast2600_catalina.c          |   3 +-
 hw/arm/aspeed_ast2600_fby35.c             |   2 +-
 hw/arm/aspeed_ast2600_fuji.c              |   3 +-
 hw/arm/aspeed_ast2600_rainier.c           |  13 +-
 hw/sensor/tmp421.c                        | 429 +++++++++++++++++++++---------
 include/hw/sensor/tmp421.h                |  19 ++
 tests/qtest/meson.build                   |   1 +
 tests/qtest/tmp421-test.c                 | 326 +++++++++++++++++++++++
 15 files changed, 692 insertions(+), 143 deletions(-)

---
base-commit: f29ccc287a6cfdd51d3a4fd17fbe9af3310a0ac5
change-id: 20261105-sensor-tmp421-9d69ce545c66

Best regards,

Signature · 1 line
Emmanuel Blot <[email protected]>