Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-24 Thread Tomi Valkeinen
On Fri, 2012-08-24 at 18:24 +0900, Alex Courbot wrote: > On Tuesday 21 August 2012 17:54:20 Tomi Valkeinen wrote: > > And as I said, I don't have any problems with some kind of generic power > > sequences. So the code in the board file could be moved and converted to > > use the power sequences,

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-24 Thread Alex Courbot
On Tuesday 21 August 2012 17:54:20 Tomi Valkeinen wrote: > > However this also means we'll essentially just be moving the board code. > > > What do you mean "just"? Wasn't the point of the whole "arm board file > mess" to get rid of the code from the board files? If the code in the > board file

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-24 Thread Alex Courbot
On Tuesday 21 August 2012 17:54:20 Tomi Valkeinen wrote: However this also means we'll essentially just be moving the board code. What do you mean just? Wasn't the point of the whole arm board file mess to get rid of the code from the board files? If the code in the board file is device

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-24 Thread Tomi Valkeinen
On Fri, 2012-08-24 at 18:24 +0900, Alex Courbot wrote: On Tuesday 21 August 2012 17:54:20 Tomi Valkeinen wrote: And as I said, I don't have any problems with some kind of generic power sequences. So the code in the board file could be moved and converted to use the power sequences, if that

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Thierry Reding
On Tue, Aug 21, 2012 at 05:57:38PM +0100, Mark Brown wrote: > On Tue, Aug 21, 2012 at 12:54:20PM +0300, Tomi Valkeinen wrote: > > > However, if we already have a generic driver for that type of panel, > > (which we would need anyway for the DT based approach), the developer > > only needs to add

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Mark Brown
On Tue, Aug 21, 2012 at 12:54:20PM +0300, Tomi Valkeinen wrote: > However, if we already have a generic driver for that type of panel, > (which we would need anyway for the DT based approach), the developer > only needs to add the name of the panel and the data for the power > sequence to the

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Tomi Valkeinen
On Tue, 2012-08-21 at 11:13 +0200, Thierry Reding wrote: > On Tue, Aug 21, 2012 at 11:57:45AM +0300, Tomi Valkeinen wrote: > > This doesn't mean that we'd have a separate driver for each device. For > > example, we have a generic panel driver in OMAP, which contains a kind > > of small panel

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Thierry Reding
On Tue, Aug 21, 2012 at 11:57:45AM +0300, Tomi Valkeinen wrote: > On Tue, 2012-08-21 at 10:33 +0200, Thierry Reding wrote: > > > I suppose power sequences aren't needed if you have a specific driver > > for every panel out there. However that also means that you'd have to > > write drivers for

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Tomi Valkeinen
On Tue, 2012-08-21 at 10:33 +0200, Thierry Reding wrote: > I suppose power sequences aren't needed if you have a specific driver > for every panel out there. However that also means that you'd have to > write drivers for literally every panel that requires support. In the > end this will just

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Alex Courbot
On Tuesday 21 August 2012 16:33:30 Thierry Reding wrote: > I suppose power sequences aren't needed if you have a specific driver > for every panel out there. However that also means that you'd have to > write drivers for literally every panel that requires support. In the > end this will just

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Thierry Reding
On Tue, Aug 21, 2012 at 05:22:12PM +0900, Alex Courbot wrote: > Hi Tomi, > > On Tuesday 21 August 2012 15:44:29 Tomi Valkeinen wrote: > > > +Problem > > > +--- > > > +One very common board-dependent code is the out-of-driver code that is > > > used to +turn a device on or off. For instance,

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Alex Courbot
Hi Tomi, On Tuesday 21 August 2012 15:44:29 Tomi Valkeinen wrote: > > +Problem > > +--- > > +One very common board-dependent code is the out-of-driver code that is > > used to +turn a device on or off. For instance, SoC boards very commonly > > use a GPIO +(abstracted to a regulator or not)

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Tomi Valkeinen
Hi, On Thu, 2012-08-16 at 15:08 +0900, Alexandre Courbot wrote: > +Problem > +--- > +One very common board-dependent code is the out-of-driver code that is used > to > +turn a device on or off. For instance, SoC boards very commonly use a GPIO > +(abstracted to a regulator or not) to

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Thierry Reding
On Tue, Aug 21, 2012 at 05:57:38PM +0100, Mark Brown wrote: On Tue, Aug 21, 2012 at 12:54:20PM +0300, Tomi Valkeinen wrote: However, if we already have a generic driver for that type of panel, (which we would need anyway for the DT based approach), the developer only needs to add the name

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Tomi Valkeinen
Hi, On Thu, 2012-08-16 at 15:08 +0900, Alexandre Courbot wrote: +Problem +--- +One very common board-dependent code is the out-of-driver code that is used to +turn a device on or off. For instance, SoC boards very commonly use a GPIO +(abstracted to a regulator or not) to control the

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Alex Courbot
Hi Tomi, On Tuesday 21 August 2012 15:44:29 Tomi Valkeinen wrote: +Problem +--- +One very common board-dependent code is the out-of-driver code that is used to +turn a device on or off. For instance, SoC boards very commonly use a GPIO +(abstracted to a regulator or not) to control

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Thierry Reding
On Tue, Aug 21, 2012 at 05:22:12PM +0900, Alex Courbot wrote: Hi Tomi, On Tuesday 21 August 2012 15:44:29 Tomi Valkeinen wrote: +Problem +--- +One very common board-dependent code is the out-of-driver code that is used to +turn a device on or off. For instance, SoC boards very

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Alex Courbot
On Tuesday 21 August 2012 16:33:30 Thierry Reding wrote: I suppose power sequences aren't needed if you have a specific driver for every panel out there. However that also means that you'd have to write drivers for literally every panel that requires support. In the end this will just result

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Tomi Valkeinen
On Tue, 2012-08-21 at 10:33 +0200, Thierry Reding wrote: I suppose power sequences aren't needed if you have a specific driver for every panel out there. However that also means that you'd have to write drivers for literally every panel that requires support. In the end this will just result

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Thierry Reding
On Tue, Aug 21, 2012 at 11:57:45AM +0300, Tomi Valkeinen wrote: On Tue, 2012-08-21 at 10:33 +0200, Thierry Reding wrote: I suppose power sequences aren't needed if you have a specific driver for every panel out there. However that also means that you'd have to write drivers for literally

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Tomi Valkeinen
On Tue, 2012-08-21 at 11:13 +0200, Thierry Reding wrote: On Tue, Aug 21, 2012 at 11:57:45AM +0300, Tomi Valkeinen wrote: This doesn't mean that we'd have a separate driver for each device. For example, we have a generic panel driver in OMAP, which contains a kind of small panel database.

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-21 Thread Mark Brown
On Tue, Aug 21, 2012 at 12:54:20PM +0300, Tomi Valkeinen wrote: However, if we already have a generic driver for that type of panel, (which we would need anyway for the DT based approach), the developer only needs to add the name of the panel and the data for the power sequence to the panel

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-17 Thread Mark Brown
On Thu, Aug 16, 2012 at 11:10:30AM -1000, Mitch Bradley wrote: > On 8/16/2012 8:38 AM, Stephen Warren wrote: > > Device tree bindings shouldn't reference Linux documentation; the > > bindings are supposed to be OS-agnostic. > While it is true that bindings should try to be OS-agnostic, there is

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-17 Thread Alex Courbot
On 08/17/2012 03:38 AM, Stephen Warren wrote: On 08/16/2012 12:08 AM, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a precise powering order and delays to respect

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-17 Thread Alex Courbot
On 08/17/2012 03:38 AM, Stephen Warren wrote: On 08/16/2012 12:08 AM, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a precise powering order and delays to respect

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-17 Thread Mark Brown
On Thu, Aug 16, 2012 at 11:10:30AM -1000, Mitch Bradley wrote: On 8/16/2012 8:38 AM, Stephen Warren wrote: Device tree bindings shouldn't reference Linux documentation; the bindings are supposed to be OS-agnostic. While it is true that bindings should try to be OS-agnostic, there is the

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Mitch Bradley
On 8/16/2012 8:38 AM, Stephen Warren wrote: > On 08/16/2012 12:08 AM, Alexandre Courbot wrote: >> Some device drivers (panel backlights especially) need to follow precise >> sequences for powering on and off, involving gpios, regulators, PWMs >> with a precise powering order and delays to respect

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: > On 08/16/2012 12:08 AM, Alexandre Courbot wrote: > > diff --git a/Documentation/power/power_seq.txt > > b/Documentation/power/power_seq.txt > > > +Usage by Drivers and Resources Management > >

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Stephen Warren
On 08/16/2012 12:57 PM, Stephen Warren wrote: > On 08/16/2012 12:47 PM, Mark Brown wrote: >> On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: >> >>> Note that this somewhat conflicts with accessing the top-level power >>> sequence by name too; perhaps that should be re-thought too.

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Stephen Warren
On 08/16/2012 12:47 PM, Mark Brown wrote: > On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: > >> Note that this somewhat conflicts with accessing the top-level power >> sequence by name too; perhaps that should be re-thought too. I must >> admit this DT rule kinda sucks. > >

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Mark Brown
On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: > Note that this somewhat conflicts with accessing the top-level power > sequence by name too; perhaps that should be re-thought too. I must > admit this DT rule kinda sucks. Given that currently the information there is useless and

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Stephen Warren
On 08/16/2012 12:08 AM, Alexandre Courbot wrote: > Some device drivers (panel backlights especially) need to follow precise > sequences for powering on and off, involving gpios, regulators, PWMs > with a precise powering order and delays to respect between each steps. > These sequences are

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Mark Brown
On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: > + power-off-sequence { > + step0 { > + gpio = "enable"; > + disable; I'd change the name to "reset" or something in the example - avoids

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 07:33:27PM +0900, Alex Courbot wrote: > On 08/16/2012 06:52 PM, Thierry Reding wrote: > >* PGP Signed by an unknown key > > > >On Thu, Aug 16, 2012 at 06:19:08PM +0900, Alex Courbot wrote: > >>On 08/16/2012 04:42 PM, Thierry Reding wrote: > Old Signed by an unknown key

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Alex Courbot
On 08/16/2012 06:52 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Aug 16, 2012 at 06:19:08PM +0900, Alex Courbot wrote: On 08/16/2012 04:42 PM, Thierry Reding wrote: Old Signed by an unknown key On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: [...]

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 06:19:08PM +0900, Alex Courbot wrote: > On 08/16/2012 04:42 PM, Thierry Reding wrote: > >* PGP Signed by an unknown key > > > >On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: [...] > >>+Usage by Drivers and Resources Management >

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Alex Courbot
On 08/16/2012 04:42 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: > Some device drivers (panel backlights especially) need to follow precise > sequences for powering on and off, involving gpios, regulators, PWMs > with a precise powering order and delays to respect between each steps. > These

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a precise powering order and delays to respect between each steps. These

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Alex Courbot
On 08/16/2012 04:42 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 06:19:08PM +0900, Alex Courbot wrote: On 08/16/2012 04:42 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: [...] +Usage by Drivers and Resources Management

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Alex Courbot
On 08/16/2012 06:52 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Aug 16, 2012 at 06:19:08PM +0900, Alex Courbot wrote: On 08/16/2012 04:42 PM, Thierry Reding wrote: Old Signed by an unknown key On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: [...]

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 07:33:27PM +0900, Alex Courbot wrote: On 08/16/2012 06:52 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Aug 16, 2012 at 06:19:08PM +0900, Alex Courbot wrote: On 08/16/2012 04:42 PM, Thierry Reding wrote: Old Signed by an unknown key On Thu, Aug

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Mark Brown
On Thu, Aug 16, 2012 at 03:08:55PM +0900, Alexandre Courbot wrote: + power-off-sequence { + step0 { + gpio = enable; + disable; I'd change the name to reset or something in the example - avoids any

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Stephen Warren
On 08/16/2012 12:08 AM, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a precise powering order and delays to respect between each steps. These sequences are

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Mark Brown
On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: Note that this somewhat conflicts with accessing the top-level power sequence by name too; perhaps that should be re-thought too. I must admit this DT rule kinda sucks. Given that currently the information there is useless and

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Stephen Warren
On 08/16/2012 12:47 PM, Mark Brown wrote: On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: Note that this somewhat conflicts with accessing the top-level power sequence by name too; perhaps that should be re-thought too. I must admit this DT rule kinda sucks. Given that

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Stephen Warren
On 08/16/2012 12:57 PM, Stephen Warren wrote: On 08/16/2012 12:47 PM, Mark Brown wrote: On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: Note that this somewhat conflicts with accessing the top-level power sequence by name too; perhaps that should be re-thought too. I must

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Thierry Reding
On Thu, Aug 16, 2012 at 12:38:33PM -0600, Stephen Warren wrote: On 08/16/2012 12:08 AM, Alexandre Courbot wrote: diff --git a/Documentation/power/power_seq.txt b/Documentation/power/power_seq.txt +Usage by Drivers and Resources Management +-

Re: [PATCH v4 1/3] Runtime Interpreted Power Sequences

2012-08-16 Thread Mitch Bradley
On 8/16/2012 8:38 AM, Stephen Warren wrote: On 08/16/2012 12:08 AM, Alexandre Courbot wrote: Some device drivers (panel backlights especially) need to follow precise sequences for powering on and off, involving gpios, regulators, PWMs with a precise powering order and delays to respect between