Skip to content

led: introduce LED boot and activity function

Christian Marangi u-boot 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest11 patches 18 repliesIn review
  2. v411 patches 13 repliesSuperseded
  3. v39 patches 16 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v29 patches2 repliesSuperseded
v19 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Use led_get_by_label and don't cache led dev
- Improve Kconfig for /options location
- Add Reviewed-by tags
- Enable blink also on MTD read
- Drop additional get_state in led_sw_on_state_change from v4 Changes v4:
- Drop led_set_state/period_by_label
- Switch to /options/u-boot
- Rework to cache label and dev in led uclass
- Add multiple patch for additional helper
- Rework patches to limit ifdef in some place Changes v3:
- Switch to /config property

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11led: toggle LED on initial SW blinkdrivers/led/led_sw_blink.c+15 -24 replies
2/11dm: core: implement ofnode_options helpersdrivers/core/ofnode.c include/dm/ofnode.h+74 -00 replies
3/11led: implement LED boot APIdrivers/led/Kconfig drivers/led/led-uclass.c include/led.h+149 -211 replies
4/11common: board_r: rework BOOT LED handlingcommon/board_r.c include/status_led.h+33 -80 replies
5/11led: implement LED activity APIdrivers/led/Kconfig drivers/led/led-uclass.c include/led.h+143 -21 reply
6/11tftp: implement support for LED activitynet/net.c net/tftp.c+9 -00 replies
7/11mtd: implement support for LED activitycmd/mtd.c+9 -01 reply
8/11ubi: implement support for LED activitycmd/ubi.c+11 -20 replies
9/11doc: introduce led.rst documentationdoc/api/index.rst doc/api/led.rst include/led.h+52 -00 replies
10/11test: dm: Add tests for LED boot and activityarch/sandbox/dts/test.dts test/dm/led.c+74 -00 replies
11/11test: dm: Expand ofnode options test with new helperarch/sandbox/dts/test.dts test/dm/ofnode.c+12 -00 replies

Reviews trailers per patch

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

PatchSimon GlassMichael Trimarchi
1/11R-b R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 00/11] led: introduce LED boot and activity function

This series is a reworked version of the previous seried:
misc: introduce STATUS LED activity function

This series port and expand the legacy concept of LED boot from the legacy Status LED API to new LED API.

One thing that many device need is a way to communicate to the user that the device is actually doing something.

This is especially useful for recovery steps where an user (for example) insert an USB drive, keep a button pressed and the device autorecover.

There is currently no way to signal the user externally that the bootloader is processing/recoverying aside from setting a LED on.

A solid LED on is not enough and won't actually signal any kind of progress.
Solution is the good old blinking LED but uboot doesn't suggest (and support) interrupts and almost all the LED are usually GPIO LED that doesn't support HW blink.

Additional Kconfg are also introduced to set the LED boot and activity. Those are referenced by label.

A documentation for old and these new LED API is created.

(world tested with the azure pipeline)

Changes v5:
- Use led_get_by_label and don't cache led dev
- Improve Kconfig for /options location
- Add Reviewed-by tags
- Enable blink also on MTD read
- Drop additional get_state in led_sw_on_state_change from v4 Changes v4:
- Drop led_set_state/period_by_label
- Switch to /options/u-boot
- Rework to cache label and dev in led uclass
- Add multiple patch for additional helper
- Rework patches to limit ifdef in some place Changes v3:
- Switch to /config property
Changes v2:
- Drop GPIO SW implementation
- Add fix for new LED SW BLINK

Christian Marangi (11):
led: toggle LED on initial SW blink
dm: core: implement ofnode_options helpers
led: implement LED boot API
common: board_r: rework BOOT LED handling
led: implement LED activity API
tftp: implement support for LED activity
mtd: implement support for LED activity
ubi: implement support for LED activity
doc: introduce led.rst documentation
test: dm: Add tests for LED boot and activity
test: dm: Expand ofnode options test with new helper

 arch/sandbox/dts/test.dts  |   5 ++
 cmd/mtd.c                  |   9 +++
 cmd/ubi.c                  |  13 ++-
 common/board_r.c           |  28 +++++--
 doc/api/index.rst          |   1 +
 doc/api/led.rst            |  10 +++
 drivers/core/ofnode.c      |  33 ++++++++
 drivers/led/Kconfig        |  24 ++++++
 drivers/led/led-uclass.c   | 162 +++++++++++++++++++++++++++++++++++++
 drivers/led/led_sw_blink.c |  17 +++-
 include/dm/ofnode.h        |  41 ++++++++++
 include/led.h              | 147 ++++++++++++++++++++++++++++++++-
 include/status_led.h       |  13 +++
 net/net.c                  |   4 +
 net/tftp.c                 |   5 ++
 test/dm/led.c              |  72 +++++++++++++++++
 test/dm/ofnode.c           |   9 +++
 17 files changed, 579 insertions(+), 14 deletions(-)
 create mode 100644 doc/api/led.rst
Signature · 1 line
2.45.2