[PATCH 0/9] led: introduce LED boot and activity function

Christian Marangi ansuelsmth at gmail.com
Mon Jun 24 23:46:10 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.

To fix this and handle the problem of device not supporting
HW blink, expand the GPIO LED framework with support for SW
blink with the new Kconfig.

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)

Christian Marangi (9):
  led: led_gpio: add support for SW Blink
  led: implement led_set_state/paeriod_by_label
  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

 cmd/mtd.c                |  19 ++++++
 cmd/ubi.c                |  15 ++++-
 common/board_r.c         |  25 ++++++-
 doc/api/index.rst        |   1 +
 doc/api/led.rst          |  10 +++
 drivers/led/Kconfig      |  54 ++++++++++++++++
 drivers/led/led-uclass.c |  28 ++++++++
 drivers/led/led_gpio.c   |  56 ++++++++++++++++
 include/led.h            | 136 +++++++++++++++++++++++++++++++++++++++
 net/tftp.c               |   7 ++
 10 files changed, 347 insertions(+), 4 deletions(-)
 create mode 100644 doc/api/led.rst

-- 
2.45.1



More information about the U-Boot mailing list