Re: [Qemu-devel] [PATCH v2] nrf51_gpio: reflect pull-up/pull-down to IRQs

2019-03-20 Thread Stefan Hajnoczi
On Sun, Mar 17, 2019 at 03:10:01PM +0100, Paolo Bonzini wrote: > Some drivers do I2C bitbanging by keeping the output to 0 and flipping > the GPIO direction between input and output (see for example in Linux > gpio_set_open_drain_value_commit, in drivers/gpio/gpiolib.c). > When the GPIO is set to i

[Qemu-devel] [PATCH v2] nrf51_gpio: reflect pull-up/pull-down to IRQs

2019-03-17 Thread Paolo Bonzini
Some drivers do I2C bitbanging by keeping the output to 0 and flipping the GPIO direction between input and output (see for example in Linux gpio_set_open_drain_value_commit, in drivers/gpio/gpiolib.c). When the GPIO is set to input, the pull-up resistor brings the output to 1, while when the GPIO