mbox series

[0/6] some LED patches

Message ID 20231019095837.2084458-1-rasmus.villemoes@prevas.dk
Headers show
Series some LED patches | expand

Message

Rasmus Villemoes Oct. 19, 2023, 9:58 a.m. UTC
I wanted to add support for ti,lp5562, and found an old submission
from Doug. While trying to modify that to work in current U-Boot, I
found a problem with the "move label handling to core" patches.

Patch 1 is an attempt at (quick-)fixing that, though the real fix is
probably to not bind the same driver to the top node as to the child
nodes and using uc_plat->label to distinguish in .probe.

Patch 2 touches the same area, and is needed for the lp5562 driver to
work with existing DT bindings.

Patch 3 introduces a helper which should allow removing some
boilerplate in most individual drivers, and 4,5 apply that in the gpio
and pwm drivers. Converting remaining drivers is trivial, but left out
for now.

Finally patch 6 is the reworked lp5562 driver. While I've changed it
to match existing DT bindings (with the goal of making it work with
our .dts that is known to work with the linux driver), most of the
logic is unchanged from Doug's original patch, so he is still listed
as author.

Doug Zobel (1):
  led: add TI LP5562 LED driver

Rasmus Villemoes (5):
  led-uclass: do not create fallback label for top-level node
  led-uclass: honour ->label field populated by driver's own .bind
  led: introduce led_bind_generic()
  led: led_gpio: use led_bind_generic() helper
  led: led_pwm: use led_bind_generic() helper

 doc/device-tree-bindings/leds/leds-lp5562.txt |  63 ++
 drivers/led/Kconfig                           |   8 +
 drivers/led/Makefile                          |   1 +
 drivers/led/led-uclass.c                      |  22 +-
 drivers/led/led_gpio.c                        |  15 +-
 drivers/led/led_lp5562.c                      | 578 ++++++++++++++++++
 drivers/led/led_pwm.c                         |  14 +-
 include/led.h                                 |   8 +
 8 files changed, 681 insertions(+), 28 deletions(-)
 create mode 100644 doc/device-tree-bindings/leds/leds-lp5562.txt
 create mode 100644 drivers/led/led_lp5562.c