On 9/12/20 6:40 AM, Philippe Mathieu-Daudé wrote: > Some devices expose GPIO lines. > > Add a GPIO qdev input to our LED device, so we can > connect a GPIO output using qdev_connect_gpio_out(). > > When used with GPIOs, the intensity can only be either > minium or maximum. This depends of the polarity of the > GPIO (which can be inverted). > Declare the GpioPolarity type to model the polarity. > > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > include/hw/misc/led.h | 10 ++++++++++ > include/hw/qdev-core.h | 16 ++++++++++++++++ > hw/misc/led.c | 17 ++++++++++++++++- > 3 files changed, 42 insertions(+), 1 deletion(-) git-submodule-update
- [PATCH v6 0/7] hw/misc: Add LED device Philippe Mathieu-Daudé
- [PATCH v6 2/7] hw/misc/led: Allow connecting ... Philippe Mathieu-Daudé
- Re: [PATCH v6 2/7] hw/misc/led: Allow con... Richard Henderson
- Re: [PATCH v6 2/7] hw/misc/led: Allow con... Richard Henderson
- Re: [PATCH v6 2/7] hw/misc/led: Allow con... Luc Michel
- [PATCH v6 5/7] hw/misc/mps2-fpgaio: Use the L... Philippe Mathieu-Daudé
- Re: [PATCH v6 5/7] hw/misc/mps2-fpgaio: U... Luc Michel
- [PATCH v6 1/7] hw/misc/led: Add a LED device Philippe Mathieu-Daudé
- [PATCH v6 6/7] hw/misc/mps2-scc: Use the LED ... Philippe Mathieu-Daudé
- Re: [PATCH v6 6/7] hw/misc/mps2-scc: Use ... Luc Michel
- [PATCH v6 3/7] hw/misc/led: Emit a trace even... Philippe Mathieu-Daudé
- [PATCH v6 4/7] hw/arm/aspeed: Add the 3 front... Philippe Mathieu-Daudé
- Re: [PATCH v6 4/7] hw/arm/aspeed: Add the... Cédric Le Goater