linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/2] dt-bindings: Add docs for EL15203000
       [not found]                     ` <9e812391-56e9-2dd5-1f08-435df717b12b@gmail.com>
@ 2019-07-08 22:00                       ` Oleh Kravchenko
  2019-07-16 18:41                         ` Jacek Anaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Oleh Kravchenko @ 2019-07-08 22:00 UTC (permalink / raw)
  To: Jacek Anaszewski, Pavel Machek; +Cc: Dan Murphy, linux-leds


[-- Attachment #1.1: Type: text/plain, Size: 2253 bytes --]

Hello Jacek,

11.06.19 22:52, Jacek Anaszewski пише:
> On 6/11/19 2:01 PM, Pavel Machek wrote:
>> Hi!
>>
>>>> I just want to clerify - for now LEDs board has 2 from 3 LEDs with effect function.
>>>>
>>>> 1. Screen frame led is just blinking, so blink_set() is fit well to this.
>>>> 2. Pipe led actually consist from 3 leds and when effect is enabled next pattern is used:
>>>>
>>>>        ^
>>>>        |
>>>> LED1  >   OFF  ON   ON   ON
>>>>        |
>>>> LED2  >   OFF  OFF  ON   ON
>>>>        |
>>>> LED3  >   OFF  OFF  OFF  ON
>>>>        |
>>>>        +----^----^----^----^----> time
>>>
>>> Pattern trigger applies to a single LED so it won't fit for this
>>> pattern.
>>>
>>> Currently we don't support patterns spanning on multiple LEDs,
>>> so you would have to come up with your own solution.
>>>
>>> What I can recommend is a trigger that would be created by your driver
>>> and would activate this sequence.
>>
>> Yes, please.
>>
>> While adding custom files to sysfs may appear easier, we'll need
>> "led-specific-triggers" for other reasons.
> 
> For what reasons exactly?
> 
> This is similar to the generic hw trigger support proposed by
> Marek Behun. In the reply to that patch I asked some questions [0].
> So far the mechanism looks too me awkward and not introducing any
> novelty besides requiring one more step - setting the trigger.
> 
>> And for the record... Handling 3 LEDs as one is not something usual in
>> the LED subsystem; I guess it makes sense in your specific case, but
>> hopefully noone will copy that design.
>>
>> (I guess they are not individually controllable?)
>>
>>                                     Pavel
>>
> 
> [0] https://www.spinics.net/lists/linux-leds/msg12269.html
> 

I just figure out that this Pipe LED actually consist from 5 LEDs, not 3 :)
And supports next level 'brightness' from SPI driver:
- '0' Off
- '1' On
- '2' Cascade (waterfall down)
 -'3' InverseCascade (waterfall up)
- '4' Bounce
- '5' InverseBounce

Please advice, can I proceed with sys attribute file to set '2'..'5' levels?

-- 
Best regards,
Oleh Kravchenko


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: Add docs for EL15203000
  2019-07-08 22:00                       ` [PATCH v2 1/2] dt-bindings: Add docs for EL15203000 Oleh Kravchenko
@ 2019-07-16 18:41                         ` Jacek Anaszewski
  2019-07-16 20:35                           ` Oleh Kravchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Jacek Anaszewski @ 2019-07-16 18:41 UTC (permalink / raw)
  To: Oleh Kravchenko, Pavel Machek; +Cc: Dan Murphy, linux-leds

Hi Oleh,

On 7/9/19 12:00 AM, Oleh Kravchenko wrote:
> Hello Jacek,
> 
> 11.06.19 22:52, Jacek Anaszewski пише:
>> On 6/11/19 2:01 PM, Pavel Machek wrote:
>>> Hi!
>>>
>>>>> I just want to clerify - for now LEDs board has 2 from 3 LEDs with effect function.
>>>>>
>>>>> 1. Screen frame led is just blinking, so blink_set() is fit well to this.
>>>>> 2. Pipe led actually consist from 3 leds and when effect is enabled next pattern is used:
>>>>>
>>>>>        ^
>>>>>        |
>>>>> LED1  >   OFF  ON   ON   ON
>>>>>        |
>>>>> LED2  >   OFF  OFF  ON   ON
>>>>>        |
>>>>> LED3  >   OFF  OFF  OFF  ON
>>>>>        |
>>>>>        +----^----^----^----^----> time
>>>>
>>>> Pattern trigger applies to a single LED so it won't fit for this
>>>> pattern.
>>>>
>>>> Currently we don't support patterns spanning on multiple LEDs,
>>>> so you would have to come up with your own solution.
>>>>
>>>> What I can recommend is a trigger that would be created by your driver
>>>> and would activate this sequence.
>>>
>>> Yes, please.
>>>
>>> While adding custom files to sysfs may appear easier, we'll need
>>> "led-specific-triggers" for other reasons.
>>
>> For what reasons exactly?
>>
>> This is similar to the generic hw trigger support proposed by
>> Marek Behun. In the reply to that patch I asked some questions [0].
>> So far the mechanism looks too me awkward and not introducing any
>> novelty besides requiring one more step - setting the trigger.
>>
>>> And for the record... Handling 3 LEDs as one is not something usual in
>>> the LED subsystem; I guess it makes sense in your specific case, but
>>> hopefully noone will copy that design.
>>>
>>> (I guess they are not individually controllable?)
>>>
>>>                                     Pavel
>>>
>>
>> [0] https://www.spinics.net/lists/linux-leds/msg12269.html
>>
> 
> I just figure out that this Pipe LED actually consist from 5 LEDs, not 3 :)
> And supports next level 'brightness' from SPI driver:
> - '0' Off
> - '1' On
> - '2' Cascade (waterfall down)
>  -'3' InverseCascade (waterfall up)
> - '4' Bounce
> - '5' InverseBounce
> 
> Please advice, can I proceed with sys attribute file to set '2'..'5' levels?

