Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-11 Thread Bjorn Andersson
On Tue 11 Apr 10:54 PDT 2017, Pavel Machek wrote: > Hi! > > > > > How do we do with patterns that are implementable by the LP5xx but are > > > > not with the LPG? Should we reject those or should we do some sort of > > > > best-effort approach in the kernel? > > > > > > Lets say you get series

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-11 Thread Bjorn Andersson
On Tue 11 Apr 10:54 PDT 2017, Pavel Machek wrote: > Hi! > > > > > How do we do with patterns that are implementable by the LP5xx but are > > > > not with the LPG? Should we reject those or should we do some sort of > > > > best-effort approach in the kernel? > > > > > > Lets say you get series

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-11 Thread Pavel Machek
Hi! > > > How do we do with patterns that are implementable by the LP5xx but are > > > not with the LPG? Should we reject those or should we do some sort of > > > best-effort approach in the kernel? > > > > Lets say you get series of > > > > (red, green, blue, delta_t ) > > > > points, meaning

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-11 Thread Pavel Machek
Hi! > > > How do we do with patterns that are implementable by the LP5xx but are > > > not with the LPG? Should we reject those or should we do some sort of > > > best-effort approach in the kernel? > > > > Lets say you get series of > > > > (red, green, blue, delta_t ) > > > > points, meaning

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-10 Thread Bjorn Andersson
On Sat 08 Apr 06:39 PDT 2017, Pavel Machek wrote: > Hi! > > > [..] > > > > For the patterns I don't know how a trigger for this would look like, > > > > how would setting the pattern of a trigger be propagated down to the > > > > hardware? > > > > > > We'd need a new op and API similar to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-10 Thread Bjorn Andersson
On Sat 08 Apr 06:39 PDT 2017, Pavel Machek wrote: > Hi! > > > [..] > > > > For the patterns I don't know how a trigger for this would look like, > > > > how would setting the pattern of a trigger be propagated down to the > > > > hardware? > > > > > > We'd need a new op and API similar to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-10 Thread Pavel Machek
Hi! > > Actually we could achieve the goal by listing all available pattern > > configurations for given LED class device, so in case of Qualcomm LPG > > driver we could have transition-pattern-1 to transition-pattern-15 > > listed after executing "cat trigger". > > > > There's a common

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-10 Thread Pavel Machek
Hi! > > Actually we could achieve the goal by listing all available pattern > > configurations for given LED class device, so in case of Qualcomm LPG > > driver we could have transition-pattern-1 to transition-pattern-15 > > listed after executing "cat trigger". > > > > There's a common

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-09 Thread Jacek Anaszewski
Hi, On 04/08/2017 03:39 PM, Pavel Machek wrote: > Hi! > >> [..] For the patterns I don't know how a trigger for this would look like, how would setting the pattern of a trigger be propagated down to the hardware? >>> >>> We'd need a new op and API similar to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-09 Thread Jacek Anaszewski
Hi, On 04/08/2017 03:39 PM, Pavel Machek wrote: > Hi! > >> [..] For the patterns I don't know how a trigger for this would look like, how would setting the pattern of a trigger be propagated down to the hardware? >>> >>> We'd need a new op and API similar to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-08 Thread Pavel Machek
Hi! > [..] > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > > > > We'd need a new op and API similar to blink_set()/led_blink_set(). > > > > I've tried to find different LED

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-08 Thread Pavel Machek
Hi! > [..] > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > > > > We'd need a new op and API similar to blink_set()/led_blink_set(). > > > > I've tried to find different LED

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-08 Thread Pavel Machek
Hi! > > On 04/03/2017 09:00 PM, Bjorn Andersson wrote: > [..] > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > > > > We'd need a new op and API similar to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-08 Thread Pavel Machek
Hi! > > On 04/03/2017 09:00 PM, Bjorn Andersson wrote: > [..] > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > > > > We'd need a new op and API similar to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-08 Thread Pavel Machek
On Fri 2017-04-07 13:36:49, Bjorn Andersson wrote: > On Fri 07 Apr 06:32 PDT 2017, Pavel Machek wrote: > > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > > > > Well... I'm not

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-08 Thread Pavel Machek
On Fri 2017-04-07 13:36:49, Bjorn Andersson wrote: > On Fri 07 Apr 06:32 PDT 2017, Pavel Machek wrote: > > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > > > > Well... I'm not

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Bjorn Andersson
On Fri 07 Apr 06:32 PDT 2017, Pavel Machek wrote: > > For the patterns I don't know how a trigger for this would look like, > > how would setting the pattern of a trigger be propagated down to the > > hardware? > > Well... I'm not sure if we _want_ to do triggers for > patterns. LED triggers

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Bjorn Andersson
On Fri 07 Apr 06:32 PDT 2017, Pavel Machek wrote: > > For the patterns I don't know how a trigger for this would look like, > > how would setting the pattern of a trigger be propagated down to the > > hardware? > > Well... I'm not sure if we _want_ to do triggers for > patterns. LED triggers

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Bjorn Andersson
On Mon 03 Apr 13:38 PDT 2017, Jacek Anaszewski wrote: > On 04/03/2017 09:00 PM, Bjorn Andersson wrote: [..] > > For the patterns I don't know how a trigger for this would look like, > > how would setting the pattern of a trigger be propagated down to the > > hardware? > > We'd need a new op and

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Bjorn Andersson
On Mon 03 Apr 13:38 PDT 2017, Jacek Anaszewski wrote: > On 04/03/2017 09:00 PM, Bjorn Andersson wrote: [..] > > For the patterns I don't know how a trigger for this would look like, > > how would setting the pattern of a trigger be propagated down to the > > hardware? > > We'd need a new op and

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Pavel Machek
Hi! > > In both RGB and pattern approaches we should assess > > if it is acceptable to provide a pattern for trigger name, > > e.g. blink-pattern-{num_intervals}. > > > > If so, then "echo transition-pattern-15" would create a directory > > e.g. transition_intervals with files interval_0 to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Pavel Machek
Hi! > > In both RGB and pattern approaches we should assess > > if it is acceptable to provide a pattern for trigger name, > > e.g. blink-pattern-{num_intervals}. > > > > If so, then "echo transition-pattern-15" would create a directory > > e.g. transition_intervals with files interval_0 to

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Pavel Machek
Hi! > > Second, there are more issues than just patterns with the RGB > > LED. Most important is ability to set particular colors. You want to > > set the RGB LED to "white", but that does not mean you can set > > red=green=blue=1.0. You want color to look the same on LCD and on the > > LED,

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-07 Thread Pavel Machek
Hi! > > Second, there are more issues than just patterns with the RGB > > LED. Most important is ability to set particular colors. You want to > > set the RGB LED to "white", but that does not mean you can set > > red=green=blue=1.0. You want color to look the same on LCD and on the > > LED,

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Jacek Anaszewski
On 04/03/2017 09:00 PM, Bjorn Andersson wrote: > On Fri 31 Mar 02:28 PDT 2017, Jacek Anaszewski wrote: > >> Hi Bjorn and Pavel, >> >> On 03/30/2017 09:43 AM, Pavel Machek wrote: >>> Hi! >>> >> There is a binding for ti,lp55xx, but there's nothing I can reuse from >> that binding...because

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Jacek Anaszewski
On 04/03/2017 09:00 PM, Bjorn Andersson wrote: > On Fri 31 Mar 02:28 PDT 2017, Jacek Anaszewski wrote: > >> Hi Bjorn and Pavel, >> >> On 03/30/2017 09:43 AM, Pavel Machek wrote: >>> Hi! >>> >> There is a binding for ti,lp55xx, but there's nothing I can reuse from >> that binding...because

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Jacek Anaszewski
On 04/03/2017 08:21 PM, Bjorn Andersson wrote: > On Sun 02 Apr 05:54 PDT 2017, Jacek Anaszewski wrote: > >> On 03/31/2017 11:28 AM, Jacek Anaszewski wrote: >>> Hi Bjorn and Pavel, >>> >>> On 03/30/2017 09:43 AM, Pavel Machek wrote: > [..] >>> In both RGB and pattern approaches we should assess

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Jacek Anaszewski
On 04/03/2017 08:21 PM, Bjorn Andersson wrote: > On Sun 02 Apr 05:54 PDT 2017, Jacek Anaszewski wrote: > >> On 03/31/2017 11:28 AM, Jacek Anaszewski wrote: >>> Hi Bjorn and Pavel, >>> >>> On 03/30/2017 09:43 AM, Pavel Machek wrote: > [..] >>> In both RGB and pattern approaches we should assess

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Bjorn Andersson
On Fri 31 Mar 02:28 PDT 2017, Jacek Anaszewski wrote: > Hi Bjorn and Pavel, > > On 03/30/2017 09:43 AM, Pavel Machek wrote: > > Hi! > > > There is a binding for ti,lp55xx, but there's nothing I can reuse from > that binding...because it's completely different hardware. > >>> > >>>

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Bjorn Andersson
On Fri 31 Mar 02:28 PDT 2017, Jacek Anaszewski wrote: > Hi Bjorn and Pavel, > > On 03/30/2017 09:43 AM, Pavel Machek wrote: > > Hi! > > > There is a binding for ti,lp55xx, but there's nothing I can reuse from > that binding...because it's completely different hardware. > >>> > >>>

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Bjorn Andersson
On Sun 02 Apr 05:54 PDT 2017, Jacek Anaszewski wrote: > On 03/31/2017 11:28 AM, Jacek Anaszewski wrote: > > Hi Bjorn and Pavel, > > > > On 03/30/2017 09:43 AM, Pavel Machek wrote: [..] > > In both RGB and pattern approaches we should assess > > if it is acceptable to provide a pattern for

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-03 Thread Bjorn Andersson
On Sun 02 Apr 05:54 PDT 2017, Jacek Anaszewski wrote: > On 03/31/2017 11:28 AM, Jacek Anaszewski wrote: > > Hi Bjorn and Pavel, > > > > On 03/30/2017 09:43 AM, Pavel Machek wrote: [..] > > In both RGB and pattern approaches we should assess > > if it is acceptable to provide a pattern for

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-02 Thread Jacek Anaszewski
On 03/31/2017 11:28 AM, Jacek Anaszewski wrote: > Hi Bjorn and Pavel, > > On 03/30/2017 09:43 AM, Pavel Machek wrote: >> Hi! >> > There is a binding for ti,lp55xx, but there's nothing I can reuse from > that binding...because it's completely different hardware. Agreed, if you

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-04-02 Thread Jacek Anaszewski
On 03/31/2017 11:28 AM, Jacek Anaszewski wrote: > Hi Bjorn and Pavel, > > On 03/30/2017 09:43 AM, Pavel Machek wrote: >> Hi! >> > There is a binding for ti,lp55xx, but there's nothing I can reuse from > that binding...because it's completely different hardware. Agreed, if you

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-31 Thread Jacek Anaszewski
Hi Bjorn and Pavel, On 03/30/2017 09:43 AM, Pavel Machek wrote: > Hi! > There is a binding for ti,lp55xx, but there's nothing I can reuse from that binding...because it's completely different hardware. >>> >>> Agreed, if you drop the pattern stuff from the binding, at least for now.

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-31 Thread Jacek Anaszewski
Hi Bjorn and Pavel, On 03/30/2017 09:43 AM, Pavel Machek wrote: > Hi! > There is a binding for ti,lp55xx, but there's nothing I can reuse from that binding...because it's completely different hardware. >>> >>> Agreed, if you drop the pattern stuff from the binding, at least for now.

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-30 Thread Pavel Machek
Hi! > > > There is a binding for ti,lp55xx, but there's nothing I can reuse from > > > that binding...because it's completely different hardware. > > > > Agreed, if you drop the pattern stuff from the binding, at least for now. > > I do not have a strong preference to expose these knobs in

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-30 Thread Pavel Machek
Hi! > > > There is a binding for ti,lp55xx, but there's nothing I can reuse from > > > that binding...because it's completely different hardware. > > > > Agreed, if you drop the pattern stuff from the binding, at least for now. > > I do not have a strong preference to expose these knobs in

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-29 Thread Bjorn Andersson
On Wed 29 Mar 15:23 PDT 2017, Pavel Machek wrote: > On Wed 2017-03-29 12:07:25, Bjorn Andersson wrote: > > On Tue 28 Mar 19:17 PDT 2017, Rob Herring wrote: > > > > > On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > > > > Hi! > > > > > > > > > The Light Pulse Generator (LPG) is a

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-29 Thread Bjorn Andersson
On Wed 29 Mar 15:23 PDT 2017, Pavel Machek wrote: > On Wed 2017-03-29 12:07:25, Bjorn Andersson wrote: > > On Tue 28 Mar 19:17 PDT 2017, Rob Herring wrote: > > > > > On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > > > > Hi! > > > > > > > > > The Light Pulse Generator (LPG) is a

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-29 Thread Pavel Machek
On Wed 2017-03-29 12:07:25, Bjorn Andersson wrote: > On Tue 28 Mar 19:17 PDT 2017, Rob Herring wrote: > > > On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > > > Hi! > > > > > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > > > PMICs from Qualcomm.

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-29 Thread Pavel Machek
On Wed 2017-03-29 12:07:25, Bjorn Andersson wrote: > On Tue 28 Mar 19:17 PDT 2017, Rob Herring wrote: > > > On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > > > Hi! > > > > > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > > > PMICs from Qualcomm.

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-29 Thread Bjorn Andersson
On Tue 28 Mar 19:17 PDT 2017, Rob Herring wrote: > On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > > Hi! > > > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > > PMICs from Qualcomm. It can operate on fixed parameters or based on a > > >

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-29 Thread Bjorn Andersson
On Tue 28 Mar 19:17 PDT 2017, Rob Herring wrote: > On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > > Hi! > > > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > > PMICs from Qualcomm. It can operate on fixed parameters or based on a > > >

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-28 Thread Rob Herring
On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > Hi! > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > PMICs from Qualcomm. It can operate on fixed parameters or based on a > > lookup-table, altering the duty cycle over time - which provides the > >

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-28 Thread Rob Herring
On Thu, Mar 23, 2017 at 09:37:49PM +0100, Pavel Machek wrote: > Hi! > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > PMICs from Qualcomm. It can operate on fixed parameters or based on a > > lookup-table, altering the duty cycle over time - which provides the > >

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-26 Thread Bjorn Andersson
On Thu 23 Mar 13:37 PDT 2017, Pavel Machek wrote: > Hi! > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > PMICs from Qualcomm. It can operate on fixed parameters or based on a > > lookup-table, altering the duty cycle over time - which provides the > > means for

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-26 Thread Bjorn Andersson
On Thu 23 Mar 13:37 PDT 2017, Pavel Machek wrote: > Hi! > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > PMICs from Qualcomm. It can operate on fixed parameters or based on a > > lookup-table, altering the duty cycle over time - which provides the > > means for

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-23 Thread Pavel Machek
Hi! > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > PMICs from Qualcomm. It can operate on fixed parameters or based on a > lookup-table, altering the duty cycle over time - which provides the > means for e.g. hardware assisted transitions of LED brightness. Ok, this

Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-23 Thread Pavel Machek
Hi! > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > PMICs from Qualcomm. It can operate on fixed parameters or based on a > lookup-table, altering the duty cycle over time - which provides the > means for e.g. hardware assisted transitions of LED brightness. Ok, this

[PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-23 Thread Bjorn Andersson
The Light Pulse Generator (LPG) is a PWM-block found in a wide range of PMICs from Qualcomm. It can operate on fixed parameters or based on a lookup-table, altering the duty cycle over time - which provides the means for e.g. hardware assisted transitions of LED brightness. Signed-off-by: Bjorn

[PATCH 1/2] leds: Add driver for Qualcomm LPG

2017-03-23 Thread Bjorn Andersson
The Light Pulse Generator (LPG) is a PWM-block found in a wide range of PMICs from Qualcomm. It can operate on fixed parameters or based on a lookup-table, altering the duty cycle over time - which provides the means for e.g. hardware assisted transitions of LED brightness. Signed-off-by: Bjorn