linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to synchronize leds in trigger
@ 2020-01-27 21:51 Oleh Kravchenko
  2020-01-28 19:58 ` Jacek Anaszewski
  0 siblings, 1 reply; 8+ messages in thread
From: Oleh Kravchenko @ 2020-01-27 21:51 UTC (permalink / raw)
  To: linux-leds


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

Hello Linux LEDs developer!

I have two GPIO LEDs one is red another is blue.
I want that LEDs is blinking in pair.

Could you please advice how to achive this behaviour:
1. Red is active for 500 ms, Blue stays off.
2. Next step is Blue is active for 500 ms, Red is stays off.
3. Goto #1

I tried standard pattern trigger, but very quickly it miss matches.

-- 
Best regards,
Oleh Kravchenko


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

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

* Re: How to synchronize leds in trigger
  2020-01-27 21:51 How to synchronize leds in trigger Oleh Kravchenko
@ 2020-01-28 19:58 ` Jacek Anaszewski
  2020-01-30  7:57   ` Oleh Kravchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Jacek Anaszewski @ 2020-01-28 19:58 UTC (permalink / raw)
  To: Oleh Kravchenko, linux-leds

Hi Oleh,

On 1/27/20 10:51 PM, Oleh Kravchenko wrote:
> Hello Linux LEDs developer!
> 
> I have two GPIO LEDs one is red another is blue.
> I want that LEDs is blinking in pair.
> 
> Could you please advice how to achive this behaviour:
> 1. Red is active for 500 ms, Blue stays off.
> 2. Next step is Blue is active for 500 ms, Red is stays off.
> 3. Goto #1
> 
> I tried standard pattern trigger, but very quickly it miss matches.

Currently LED framework does not support that.
We would need a global pattern trigger, that would allow registering
a set of LEDs for events firing at different time slots.

It is feasible, but it would take months to agree upon interface
and implementation. The question is whether it wouldn't be an overkill.
What prevents you from solving this problem in userspace?

-- 
Best regards,
Jacek Anaszewski

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

* Re: How to synchronize leds in trigger
  2020-01-28 19:58 ` Jacek Anaszewski
@ 2020-01-30  7:57   ` Oleh Kravchenko
  2020-01-30  9:44     ` Marek Behun
  2020-01-30 10:37     ` Pavel Machek
  0 siblings, 2 replies; 8+ messages in thread
From: Oleh Kravchenko @ 2020-01-30  7:57 UTC (permalink / raw)
  To: Jacek Anaszewski, linux-leds


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

Hello Jacek,

On 28.01.20 21:58, Jacek Anaszewski wrote:
> Currently LED framework does not support that.
> We would need a global pattern trigger, that would allow registering
> a set of LEDs for events firing at different time slots.
>
> It is feasible, but it would take months to agree upon interface
> and implementation. The question is whether it wouldn't be an overkill.

I'm happy to invest my time to implement such functionality.
I think it can be really useful for LEDs array like CR0014114 <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.5&id=b9dd69155371ebd7055c182e30423edc9104239f>.

In few days I can publish my vision,
but before that could you please explain why it will took months?
Where it can be hard to implement?

> What prevents you from solving this problem in userspace?

User-space don't fast enough to provide correct timings.

-- 
Best regards,
Oleh Kravchenko



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

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

* Re: How to synchronize leds in trigger
  2020-01-30  7:57   ` Oleh Kravchenko
@ 2020-01-30  9:44     ` Marek Behun
  2020-01-31 16:39       ` Dan Murphy
  2020-02-26 14:15       ` Pavel Machek
  2020-01-30 10:37     ` Pavel Machek
  1 sibling, 2 replies; 8+ messages in thread
From: Marek Behun @ 2020-01-30  9:44 UTC (permalink / raw)
  To: Oleh Kravchenko; +Cc: Jacek Anaszewski, linux-leds

On Thu, 30 Jan 2020 09:57:08 +0200
Oleh Kravchenko <oleg@kaa.org.ua> wrote:

> I'm happy to invest my time to implement such functionality.
> I think it can be really useful for LEDs array like CR0014114 <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.5&id=b9dd69155371ebd7055c182e30423edc9104239f>.
> 
> In few days I can publish my vision,
> but before that could you please explain why it will took months?
> Where it can be hard to implement?
> 

Just look at how long the API for RGB LEDs is being agreed upon. It is
over a year already, if not longer, and still not merged.

