hw/adc: Make adci[*] R/W in NPCM7XX ADC
authorHao Wu <wuhaotsh@google.com>
Thu, 14 Jul 2022 18:28:32 +0000 (11:28 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 18 Jul 2022 12:20:14 +0000 (13:20 +0100)
Our sensor test requires both reading and writing from a sensor's
QOM property. So we need to make the input of ADC module R/W instead
of write only for that to work.

Signed-off-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220714182836.89602-5-wuhaotsh@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/adc/npcm7xx_adc.c

index 47fb9e5f74c2b6c0b19d1b4c3394b72eb11a13b5..bc6f3f55e643b26669feba2077a478d7cf6a2840 100644 (file)
@@ -242,7 +242,7 @@ static void npcm7xx_adc_init(Object *obj)
 
     for (i = 0; i < NPCM7XX_ADC_NUM_INPUTS; ++i) {
         object_property_add_uint32_ptr(obj, "adci[*]",
-                &s->adci[i], OBJ_PROP_FLAG_WRITE);
+                &s->adci[i], OBJ_PROP_FLAG_READWRITE);
     }
     object_property_add_uint32_ptr(obj, "vref",
             &s->vref, OBJ_PROP_FLAG_WRITE);