qemu-e2k/hw
Paolo Bonzini 4261b2f915 nrf51_gpio: reflect pull-up/pull-down to IRQs
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 is set to output, the output driver brings
the output to 0.

Implement this for the nRF51 GPIO device model.  First, if both input and
output are floating, and there is a pull-up or pull-down resistor
configured, do not just set s->in, but also make any devices listening
on the output qemu_irq receive that value.  Second, if the pin is
driven both internally (output pin) and externally you don't get a
short circuit if both sides drive the pin to the same value.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20190317141001.3346-1-pbonzini@redhat.com
[PMM: wrapped long line]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-25 14:16:46 +00:00
..
9pfs
acpi i386, acpi: check acpi_memory_hotplug capacity in pre_plug 2019-03-12 22:31:21 -04:00
adc
alpha
arm hw/arm/virt-acpi-build: use PCIE_MMCFG_BUS to retrieve end_bus_number 2019-03-15 11:12:29 +00:00
audio
block pci, pc, virtio: features, fixes, cleanups 2019-03-13 19:10:40 +00:00
bt
char spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
core Machine queue, 2019-03-11 2019-03-12 15:25:46 +00:00
cpu
cris
display virtio-gpu: clear command and fence queues on reset 2019-03-18 13:10:57 +01:00
dma
gpio nrf51_gpio: reflect pull-up/pull-down to IRQs 2019-03-25 14:16:46 +00:00
hppa Update seabios-hppa to latest upstream 2019-03-15 10:11:16 -07:00
hyperv
i2c
i386 xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored 2019-03-19 15:32:13 +00:00
ide
input
intc ppc/xics/spapr: Fix H_IPOLL implementation 2019-03-19 15:20:14 +11:00
ipack
ipmi
isa i386, acpi: check acpi_memory_hotplug capacity in pre_plug 2019-03-12 22:31:21 -04:00
lm32
m68k
mem
microblaze
mips
misc
moxie
net spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
nios2
nvram fw_cfg and thunk code clean up 2019-03-12 12:29:53 +00:00
openrisc
pci pcie: Add a simple PCIe ACS (Access Control Services) helper function 2019-03-12 22:31:21 -04:00
pci-bridge gen_pcie_root_port: Add ACS (Access Control Services) capability 2019-03-12 22:31:21 -04:00
pci-host
pcmcia
ppc spapr: Remove NULL checks on error_propagate() calls 2019-03-19 15:24:15 +11:00
rdma hw/rdma: Fix the error prints in create_qp_rings() 2019-03-16 15:52:44 +02:00
riscv riscv: sifive_u: Correct UART0's IRQ in the device tree 2019-03-19 05:18:42 -07:00
s390x
scsi vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
sd hw/sd/sdhci: Move PCI-related code into a separate file 2019-03-12 07:49:04 +01:00
sh4
smbios
sparc
sparc64
ssi
timer
tpm
tricore
unicore32
usb
vfio VFIO updates 2019-03-11 2019-03-12 13:37:29 +00:00
virtio vhost-user: Support transferring inflight buffer between qemu and backend 2019-03-12 22:31:21 -04:00
watchdog
xen
xenpv
xtensa
Kconfig
Makefile.objs