On 9/12/19 10: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. We will need separate intensity files for each color anyway so separate max_brightness can go along in the sub-dir - it will be cleaner this way and will leave some flexibility regarding max intensity supported by the LED. And I'm saying about the need for separate intensity files because I've changed my mind regarding color_mix file, basing on the recent experience with trigger file PAGE_SIZE limit rework. That said, I am no longer eager to accept any exception for one-value-per-file rule. This of course render color_mix file format unacceptable. In a new approach intensity files will only cache the values and actual write to registers will occur on write to the brightness file. > I'd expect max_intensity to be same for all the leds in > rgb:grouped_leds... Could we simply rely on max_brightness file? This may not be necessarily true if one will add gpio LED to the cluster of PWM LEDs. > [If not, would one "max_intensity" file in rgb:grouped_leds be > enough?] > > Best regards, > Pavel > > -- Best regards, Jacek Anaszewski