Skip to content

hw/misc: Add LED device

Philippe Mathieu-Daudé qemu-arm qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest7 patches 10 repliesIn review
  2. v57 patches 22 repliesSuperseded
  3. v48 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v37 patches14 repliesSuperseded
v2 RFC5 patches9 repliesSuperseded
v1 RFC5 patches4 repliesSuperseded

Changes in v6 from the cover letter

- Rebased on "QOM boilerplate cleanup" (use DECLARE_INSTANCE_CHECKER)
- Addressed Luc and Richard comments
- Do not use confusing "polarity-inverted" property
- Reset LEDs in MPS2 devices
- Document GpioPolarity

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7hw/misc/led: Add a LED deviceMAINTAINERS hw/misc/Kconfig hw/misc/led.c +3 more+242 -00 replies
2/7hw/misc/led: Allow connecting from GPIO outputhw/misc/led.c include/hw/misc/led.h include/hw/qdev-core.h+42 -13 replies
3/7hw/misc/led: Emit a trace event when LED intensity has changedhw/misc/led.c hw/misc/trace-events+5 -00 replies
4/7hw/arm/aspeed: Add the 3 front LEDs drived by the PCA9552 #1hw/arm/Kconfig hw/arm/aspeed.c+21 -01 reply
5/7hw/misc/mps2-fpgaio: Use the LED devicehw/misc/Kconfig hw/misc/mps2-fpgaio.c hw/misc/trace-events +1 more+21 -61 reply
6/7hw/misc/mps2-scc: Use the LED devicehw/misc/Kconfig hw/misc/mps2-scc.c hw/misc/trace-events +1 more+19 -121 reply
7/7hw/arm/tosa: Replace fprintf() calls by LED deviceshw/arm/Kconfig hw/arm/tosa.c+16 -250 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchLuc MichelRichard HendersonCédric Le Goater
1/7R-b R-b
2/7R-b R-b
3/7R-b R-b
4/7R-b R-b R-b
5/7R-b R-b
6/7R-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/7] hw/misc: Add LED device

Hello,

These patches are part of the GSoC unselected 'QEMU visualizer' project.

This series introduce a LED device that can be easily connected to a GPIO output.

Missing review:
- Patch #2: "hw/misc/led: Allow connecting from GPIO output"

Since v5:
- Rebased on "QOM boilerplate cleanup" (use DECLARE_INSTANCE_CHECKER)
- Addressed Luc and Richard comments
- Do not use confusing "polarity-inverted" property
- Reset LEDs in MPS2 devices
- Document GpioPolarity

Since v4:
- Fixed typos (Luc)
- Removed TYPE_TOSA_MISC_GPIO qdev conversion patch (Peter)

Since v3:
- Rebased (TYPE_TOSA_MISC_GPIO)
- Rebased (Meson)
- Addressed Richard's review comments
- Improved doc/comments

Since v2:
- Rebased on PCA9552
- Model intensity to be ready for PWM use (Dave)
- Remove QMP events until we get a UI visualizer (Peter)
- Remove microbit patch (Peter)

Since v1: addressed Eric Blake review comments
- Added QMP rate limit

Next steps planned:

- PoC visualizer...
- look at using a dbus backend (elmarco)
- look at LED array/matrix such 7segments.

Regards,

Phil.

$ git backport-diff -r v6.. -u v5
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respective=
ly

001/7:[0013] [FC] 'hw/misc/led: Add a LED device'
002/7:[0026] [FC] 'hw/misc/led: Allow connecting from GPIO output' 003/7:[----] [--] 'hw/misc/led: Emit a trace event when LED intensity has cha= nged'
004/7:[----] [--] 'hw/arm/aspeed: Add the 3 front LEDs drived by the PCA9552 = #1'
005/7:[0004] [FC] 'hw/misc/mps2-fpgaio: Use the LED device' 006/7:[0004] [FC] 'hw/misc/mps2-scc: Use the LED device' 007/7:[----] [-C] 'hw/arm/tosa: Replace fprintf() calls by LED devices'

Philippe Mathieu-Daud=C3=A9 (7):
hw/misc/led: Add a LED device
hw/misc/led: Allow connecting from GPIO output hw/misc/led: Emit a trace event when LED intensity has changed hw/arm/aspeed: Add the 3 front LEDs drived by the PCA9552 #1 hw/misc/mps2-fpgaio: Use the LED device hw/misc/mps2-scc: Use the LED device
hw/arm/tosa: Replace fprintf() calls by LED devices

 include/hw/misc/led.h         |  97 ++++++++++++++++++++
 include/hw/misc/mps2-fpgaio.h |   2 +
 include/hw/misc/mps2-scc.h    |   2 +
 include/hw/qdev-core.h        |  16 ++++
 hw/arm/aspeed.c               |  20 +++++
 hw/arm/tosa.c                 |  40 ++++-----
 hw/misc/led.c                 | 161 ++++++++++++++++++++++++++++++++++
 hw/misc/mps2-fpgaio.c         |  23 +++--
 hw/misc/mps2-scc.c            |  27 +++---
 MAINTAINERS                   |   6 ++
 hw/arm/Kconfig                |   2 +
 hw/misc/Kconfig               |   5 ++
 hw/misc/meson.build           |   1 +
 hw/misc/trace-events          |   6 +-
 14 files changed, 365 insertions(+), 43 deletions(-)
 create mode 100644 include/hw/misc/led.h
 create mode 100644 hw/misc/led.c

--=20
2.26.2