Re: [PATCH v6 1/2] leds: leds-lp50xx: Handle reg to get correct multi_index

From: Johan Adolfsson
Date: Tue Jun 17 2025 - 03:24:03 EST


Hi Jacek.

>From: Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx>
>Sent: Monday, June 16, 2025 23:29
>To: Johan Adolfsson; Lee Jones; Pavel Machek; Rob Herring; Krzysztof Kozlowski; Conor Dooley; Andrew Davis
>Cc: linux-leds@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; Kernel
>Subject: Re: [PATCH v6 1/2] leds: leds-lp50xx: Handle reg to get correct multi_index
>
>Hi Johan,
>
>On 6/16/25 13:25, Johan Adolfsson wrote:
..
>> drivers/leds/leds-lp50xx.c | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
>> index 02cb1565a9fb..344791b6c575 100644
>> --- a/drivers/leds/leds-lp50xx.c
>> +++ b/drivers/leds/leds-lp50xx.c
>> @@ -476,6 +476,7 @@ static int lp50xx_probe_dt(struct lp50xx *priv)
>> return -ENOMEM;
>>
>> fwnode_for_each_child_node(child, led_node) {
>> + int multi_index = num_colors;

>Any specific reason for initializing this to num_colors?

Sorry - leftover from initial patch where I kept the original behavior if reg was not set.
Another patch version coming up soon (assuming failing on reg not set is the agreed upon solution).

>>
>--
>Best regards,
>Jacek Anaszewski

Best regards
/Johan