qemu/hw
Philippe Mathieu-Daudé d82ab2931d hw/misc/pca9552: Trace GPIO change events
Emit a trace event when a GPIO change its state.

Example booting obmc-phosphor-image:

  $ qemu-system-arm -M witherspoon-bmc -trace pca955x_gpio_change
  1592690552.687372:pca955x_gpio_change pca1 GPIO id:0 status: 0 -> 1
  1592690552.690169:pca955x_gpio_change pca1 GPIO id:1 status: 0 -> 1
  1592690552.691673:pca955x_gpio_change pca1 GPIO id:2 status: 0 -> 1
  1592690552.696886:pca955x_gpio_change pca1 GPIO id:3 status: 0 -> 1
  1592690552.698614:pca955x_gpio_change pca1 GPIO id:13 status: 0 -> 1
  1592690552.699833:pca955x_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690552.700842:pca955x_gpio_change pca1 GPIO id:15 status: 0 -> 1
  1592690683.841921:pca955x_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690683.861660:pca955x_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690684.371460:pca955x_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690684.882115:pca955x_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690685.391411:pca955x_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690685.901391:pca955x_gpio_change pca1 GPIO id:14 status: 0 -> 1
  1592690686.411678:pca955x_gpio_change pca1 GPIO id:14 status: 1 -> 0
  1592690686.921279:pca955x_gpio_change pca1 GPIO id:14 status: 0 -> 1

We notice the GPIO #14 (front-power LED) starts to blink.

This LED is described in the witherspoon device-tree [*]:

  front-power {
      retain-state-shutdown;
      default-state = "keep";
      gpios = <&pca0 14 GPIO_ACTIVE_LOW>;
  };

[*] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts?id=b1f9be9392f0#n140

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20200623072723.6324-9-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-06-26 14:30:28 +01:00
..
9pfs
acpi Rename use_acpi_pci_hotplug to more appropriate use_acpi_hotplug_bridge 2020-06-24 19:03:57 -04:00
adc
alpha
arm hw/arm/aspeed: Describe each PCA9552 device 2020-06-26 14:30:28 +01:00
audio hw/audio/gus: Fix registers 32-bit access 2020-06-19 11:20:09 +02:00
block virtio,acpi,pci: fixes, cleanups. 2020-06-25 16:52:42 +01:00
char hw/char: RX62N serial communication interface (SCI) 2020-06-22 18:37:12 +02:00
core qdev: Make qdev_prop_set_drive() match the other helpers 2020-06-23 16:07:07 +02:00
cpu
cris
display
dma
gpio
hppa
hyperv
i2c hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref() 2020-06-26 14:30:28 +01:00
i386 virtio,acpi,pci: fixes, cleanups. 2020-06-25 16:52:42 +01:00
ide qdev: Make qdev_prop_set_drive() match the other helpers 2020-06-23 16:07:07 +02:00
input adb: add ADB bus trace events 2020-06-26 10:13:52 +01:00
intc hw/intc: RX62N interrupt controller (ICUa) 2020-06-22 18:37:12 +02:00
ipack
ipmi
isa fdc: Reject clash between -drive if=floppy and -global isa-fdc 2020-06-23 16:07:07 +02:00
lm32
m68k qdev: Make qdev_prop_set_drive() match the other helpers 2020-06-23 16:07:07 +02:00
mem
microblaze qdev: Make qdev_prop_set_drive() match the other helpers 2020-06-23 16:07:07 +02:00
mips
misc hw/misc/pca9552: Trace GPIO change events 2020-06-26 14:30:28 +01:00
moxie
net hw/net/e1000e: Do not abort() on invalid PSRCTL register value 2020-06-18 21:05:52 +08:00
nios2
nubus
nvram
openrisc
pci
pci-bridge
pci-host
pcmcia
ppc qemu-macppc patches 2020-06-26 12:14:18 +01:00
rdma
riscv hw/riscv: sifive_u: Add a dummy DDR memory controller device 2020-06-19 08:25:27 -07:00
rtc
rx hw/rx: Add RX GDB simulator 2020-06-22 18:37:12 +02:00
s390x
scsi qdev: Make qdev_prop_set_drive() match the other helpers 2020-06-23 16:07:07 +02:00
sd sd/milkymist-memcard: Fix error API violation 2020-06-23 16:07:21 +02:00
semihosting
sh4 hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' 2020-06-22 18:37:12 +02:00
smbios
sparc
sparc64 fdc: Reject clash between -drive if=floppy and -global isa-fdc 2020-06-23 16:07:07 +02:00
ssi
timer hw/timer: RX62N compare match timer (CMT) 2020-06-22 18:37:12 +02:00
tpm tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
tricore
unicore32
usb
vfio
virtio Stop vhost-user sending uninitialized mmap_offsets 2020-06-24 17:18:28 -04:00
watchdog hw/watchdog/cmsdk-apb-watchdog: Add trace event for lock status 2020-06-23 11:39:47 +01:00
xen
xenpv
xtensa qdev: Make qdev_prop_set_drive() match the other helpers 2020-06-23 16:07:07 +02:00
Kconfig hw/rx: RX62N microcontroller (MCU) 2020-06-22 18:37:12 +02:00
Makefile.objs