Re: [PATCH v5 2/9] documention: leds: Add multicolor class documentation
From: Dan Murphy
Date: Thu Sep 12 2019 - 22:09:27 EST
Hello Pavel
Thanks for looking at this again
On 9/12/19 3:55 PM, Pavel Machek wrote:
Hi!
+Directory Layout Example
+========================
+root:/sys/class/leds/rgb:grouped_leds# ls -lR colors/
+colors/:
+drwxr-xr-x 2 root root 0 Jun 28 20:21 blue
+drwxr-xr-x 2 root root 0 Jun 28 20:21 green
+drwxr-xr-x 2 root root 0 Jun 28 20:21 red
+-rw------- 1 root root 4096 Jun 28 20:21 color_mix
+
+colors/blue:
+-rw------- 1 root root 4096 Jun 28 20:21 intensity
+-r-------- 1 root root 4096 Jun 28 20:27 max_intensity
+-r-------- 1 root root 4096 Jun 28 20:21 color_id
I don't really like the directories... A bit too much complexity, and
it will have a memory footprint, too.
The directories should be fine to have I am not seeing the complexity.
Is memory footprint really an issue? Maybe in the IoT space but this is
small and memory footprint should be able to handle this for IoT and
larger systems.
Having dedicated directories and files clears up issues for user space
to know about the parameters for each LED especially with the color_mix
file which I still am not a fan of, but conceded and implemented
anyway. It also gives the user space flexibility to call the monochrome
LEDs specific intensity file. The user space can either use the color
intensity file or the color_mix file it is a choice for them to make.
This code was modeled off the LP50xx device which has individual LED
intensity controls as well as a overall brightness control. Since we
have no feedback from user space folks I feel we have to give some
options not very many but some.
I'd expect max_intensity to be same for all the leds in
rgb:grouped_leds... Could we simply rely on max_brightness file?
I went under the assumption that not all grouped LEDs would have the
same max_intensity.
I don't have specific use cases but wanted this as an option.
Dan
[If not, would one "max_intensity" file in rgb:grouped_leds be
enough?]
Best regards,
Pavel