> > What prevents you from solving this problem in userspace?  
> 
> User-space don't fast enough to provide correct timings.
> 

Can you provide a video or something where we can see?

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

* Re: How to synchronize leds in trigger
  2020-01-30  7:57   ` Oleh Kravchenko
  2020-01-30  9:44     ` Marek Behun
@ 2020-01-30 10:37     ` Pavel Machek
  1 sibling, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2020-01-30 10:37 UTC (permalink / raw)
  To: Oleh Kravchenko; +Cc: Jacek Anaszewski, linux-leds

Hi!

> > What prevents you from solving this problem in userspace?
> 
> User-space don't fast enough to provide correct timings.

That's hard to believe.

							Pavel



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

* Re: How to synchronize leds in trigger
  2020-01-30  9:44     ` Marek Behun
@ 2020-01-31 16:39       ` Dan Murphy
  2020-02-26 14:15       ` Pavel Machek
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Murphy @ 2020-01-31 16:39 UTC (permalink / raw)
  To: Marek Behun, Oleh Kravchenko; +Cc: Jacek Anaszewski, linux-leds

Marek

On 1/30/20 3:44 AM, Marek Behun wrote:
> On Thu, 30 Jan 2020 09:57:08 +0200
> Oleh Kravchenko <oleg@kaa.org.ua> wrote:
>
>> I'm happy to invest my time to implement such functionality.
>> I think it can be really useful for LEDs array like CR0014114 <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.5&id=b9dd69155371ebd7055c182e30423edc9104239f>.
>>
>> In few days I can publish my vision,
>> but before that could you please explain why it will took months?
>> Where it can be hard to implement?
>>
> Just look at how long the API for RGB LEDs is being agreed upon. It is
> over a year already, if not longer, and still not merged.

Agreed. The patchset for RGB LEDs has been waiting since November for 
merge or even applied to led-next.  I rebased the patches and added the 
ACKs and resent.  Kinda hoped it would have made 5.6.

Dan


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

* Re: How to synchronize leds in trigger
  2020-01-30  9:44     ` Marek Behun
  2020-01-31 16:39       ` Dan Murphy
@ 2020-02-26 14:15       ` Pavel Machek
  2020-02-26 16:50         ` Marek Behun
  1 sibling, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2020-02-26 14:15 UTC (permalink / raw)
  To: Marek Behun; +Cc: Oleh Kravchenko, Jacek Anaszewski, linux-leds

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

Hi!

> > I'm happy to invest my time to implement such functionality.
> > I think it can be really useful for LEDs array like CR0014114 <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.5&id=b9dd69155371ebd7055c182e30423edc9104239f>.
> > 
> > In few days I can publish my vision,
> > but before that could you please explain why it will took months?
> > Where it can be hard to implement?
> 
> Just look at how long the API for RGB LEDs is being agreed upon. It is
> over a year already, if not longer, and still not merged.

Sorry about that.

Anyway, you have a pretty good driver with RGB support disabled, IIRC,
and it only had one tiny thing left to fix.

If you want to re-submit that, maybe we can have that for 5.7.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: How to synchronize leds in trigger
  2020-02-26 14:15       ` Pavel Machek
@ 2020-02-26 16:50         ` Marek Behun
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Behun @ 2020-02-26 16:50 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Oleh Kravchenko, Jacek Anaszewski, linux-leds

On Wed, 26 Feb 2020 15:15:57 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> > Just look at how long the API for RGB LEDs is being agreed upon. It is
> > over a year already, if not longer, and still not merged.  
> 
> Sorry about that.

Hi Pavel,
this was not a complaint, I understand that the problem is compilated,.
Just stating it for Oleh who thought that synchoronizing LED triggers
would be fast work.

> Anyway, you have a pretty good driver with RGB support disabled, IIRC,
> and it only had one tiny thing left to fix.
>
> If you want to re-submit that, maybe we can have that for 5.7.

Yeah, sorry, I had ton of other work to do and then I forgot. I will try
to send patches this week.

Marek


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

end of thread, other threads:[~2020-02-26 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 21:51 How to synchronize leds in trigger Oleh Kravchenko
2020-01-28 19:58 ` Jacek Anaszewski
2020-01-30  7:57   ` Oleh Kravchenko
2020-01-30  9:44     ` Marek Behun
2020-01-31 16:39       ` Dan Murphy
2020-02-26 14:15       ` Pavel Machek
2020-02-26 16:50         ` Marek Behun
2020-01-30 10:37     ` Pavel Machek

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).