diff options
author | Hao Wu <wuhaotsh@google.com> | 2022-07-14 11:28:32 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-07-18 13:20:14 +0100 |
commit | 99638ba9d86b7707adabbf0b223a6e0ae144cd88 (patch) | |
tree | fbbd14a36b861f20931109d0b95bd286eae2907f /hw/adc | |
parent | 4a84e85413acaad9e84b64786e44e190080d78a6 (diff) |
hw/adc: Make adci[*] R/W in NPCM7XX ADC
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>
Diffstat (limited to 'hw/adc')
-rw-r--r-- | hw/adc/npcm7xx_adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c index 47fb9e5f74..bc6f3f55e6 100644 --- a/hw/adc/npcm7xx_adc.c +++ b/hw/adc/npcm7xx_adc.c @@ -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); |