From: Marek Vasut <marex@denx.de>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>, u-boot@lists.denx.de
Cc: Philippe Reynes <philippe.reynes@softathome.com>,
Doug Zobel <douglas.zobel@climate.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 2/6] led-uclass: honour ->label field populated by driver's own .bind
Date: Thu, 19 Oct 2023 15:54:43 +0200 [thread overview]
Message-ID: <d4389465-e5bd-492b-8f86-7b4a93ff6016@denx.de> (raw)
In-Reply-To: <20231019095837.2084458-3-rasmus.villemoes@prevas.dk>
On 10/19/23 11:58, Rasmus Villemoes wrote:
> If the driver's own .bind method has populated uc_plat->label, don't
> override that. This is necessary for an upcoming driver for ti,lp5562,
> where the DT binding unfortunately says to use "chan-name" and not
> "label".
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
> drivers/led/led-uclass.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c
> index 5a5d07b9a7..0232fa84de 100644
> --- a/drivers/led/led-uclass.c
> +++ b/drivers/led/led-uclass.c
> @@ -71,7 +71,9 @@ static int led_post_bind(struct udevice *dev)
> struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev);
> const char *default_state;
>
> - uc_plat->label = dev_read_string(dev, "label");
> + if (!uc_plat->label)
> + uc_plat->label = dev_read_string(dev, "label");
> +
One thing I have to wonder about is, why does this controller have label
property in the top-level node , what is that used for ?
(see Linux Documentation/devicetree/bindings/leds/leds-lp55xx.yaml)
Reviewed-by: Marek Vasut <marex@denx.de>
next prev parent reply other threads:[~2023-10-19 15:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 9:58 [PATCH 0/6] some LED patches Rasmus Villemoes
2023-10-19 9:58 ` [PATCH 1/6] led-uclass: do not create fallback label for top-level node Rasmus Villemoes
2023-10-19 13:51 ` Marek Vasut
2023-10-23 8:28 ` Rasmus Villemoes
2023-10-23 9:01 ` Marek Vasut
2023-10-19 9:58 ` [PATCH 2/6] led-uclass: honour ->label field populated by driver's own .bind Rasmus Villemoes
2023-10-19 13:54 ` Marek Vasut [this message]
2023-10-23 8:51 ` Rasmus Villemoes
2023-10-23 9:03 ` Marek Vasut
2023-11-14 12:11 ` Christian Gmeiner
2023-11-15 5:37 ` Marek Vasut
2023-11-16 9:21 ` Pavel Machek
2023-10-23 10:43 ` Christian Gmeiner
2023-10-19 9:58 ` [PATCH 3/6] led: introduce led_bind_generic() Rasmus Villemoes
2023-10-19 13:56 ` Marek Vasut
2023-10-19 9:58 ` [PATCH 4/6] led: led_gpio: use led_bind_generic() helper Rasmus Villemoes
2023-10-19 13:56 ` Marek Vasut
2023-10-19 9:58 ` [PATCH 5/6] led: led_pwm: " Rasmus Villemoes
2023-10-19 13:57 ` Marek Vasut
2023-10-19 9:58 ` [PATCH 6/6] led: add TI LP5562 LED driver Rasmus Villemoes
2023-10-19 13:58 ` Marek Vasut
2023-10-23 9:11 ` Rasmus Villemoes
2023-10-23 9:39 ` Marek Vasut
2023-10-23 11:17 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d4389465-e5bd-492b-8f86-7b4a93ff6016@denx.de \
--to=marex@denx.de \
--cc=douglas.zobel@climate.com \
--cc=philippe.reynes@softathome.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox