[PATCH v6 0/3] led: implement software blinking

Mikhail Kshevetskiy mikhail.kshevetskiy at iopsys.eu
Fri Jul 19 11:12:10 CEST 2024


v2 changes:
 * Drop sw_blink_state structure, move its necessary fields to
   led_uc_plat structure.
 * Add cyclic_info pointer to led_uc_plat structure. This
   simplify code a lot.
 * Remove cyclic function search logic. Not needed anymore.
 * Fix blinking period. It was twice large.
 * Other cleanups.

v3 changes:
 * Adapt code to recent cyclic function changes
 * Move software blinking functions to separate file
 * Other small changes

v4 changes:
 * Refactoring of led_set_period() function

v5 changes
 * Fix compilation if CONFIG_LED_BLINK is not defined

v6 changes:
 * Enable LEDST_BLINK state unconditionally.
 * Function led_set_period() becomes available when CONFIG_LED_BLINK
   is disabled. This makes led code simpler.
 * Software blinking requires about 100 bytes of data for a led. It's
   not a good idea to allocate so much memory for each supported led.
   Change the code to allocate blinking data only for required leds.

Michael Polyntsov (2):
  led: Implement software led blinking
  led: Add dts property to specify blinking of the led

Mikhail Kshevetskiy (1):
  led: enable LEDST_BLINK state unconditionally

 cmd/led.c                  |   8 ---
 drivers/led/Kconfig        |  16 ++++-
 drivers/led/Makefile       |   1 +
 drivers/led/led-uclass.c   |  51 ++++++++++++----
 drivers/led/led_sw_blink.c | 117 +++++++++++++++++++++++++++++++++++++
 include/led.h              |  24 +++++++-
 6 files changed, 196 insertions(+), 21 deletions(-)
 create mode 100644 drivers/led/led_sw_blink.c

-- 
2.39.2



More information about the U-Boot mailing list