[PATCH 6/6] led: add TI LP5562 LED driver

Marek Vasut marex at denx.de
Thu Oct 19 15:58:29 CEST 2023


On 10/19/23 11:58, Rasmus Villemoes wrote:
> From: Doug Zobel <douglas.zobel at climate.com>
> 
> Driver for the TI LP5562 4 channel LED controller. Supports
> independent on/off control of all 4 channels. Supports LED_BLINK on 3
> independent channels: blue/green/red. The white channel can blink, but
> shares the blue channel blink rate.
> 
> Heavily based on patch originally from Doug Zobel [1].
> 
> I have modified it so it matches the DT bindings in the linux tree,
> and also follows the linux driver implementation more closely. This
> should address Tom's concerns, and also matches my goal of making the
> U-Boot driver work with our existing .dts which is known to work in
> linux.
> 
> As our boards only have the R,G,B outputs connected, I have not
> actually tested how the white channel behaves, but the R,G,B work
> exactly as expected.
> 
> [1] https://lore.kernel.org/u-boot/1547150757-1561-1-git-send-email-douglas.zobel@climate.com/
> 
> Cc: Doug Zobel <douglas.zobel at climate.com>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
>   doc/device-tree-bindings/leds/leds-lp5562.txt |  63 ++
>   drivers/led/Kconfig                           |   8 +
>   drivers/led/Makefile                          |   1 +
>   drivers/led/led_lp5562.c                      | 578 ++++++++++++++++++
>   4 files changed, 650 insertions(+)
>   create mode 100644 doc/device-tree-bindings/leds/leds-lp5562.txt
>   create mode 100644 drivers/led/led_lp5562.c
> 
> diff --git a/doc/device-tree-bindings/leds/leds-lp5562.txt b/doc/device-tree-bindings/leds/leds-lp5562.txt
> new file mode 100644
> index 0000000000..4e0c742959
> --- /dev/null
> +++ b/doc/device-tree-bindings/leds/leds-lp5562.txt

Why not use Linux Documentation/devicetree/bindings/leds/leds-lp55xx.yaml ?

[...]

> --- /dev/null
> +++ b/drivers/led/led_lp5562.c
> @@ -0,0 +1,578 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2018 Doug Zobel <douglas.zobel at climate.com>

Why not port Linux drivers/leds/leds-lp5562.c ?


More information about the U-Boot mailing list