[PATCH v4 00/11] led: introduce LED boot and activity function
Christian Marangi
ansuelsmth at gmail.com
Sat Sep 21 00:49:53 CEST 2024
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 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 | 11 +++
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 | 15 +++
drivers/led/led-uclass.c | 188 +++++++++++++++++++++++++++++++++++++
drivers/led/led_sw_blink.c | 10 +-
include/dm/ofnode.h | 41 ++++++++
include/led.h | 149 ++++++++++++++++++++++++++++-
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, 594 insertions(+), 13 deletions(-)
create mode 100644 doc/api/led.rst
--
2.45.2
More information about the U-Boot
mailing list