]> git.proxmox.com Git - mirror_qemu.git/commit
hw/arm/spitz: Encapsulate misc GPIO handling in a device
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 3 Jul 2020 15:59:45 +0000 (16:59 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 3 Jul 2020 15:59:45 +0000 (16:59 +0100)
commiteb2dc887a4c71d9e4efd0861fcf7094d0df9df99
tree59b31f04ffa9dedd4376dffec56880150b2cbd63
parent3029681235b492026739b831a24a75d1e94e7be5
hw/arm/spitz: Encapsulate misc GPIO handling in a device

Currently we have a free-floating set of IRQs and a function
spitz_out_switch() which handle some miscellaneous GPIO lines for the
spitz board.  Encapsulate this behaviour in a simple QOM device.

At this point we can finally remove the 'max1111' global, because the
ADC battery-temperature value is now handled by the misc-gpio device
writing the value to its outbound "adc-temp" GPIO, which the board
code wires up to the appropriate inbound GPIO line on the max1111.

This commit also fixes Coverity issue CID 1421913 (which pointed out
that the 'outsignals' in spitz_scoop_gpio_setup() were leaked),
because it removes the use of the qemu_allocate_irqs() API from this
code entirely.

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-13-peter.maydell@linaro.org
hw/arm/spitz.c