hw/misc/max111x: provide QOM properties for setting initial values
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 3 Jul 2020 15:59:44 +0000 (16:59 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 3 Jul 2020 15:59:44 +0000 (16:59 +0100)
commitb064d51f6022c49ceab73c46e84ae05f9f704732
treec7dd18068111caab66ab4ab2fa8760b460145178
parent2e354c028a282b1bae56154ed52ac80746eb24b3
hw/misc/max111x: provide QOM properties for setting initial values

Add some QOM properties to the max111x ADC device to allow the
initial values to be configured. Currently this is done by
board code calling max111x_set_input() after it creates the
device, which doesn't work on system reset.

This requires us to implement a reset method for this device,
so while we're doing that make sure we reset the other parts
of the device state.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200628142429.17111-7-peter.maydell@linaro.org
hw/misc/max111x.c