diff mbox series

[07/16] hw/sensor: tmp421: describe the temperature properties

Message ID 20261105-sensor-tmp421-v1-7-c46853f5e1f0@free.fr
State New
Headers show
Series hw/sensor: TMP421 improvements | expand

Commit Message

Emmanuel Blot Nov. 5, 2026, 9:25 a.m. UTC
Attach a description to each temperature property so it shows up in
qom-list-properties.

Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
---
 hw/sensor/tmp421.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/hw/sensor/tmp421.c b/hw/sensor/tmp421.c
index 8c789a2a09..87cbd9dd4b 100644
--- a/hw/sensor/tmp421.c
+++ b/hw/sensor/tmp421.c
@@ -394,6 +394,8 @@  static void tmp421_initfn(Object *obj)
         object_property_add(obj, name, "int", &int_type_info,
                             tmp421_get_temperature,
                             tmp421_set_temperature, NULL, NULL);
+        object_property_set_description(obj, name,
+                            "Temperature, in millidegrees Celsius");
     }
 }