[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAWPR02MB9281EDE0658B51FBE86D8A089B91A@PAWPR02MB9281.eurprd02.prod.outlook.com>
Date: Wed, 14 May 2025 14:41:36 +0000
From: Johan Adolfsson <Johan.Adolfsson@...s.com>
To: Jacek Anaszewski <jacek.anaszewski@...il.com>, Lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>
CC: "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Kernel
<Kernel@...s.com>, Johan Adolfsson <Johan.Adolfsson@...s.com>
Subject: Re: [PATCH RFC] leds: leds-lp50xx: Handle reg to get correct
multi_index
From: Jacek Anaszewski <jacek.anaszewski@...il.com>
Sent: Tuesday, May 13, 2025 21:50
To: Johan Adolfsson; Lee Jones; Pavel Machek
Cc: linux-leds@...r.kernel.org; linux-kernel@...r.kernel.org; Kernel
Subject: Re: [PATCH RFC] leds: leds-lp50xx: Handle reg to get correct multi_index
...
>> Maybe I'm missing something here - but how do i specify that a certain pin on the driver IC is connected to a certain color of the LED.
>> The devicetree looks like this:
>> It seems the first number in multi_intensity seem to go to pin regardless of what multi_index says.
>OK, indeed there is a problem. Let's continue in your patch thread.
>>
>> multi-led@0 {
>> reg = <0x0>;
>> color = <LED_COLOR_ID_RGB>;
>> label = "led:rgb";
>> function = "led";
>> linux,default-trigger = "default-on";
>> max-brightness = <255>;
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> /* Need BLUE GREEN RED here or reg to give red green blue in multi_index! */
>> led-0@0 {
>> color = <LED_COLOR_ID_RED>;
>> reg = <0>;
>> };
>>
>> led-1@1 {
>> color = <LED_COLOR_ID_GREEN>;
>> reg = <1>;
>> };
>>
>> led-2@2 {
>> color = <LED_COLOR_ID_BLUE>;
>> reg = <4>;
>
>This needs to match node-name[@unit-address], i.e. here 2.
Sorry, my bad.
I copied the version where I wanted to test my changes to address the comment from Lee Jones and do error out instead of warn if the reg is out of range .
>--
>Best regards,
>Jacek Anaszewski
Best regards
/Johan
Powered by blists - more mailing lists