Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-27 Thread Baolin Wang
Hi Pavel, On 27 July 2018 at 16:36, Pavel Machek wrote: > Hi! > >> > This should be a bit better. I attempted to compile it with your >> > driver, but whether it works is an open question. >> >> Sorry for late reply. I've compiled and tested this version on my >> platform, the hardware pattern ca

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-27 Thread Pavel Machek
Hi! > > This should be a bit better. I attempted to compile it with your > > driver, but whether it works is an open question. > > Sorry for late reply. I've compiled and tested this version on my > platform, the hardware pattern can work with one small fix as below. > > if (led_cdev->pattern_s

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-26 Thread Baolin Wang
Hi Pavel, On 24 July 2018 at 19:41, Pavel Machek wrote: > Hi! > >> >> > >Please keep in mind that this is ABI documentation for the pattern file >> >> > >to be exposed by LED core, and not by the pattern trigger, that, as we >> >> > >agreed, will be implemented later. In this case, I'd go for >>

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-24 Thread Pavel Machek
Hi! > Thanks for showing your thoughts. But I failed to compile your code, > would you like to send out formal patches (Or only including software > pattern, I will help to add hardware pattern part and do some testing > with our driver)? Thanks. Random thoughts: I am not sure "struct led_patter

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-24 Thread Pavel Machek
Hi! > >> > >Please keep in mind that this is ABI documentation for the pattern file > >> > >to be exposed by LED core, and not by the pattern trigger, that, as we > >> > >agreed, will be implemented later. In this case, I'd go for > >> > > >> > Gosh, I got completely distracted by the recent discu

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-23 Thread Bjorn Andersson
On Fri 20 Jul 12:11 PDT 2018, Jacek Anaszewski wrote: > Hi David, > > On 07/18/2018 07:00 PM, David Lechner wrote: > > > > > > On 7/18/18 7:08 AM, Pavel Machek wrote: > > > On Wed 2018-07-18 19:32:01, Baolin Wang wrote: > > > > On 18 July 2018 at 15:56, Pavel Machek wrote: > > > > > Hi! > > >

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-23 Thread Bjorn Andersson
On Mon 16 Jul 14:56 PDT 2018, Pavel Machek wrote: > Hi! > > > >>>echo pattern > trigger > > >>>echo "1 2 3 4 5 6 7 8" > somewhere > > >> > > >>s/somewhere/pattern/ > > >> > > >>pattern trigger should create "pattern" file similarly how ledtrig-timer > > >>creates delay_{on|off} files. > > >> > >

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-23 Thread Bjorn Andersson
On Sun 15 Jul 18:00 PDT 2018, David Lechner wrote: > On 07/15/2018 07:22 AM, Jacek Anaszewski wrote: > > On 07/15/2018 12:39 AM, Pavel Machek wrote: > > > On Sun 2018-07-15 00:29:25, Pavel Machek wrote: > > > > On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: > > > > > Hi Pavel, > > > > > > >

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-22 Thread Baolin Wang
Hi Pavel, On 20 July 2018 at 04:20, Pavel Machek wrote: > Hi! > >> > >Please keep in mind that this is ABI documentation for the pattern file >> > >to be exposed by LED core, and not by the pattern trigger, that, as we >> > >agreed, will be implemented later. In this case, I'd go for >> > >> > Go

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-20 Thread Jacek Anaszewski
Hi David, On 07/18/2018 07:00 PM, David Lechner wrote: On 7/18/18 7:08 AM, Pavel Machek wrote: On Wed 2018-07-18 19:32:01, Baolin Wang wrote: On 18 July 2018 at 15:56, Pavel Machek wrote: Hi! I believe I meant "changing patterns from kernel in response to events is probably overkill"...

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-20 Thread Jacek Anaszewski
Hi Pavel, On 07/19/2018 10:20 PM, Pavel Machek wrote: Hi! Please keep in mind that this is ABI documentation for the pattern file to be exposed by LED core, and not by the pattern trigger, that, as we agreed, will be implemented later. In this case, I'd go for Gosh, I got completely distract

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-19 Thread Pavel Machek
Hi! > > >Please keep in mind that this is ABI documentation for the pattern file > > >to be exposed by LED core, and not by the pattern trigger, that, as we > > >agreed, will be implemented later. In this case, I'd go for > > > > Gosh, I got completely distracted by the recent discussion about >

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Pavel Machek
Hi! > >Please keep in mind that this is ABI documentation for the pattern file > >to be exposed by LED core, and not by the pattern trigger, that, as we > >agreed, will be implemented later. In this case, I'd go for > > Gosh, I got completely distracted by the recent discussion about > pattern sy

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread David Lechner
On 07/18/2018 02:22 PM, Jacek Anaszewski wrote: On 07/18/2018 08:54 PM, Jacek Anaszewski wrote: On 07/18/2018 09:56 AM, Pavel Machek wrote: Hi! I believe I meant "changing patterns from kernel in response to events is probably overkill"... or something like that. Anyway -- to clean up the c

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Jacek Anaszewski
On 07/18/2018 08:54 PM, Jacek Anaszewski wrote: On 07/18/2018 09:56 AM, Pavel Machek wrote: Hi! I believe I meant "changing patterns from kernel in response to events is probably overkill"... or something like that. Anyway -- to clean up the confusion -- I'd like to see echo pattern > trig

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Jacek Anaszewski
On 07/18/2018 09:56 AM, Pavel Machek wrote: Hi! I believe I meant "changing patterns from kernel in response to events is probably overkill"... or something like that. Anyway -- to clean up the confusion -- I'd like to see echo pattern > trigger echo "1 2 3 4 5 6 7 8" > somewhere s/somewhe

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread David Lechner
On 7/18/18 7:08 AM, Pavel Machek wrote: On Wed 2018-07-18 19:32:01, Baolin Wang wrote: On 18 July 2018 at 15:56, Pavel Machek wrote: Hi! I believe I meant "changing patterns from kernel in response to events is probably overkill"... or something like that. Anyway -- to clean up the conf

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Pavel Machek
On Wed 2018-07-18 19:32:01, Baolin Wang wrote: > On 18 July 2018 at 15:56, Pavel Machek wrote: > > Hi! > > > >> I believe I meant "changing patterns from kernel in response to events > >> is probably overkill"... or something like that. > >> >>> > >> >>>Anyway -- to clean up the confusion

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Baolin Wang
On 18 July 2018 at 15:56, Pavel Machek wrote: > Hi! > >> I believe I meant "changing patterns from kernel in response to events >> is probably overkill"... or something like that. >> >>> >> >>>Anyway -- to clean up the confusion -- I'd like to see >> >>> >> >>>echo pattern > trigger >> >>>

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Pavel Machek
Hi! > I believe I meant "changing patterns from kernel in response to events > is probably overkill"... or something like that. > >>> > >>>Anyway -- to clean up the confusion -- I'd like to see > >>> > >>>echo pattern > trigger > >>>echo "1 2 3 4 5 6 7 8" > somewhere > >> > >>s/somewhere/p

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-17 Thread Pavel Machek
Hi! > >>- different hardware means via which brightness is set (MMIO, I2C, SPI, > >> PWM and other pulsed fashion based protocols), > >>- the need for deferring brightness setting to a workqueue task to > >> allow for setting LED brightness from atomic context, > >>- contention on locks > > >

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-17 Thread Jacek Anaszewski
On 07/16/2018 11:56 PM, Pavel Machek wrote: Hi! echo pattern > trigger echo "1 2 3 4 5 6 7 8" > somewhere s/somewhere/pattern/ pattern trigger should create "pattern" file similarly how ledtrig-timer creates delay_{on|off} files. I don't think this is the best way. For example, if you wan

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-16 Thread Pavel Machek
Hi! > >>>echo pattern > trigger > >>>echo "1 2 3 4 5 6 7 8" > somewhere > >> > >>s/somewhere/pattern/ > >> > >>pattern trigger should create "pattern" file similarly how ledtrig-timer > >>creates delay_{on|off} files. > >> > > > >I don't think this is the best way. For example, if you want more th

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-16 Thread Jacek Anaszewski
Hi David, On 07/16/2018 03:00 AM, David Lechner wrote: On 07/15/2018 07:22 AM, Jacek Anaszewski wrote: On 07/15/2018 12:39 AM, Pavel Machek wrote: On Sun 2018-07-15 00:29:25, Pavel Machek wrote: On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: Hi Pavel, On 07/14/2018 11:20 PM, Pavel Mach

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-16 Thread Baolin Wang
On 15 July 2018 at 20:22, Jacek Anaszewski wrote: > On 07/15/2018 12:39 AM, Pavel Machek wrote: >> >> On Sun 2018-07-15 00:29:25, Pavel Machek wrote: >>> >>> On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: Hi Pavel, On 07/14/2018 11:20 PM, Pavel Machek wrote: > > Hi