It looks like pattern trigger is the most appropriate solution for the
effects 2-5. Your driver will need to implement pattern_set op for the
LEDs supporting the effects, and then the effect will be enabled after
writing required sequence to the hw_pattern file. You will need to come
up with a sequence of values that the driver will recognize as a request
of enabling given hardware effect. Please compare
drivers/leds/leds-sc27xx-bltc.c and its ABI documentation [0] for
reference. See also hw_pattern file description in [1].

[0] Documentation/ABI/testing/sysfs-class-led-driver-sc27xx
[1] Documentation/ABI/testing/sysfs-class-led-trigger-pattern

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: Add docs for EL15203000
  2019-07-16 18:41                         ` Jacek Anaszewski
@ 2019-07-16 20:35                           ` Oleh Kravchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Oleh Kravchenko @ 2019-07-16 20:35 UTC (permalink / raw)
  To: Jacek Anaszewski, Pavel Machek; +Cc: Dan Murphy, linux-leds

Thank you for advice!

16.07.19 21:41, Jacek Anaszewski пише:
> Hi Oleh,
>
> On 7/9/19 12:00 AM, Oleh Kravchenko wrote:
>>
>> I just figure out that this Pipe LED actually consist from 5 LEDs, not 3 :)
>> And supports next level 'brightness' from SPI driver:
>> - '0' Off
>> - '1' On
>> - '2' Cascade (waterfall down)
>>  -'3' InverseCascade (waterfall up)
>> - '4' Bounce
>> - '5' InverseBounce
>>
>> Please advice, can I proceed with sys attribute file to set '2'..'5' levels?
> It looks like pattern trigger is the most appropriate solution for the
> effects 2-5. Your driver will need to implement pattern_set op for the
> LEDs supporting the effects, and then the effect will be enabled after
> writing required sequence to the hw_pattern file. You will need to come
> up with a sequence of values that the driver will recognize as a request
> of enabling given hardware effect. Please compare
> drivers/leds/leds-sc27xx-bltc.c and its ABI documentation [0] for
> reference. See also hw_pattern file description in [1].
>
> [0] Documentation/ABI/testing/sysfs-class-led-driver-sc27xx
> [1] Documentation/ABI/testing/sysfs-class-led-trigger-pattern
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-16 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <27c0b356-8111-6b36-23cc-8e654147178f@kaa.org.ua>
     [not found] ` <b6a5cc5e-74f1-d328-7a47-995670ba7aa7@ti.com>
     [not found]   ` <adf5a755-c534-64c3-6e99-ba39ffea95e2@kaa.org.ua>
     [not found]     ` <2eba86cb-01be-c002-32d0-80ab2ab14f97@gmail.com>
     [not found]       ` <7e787498-537b-390d-589a-577f34ffbc3f@kaa.org.ua>
     [not found]         ` <94968b55-a9cc-277e-ac25-bf765f9db138@kaa.org.ua>
     [not found]           ` <e1fc84a1-75e4-6c56-d2ea-f6ade28087ac@kaa.org.ua>
     [not found]             ` <e4e0223d-c463-e767-12b2-7e360eac000b@gmail.com>
     [not found]               ` <38050529-5730-6e88-fe1a-909492711dd0@kaa.org.ua>
     [not found]                 ` <8f658d57-5079-ad76-ce3e-af3d031b4685@gmail.com>
     [not found]                   ` <20190611120156.GA1161@amd>
     [not found]                     ` <9e812391-56e9-2dd5-1f08-435df717b12b@gmail.com>
2019-07-08 22:00                       ` [PATCH v2 1/2] dt-bindings: Add docs for EL15203000 Oleh Kravchenko
2019-07-16 18:41                         ` Jacek Anaszewski
2019-07-16 20:35                           ` Oleh Kravchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).