hw/adc: Add an ADC module for NPCM7XX
commit77c05b0b746119a78bffb595b0313d39ac6b20fc
authorHao Wu <wuhaotsh@google.com>
Fri, 8 Jan 2021 19:09:42 +0000 (8 11:09 -0800)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 12 Jan 2021 21:19:02 +0000 (12 21:19 +0000)
tree72bd9b4e4f3773f94809fafec303c7cff44074f3
parent0be12dc76aabda6399a28d9b5e450da2bb94cb22
hw/adc: Add an ADC module for NPCM7XX

The ADC is part of NPCM7XX Module. Its behavior is controled by the
ADC_CON register. It converts one of the eight analog inputs into a
digital input and stores it in the ADC_DATA register when enabled.

Users can alter input value by using qom-set QMP command.

Reviewed-by: Havard Skinnemoen <hskinnemoen@google.com>
Reviewed-by: Tyrone Ting <kfting@nuvoton.com>
Signed-off-by: Hao Wu <wuhaotsh@google.com>
Message-id: 20210108190945.949196-4-wuhaotsh@google.com
[PMM: Added missing hw/adc/trace.h file]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
docs/system/arm/nuvoton.rst
hw/adc/meson.build
hw/adc/npcm7xx_adc.c [new file with mode: 0644]
hw/adc/trace-events [new file with mode: 0644]
hw/adc/trace.h [new file with mode: 0644]
hw/arm/npcm7xx.c
include/hw/adc/npcm7xx_adc.h [new file with mode: 0644]
include/hw/arm/npcm7xx.h
meson.build
tests/qtest/meson.build
tests/qtest/npcm7xx_adc-test.c [new file with mode: 0644]