Re: Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-15 Thread David Lechner
On 07/15/2018 07:22 AM, Jacek Anaszewski wrote: On 07/15/2018 12:39 AM, Pavel Machek wrote: On Sun 2018-07-15 00:29:25, Pavel Machek wrote: On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: Hi Pavel, On 07/14/2018 11:20 PM, Pavel Machek wrote: Hi! It also drew my attention to the issue o

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-15 Thread Jacek Anaszewski
On 07/15/2018 12:39 AM, Pavel Machek wrote: On Sun 2018-07-15 00:29:25, Pavel Machek wrote: On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: Hi Pavel, On 07/14/2018 11:20 PM, Pavel Machek wrote: Hi! It also drew my attention to the issue of desired pattern sysfs interface semantics on un

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-14 Thread Pavel Machek
On Sun 2018-07-15 00:29:25, Pavel Machek wrote: > On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: > > Hi Pavel, > > > > On 07/14/2018 11:20 PM, Pavel Machek wrote: > > >Hi! > > > > > >>>It also drew my attention to the issue of desired pattern sysfs > > >>>interface semantics on uninitialized

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-14 Thread Pavel Machek
On Sun 2018-07-15 00:02:57, Jacek Anaszewski wrote: > Hi Pavel, > > On 07/14/2018 11:20 PM, Pavel Machek wrote: > >Hi! > > > >>>It also drew my attention to the issue of desired pattern sysfs > >>>interface semantics on uninitialized pattern. In your implementation > >>>user seems to be unable to

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-14 Thread Jacek Anaszewski
Hi Pavel, On 07/14/2018 11:20 PM, Pavel Machek wrote: Hi! It also drew my attention to the issue of desired pattern sysfs interface semantics on uninitialized pattern. In your implementation user seems to be unable to determine if the pattern is activated or not. We should define the semantics

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-14 Thread Pavel Machek
Hi! > > It also drew my attention to the issue of desired pattern sysfs > > interface semantics on uninitialized pattern. In your implementation > > user seems to be unable to determine if the pattern is activated > > or not. We should define the semantics for this use case and > > describe it in

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-12 Thread Baolin Wang
Hi Jacek, On 13 July 2018 at 05:41, Jacek Anaszewski wrote: > Hi Baolin, > > > On 07/12/2018 02:24 PM, Baolin Wang wrote: >> >> Hi Jacek, >> >> On 12 July 2018 at 05:10, Jacek Anaszewski >> wrote: >>> >>> Hi Baolin. >>> >>> >>> On 07/11/2018 01:02 PM, Baolin Wang wrote: Hi Jacek a

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-12 Thread Jacek Anaszewski
Hi Baolin, On 07/12/2018 02:24 PM, Baolin Wang wrote: Hi Jacek, On 12 July 2018 at 05:10, Jacek Anaszewski wrote: Hi Baolin. On 07/11/2018 01:02 PM, Baolin Wang wrote: Hi Jacek and Pavel, On 29 June 2018 at 13:03, Baolin Wang wrote: From: Bjorn Andersson Some LED controllers have su

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-12 Thread Baolin Wang
Hi Jacek, On 12 July 2018 at 05:10, Jacek Anaszewski wrote: > Hi Baolin. > > > On 07/11/2018 01:02 PM, Baolin Wang wrote: >> >> Hi Jacek and Pavel, >> >> On 29 June 2018 at 13:03, Baolin Wang wrote: >>> >>> From: Bjorn Andersson >>> >>> Some LED controllers have support for autonomously control

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-11 Thread Jacek Anaszewski
Hi Baolin. On 07/11/2018 01:02 PM, Baolin Wang wrote: Hi Jacek and Pavel, On 29 June 2018 at 13:03, Baolin Wang wrote: From: Bjorn Andersson Some LED controllers have support for autonomously controlling brightness over time, according to some preprogrammed pattern or function. This adds a

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-11 Thread Baolin Wang
Hi Jacek and Pavel, On 29 June 2018 at 13:03, Baolin Wang wrote: > From: Bjorn Andersson > > Some LED controllers have support for autonomously controlling > brightness over time, according to some preprogrammed pattern or > function. > > This adds a new optional operator that LED class drivers

[PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-06-28 Thread Baolin Wang
From: Bjorn Andersson Some LED controllers have support for autonomously controlling brightness over time, according to some preprogrammed pattern or function. This adds a new optional operator that LED class drivers can implement if they support such functionality as well as a new device attrib