qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 0/8] hw/misc/pca9552: Trace GPIO change events


From: Philippe Mathieu-Daudé
Subject: [PATCH v4 0/8] hw/misc/pca9552: Trace GPIO change events
Date: Sun, 21 Jun 2020 00:58:46 +0200

This series add trace events to better display GPIO changes.
We'll continue in the following series by connecting LEDs to
these GPIOs.

This helps me to work on a generic LED device, see:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg711917.html

Example when booting an obmc-phosphor-image, we can see the LED #14
(front-power LED) starting to blink.

- ASCII LED bar view:

  $ qemu-system-arm -M witherspoon-bmc -trace pca9552_gpio_status
  1592689902.327837:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[*...............]
  1592689902.329934:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[**..............]
  1592689902.330717:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[***.............]
  1592689902.331431:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****............]
  1592689902.332163:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........*..]
  1592689902.332888:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........**.]
  1592689902.333629:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........***]
  1592690032.793289:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........*.*]
  1592690033.303163:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........***]
  1592690033.812962:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........*.*]
  1592690034.323234:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........***]
  1592690034.832922:pca9552_gpio_status pca-unspecified GPIOs 0-15 
[****.........*.*]

- Only display GPIOs which status changes:

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

For information about how to test the obmc-phosphor-image, see:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg712911.html

Supersedes: <20200619145101.1637-1-f4bug@amsat.org>
Based-on: <20200620162818.22340-1-f4bug@amsat.org>

Philippe Mathieu-Daudé (8):
  hw/i2c/core: Add i2c_try_create_slave() and i2c_realize_and_unref()
  hw/misc/pca9552: Replace magic value by PCA9552_PIN_COUNT definition
  hw/misc/pca9552: Use the PCA9552_PIN_COUNT definition
  hw/misc/pca9552: Add a 'description' property for debugging purpose
  hw/misc/pca9552: Trace GPIO High/Low events
  hw/arm/aspeed: Describe each PCA9552 device
  hw/misc/pca9552: Trace GPIO change events
  hw/misc/pca9552: Model qdev output GPIOs

 include/hw/i2c/i2c.h      |  2 ++
 include/hw/misc/pca9552.h |  4 +++
 hw/arm/aspeed.c           | 13 ++++---
 hw/i2c/core.c             | 18 ++++++++--
 hw/misc/pca9552.c         | 72 ++++++++++++++++++++++++++++++++++++++-
 hw/misc/trace-events      |  4 +++
 6 files changed, 106 insertions(+), 7 deletions(-)

-- 
2.21.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]