[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62a74e0e-f5a1-40b5-a855-6e9bd620cbd5@gmail.com>
Date: Sat, 10 May 2025 17:32:21 +0200
From: Jacek Anaszewski <jacek.anaszewski@...il.com>
To: Johan Adolfsson <johan.adolfsson@...s.com>, Lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org, kernel@...s.com
Subject: Re: [PATCH RFC] leds: leds-lp50xx: Handle reg to get correct
multi_index
Hi Johan,
On 5/6/25 12:39, Johan Adolfsson wrote:
> mc_subled used for multi_index needs well defined array indexes,
> to guarantee the desired result, optionally use reg for that.
>
> If devicetree child nodes is processed in random or reverse order
> you may end up with multi_index "blue green red" instead of the expected
> "red green blue".
> If user space apps uses multi_index to deduce how to control the leds
> they would most likely be broken without this patch if devicetree
> processing is reversed (which it appears to be).
Are you trying to solve some real problem that occurred to you?
The order of DT nodes parsing is not a problem here - we save
color index in subled_info to be able to figure out which color
is on which position. This information can be retrieved in sysfs
by reading multi_index file.
--
Best regards,
Jacek Anaszewski
Powered by blists - more mailing lists