Re: [PATCH v2 1/3] hw/misc/latching_switch: Add a simple latching_switch device

2022-10-10 Thread Peter Maydell
On Tue, 20 Sept 2022 at 19:46, Jian Zhang wrote: > > Implement a simple latching switch device. > > The latching switch is a switch that can be turned on and off. > When the input new state and match the trigger edge, the switch > state will be toggled. > > This device privide 2 properties

[PATCH v2 1/3] hw/misc/latching_switch: Add a simple latching_switch device

2022-09-20 Thread Jian Zhang
Implement a simple latching switch device. The latching switch is a switch that can be turned on and off. When the input new state and match the trigger edge, the switch state will be toggled. This device privide 2 properties `state(bool)` and `trigger-edge(string)`, and 2 gpios `input` and