mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: <jacek.anaszewski@gmail.com>, <robh+dt@kernel.org>,
	<devicetree@vger.kernel.org>, <linux-leds@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/9] leds: multicolor: Add sysfs interface definition
Date: Thu, 30 May 2019 15:43:09 -0500	[thread overview]
Message-ID: <2a81ad36-4c6a-9815-7c8e-018985c5db5c@ti.com> (raw)
In-Reply-To: <20190530194006.GA22367@amd>

Pavel

On 5/30/19 2:40 PM, Pavel Machek wrote:
> On Tue 2019-05-28 06:34:47, Dan Murphy wrote:
>> Pavel
>>
>> On 5/27/19 7:45 PM, Dan Murphy wrote:
>>> Pavel
>>>
>>> On 5/27/19 5:33 AM, Pavel Machek wrote:
>>>> On Thu 2019-05-23 14:08:12, Dan Murphy wrote:
>>>>> Add a documentation of LED Multicolor LED class specific
>>>>> sysfs attributes.
>>>>>
>>>>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>>>>> ---
>>>>>    .../ABI/testing/sysfs-class-led-multicolor    | 57
>>>>> +++++++++++++++++++
>>>>>    1 file changed, 57 insertions(+)
>>>>>    create mode 100644
>>>>> Documentation/ABI/testing/sysfs-class-led-multicolor
>>>>>
>>>>> diff --git a/Documentation/ABI/testing/sysfs-class-led-multicolor
>>>>> b/Documentation/ABI/testing/sysfs-class-led-multicolor
>>>>> new file mode 100644
>>>>> index 000000000000..2f102ede258b
>>>>> --- /dev/null
>>>>> +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor
>>>>> @@ -0,0 +1,57 @@
>>>>> +What:        /sys/class/leds/<led>/colors/sync_enable
>>>>> +Date:        April 2019
>>>> I believe I suggested more reasonable interface. Why not use that?
>>>>
>>> Can you please provide the reference to your interface?
>>>
>> I think I found the suggestion [0].  Assuming that was the suggestion it
>> violates the kernel 1 value/file and there was agreement that this interface
>> had value. In testing the interface, it made sense to be able to
> 1 value/file is actually slightly more complex rule:
>
> Attributes should be ASCII text files, preferably with only one value
> per file. It is noted that it may not be efficient to contain only one
> value per file, so it is socially acceptable to express an array of
> values of the same type.
>
> See sysfs.txt. Proposed "sync_enable" is ugly enough, and the values
> really are array of values of same type, so we should be ok with nicer
> interface.

sync_enable is a binary input 0 or 1, but I could change that to ASCII 
"enabled/disabled".  And the sole purpose of this file is to enable or 
disable the synchronization of the grouped monochrome color LED 
brightness settings within that given directory.  So not sure why the 
sync_enable is ugly since it is meant to enable a feature of the class.  
Honestly I could drop the whole sync feature but I have found value in 
this interface through my testing both with a pulsing script I wrote and 
the notint.py you wrote.  This feature is meant for slower processors or 
processes with low priority that could be interrupted or switched out 
during writing the LED and cause LED color flicker.  Priming the colors 
and then updating all the available LEDs in the group in the kernel 
space with a single write to the sync file is a little more intuitive.  
I could change both the sync and sync_enable to module_params instead.

After mulling over the proposed solution of passing in the array of 
values I came to the conclusion this is actually more complicated than 
it needs to be and this implementation is not flexible.

There would need to be additional files that need to present information 
to the user space on what LEDs available, how many LEDs are available 
and what the LED array order is.  The user interface cannot always 
assume that the array is RGB.

There could be RGBW, RGBA, RGBWA, GBW or WIR or any combination of 
varying LED colors.  The interface that is proposed would need to have a 
varying array as the input.

I have posted v4 of the documentation of this patchset with updated 
sysfs documentation and ABI description.

Dan

>
> Best regards,
> 									Pavel

  reply	other threads:[~2019-05-30 20:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 19:08 [PATCH v3 0/9] Multicolor Framework update Dan Murphy
2019-05-23 19:08 ` [PATCH v3 1/9] leds: multicolor: Add sysfs interface definition Dan Murphy
2019-05-27 10:33   ` Pavel Machek
2019-05-28  0:45     ` Dan Murphy
2019-05-28 11:34       ` Dan Murphy
2019-05-30 19:40         ` Pavel Machek
2019-05-30 20:43           ` Dan Murphy [this message]
2019-05-27 20:00   ` Jacek Anaszewski
2019-05-28 17:32     ` Dan Murphy
2019-05-28 17:44       ` Jacek Anaszewski
2019-05-28 18:19         ` Dan Murphy
2019-05-28 18:29           ` Jacek Anaszewski
2019-05-30 14:30             ` Dan Murphy
2019-05-23 19:08 ` [PATCH v3 2/9] dt: bindings: Add multicolor class dt bindings documention Dan Murphy
2019-06-14 17:00   ` Rob Herring
2019-06-14 17:18     ` Dan Murphy
2019-06-18 15:36       ` Rob Herring
2019-06-18 18:19         ` Jacek Anaszewski
2019-06-18 18:57           ` Rob Herring
2019-05-23 19:08 ` [PATCH v3 3/9] documention: leds: Add multicolor class documentation Dan Murphy
2019-05-23 19:08 ` [PATCH v3 4/9] dt-bindings: leds: Add multicolor ID to the color ID list Dan Murphy
2019-06-14 17:00   ` Rob Herring
2019-05-23 19:08 ` [PATCH v3 5/9] " Dan Murphy
2019-05-23 19:08 ` [PATCH v3 6/9] leds: multicolor: Introduce a multicolor class definition Dan Murphy
2019-06-20 16:10   ` Jacek Anaszewski
2019-06-20 20:06     ` Dan Murphy
2019-06-20 21:42       ` Jacek Anaszewski
2019-05-23 19:08 ` [PATCH v3 7/9] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2019-05-24 20:50   ` Rob Herring
2019-05-28  0:47     ` Dan Murphy
2019-06-11 21:51   ` Rob Herring
2019-05-23 19:08 ` [PATCH v3 8/9] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2019-05-23 19:08 ` [PATCH v3 9/9] leds: Update the lp55xx to use the multi color framework Dan Murphy
2019-06-14  7:02 ` [PATCH v3 0/9] Multicolor Framework update Alexander Dahl
2019-06-14 14:23   ` Dan Murphy
2019-06-16 15:49   ` Pavel Machek
2019-06-17 13:47     ` Dan Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a81ad36-4c6a-9815-7c8e-018985c5db5c@ti.com \
    --to=dmurphy@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®