All of lore.kernel.org
 help / color / mirror / Atom feed
* boot_on regulator constraint vs. regulator-boot-on DT property
@ 2012-06-20 20:55 Stephen Warren
  2012-06-20 23:46 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2012-06-20 20:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, linux-kernel

Liam, Mark,

I've spotted what seems like a slight inconsistency between the
documentation for the boot_on regulator constraint, and the
regulator-boot-on DT property documentation.

include/linux/regulator/machine.h says:

>  * @boot_on: Set if the regulator is enabled when the system is initially
>  *           started.  If the regulator is not enabled by the hardware or
>  *           bootloader then it will be enabled when the constraints are
>  *           applied.

Documentation/devicetree/bindings/regulator/regulator.txt says:

> - regulator-boot-on: bootloader/firmware enabled regulator

... and of_regulator.c sets the boot_on constraint based on this property.

The former quote implies that this is a flag to tell Linux to turn on
the regulator when it's first registered, whereas the latter quote
implies that it's guaranteeing the state that previous SW placed the
regulator into already.

I assume the documentation from machine.h is correct, and I should send
a patch to make regulator.txt match it?

Thanks.

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

* Re: boot_on regulator constraint vs. regulator-boot-on DT property
  2012-06-20 20:55 boot_on regulator constraint vs. regulator-boot-on DT property Stephen Warren
@ 2012-06-20 23:46 ` Mark Brown
  2012-06-21  1:26   ` Stephen Warren
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2012-06-20 23:46 UTC (permalink / raw)
  To: Stephen Warren; +Cc: Liam Girdwood, linux-kernel

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

On Wed, Jun 20, 2012 at 02:55:37PM -0600, Stephen Warren wrote:

> include/linux/regulator/machine.h says:

> >  * @boot_on: Set if the regulator is enabled when the system is initially
> >  *           started.  If the regulator is not enabled by the hardware or
> >  *           bootloader then it will be enabled when the constraints are
> >  *           applied.

> Documentation/devicetree/bindings/regulator/regulator.txt says:

> > - regulator-boot-on: bootloader/firmware enabled regulator

> ... and of_regulator.c sets the boot_on constraint based on this property.

> The former quote implies that this is a flag to tell Linux to turn on
> the regulator when it's first registered, whereas the latter quote
> implies that it's guaranteeing the state that previous SW placed the
> regulator into already.

> I assume the documentation from machine.h is correct, and I should send
> a patch to make regulator.txt match it?

There's no great inconsistency between the two, this is only supposed to
be used for supplies which are already enabled on boot but if the supply
is not already enabled then currently the API will try to make it so
since probably there's some reason for that.  Generally it's supposed to
be used as a crutch to keep hotplug going.

I'm not sure we should clarify this since I'm not sure that for DT
setups which (as we were discussing in the other thread) are supposed to
be usable over many software versions it's something that should really
be used.  We ought to in the endgame be able to have DT systems turn on
full constraints and that probably breaks anything relying too much on
boot-on, I'd expect they either need the regulator to be always on or
some more consumers.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: boot_on regulator constraint vs. regulator-boot-on DT property
  2012-06-20 23:46 ` Mark Brown
@ 2012-06-21  1:26   ` Stephen Warren
  2012-06-21  9:12     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2012-06-21  1:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, linux-kernel

On 06/20/2012 05:46 PM, Mark Brown wrote:
> On Wed, Jun 20, 2012 at 02:55:37PM -0600, Stephen Warren wrote:
> 
>> include/linux/regulator/machine.h says:
> 
>>> * @boot_on: Set if the regulator is enabled when the system is
>>> initially *           started.  If the regulator is not enabled
>>> by the hardware or *           bootloader then it will be
>>> enabled when the constraints are *           applied.
> 
>> Documentation/devicetree/bindings/regulator/regulator.txt says:
> 
>>> - regulator-boot-on: bootloader/firmware enabled regulator
> 
>> ... and of_regulator.c sets the boot_on constraint based on this
>> property.
> 
>> The former quote implies that this is a flag to tell Linux to
>> turn on the regulator when it's first registered, whereas the
>> latter quote implies that it's guaranteeing the state that
>> previous SW placed the regulator into already.
> 
>> I assume the documentation from machine.h is correct, and I
>> should send a patch to make regulator.txt match it?
> 
> There's no great inconsistency between the two, this is only
> supposed to be used for supplies which are already enabled on boot

Hmm. Perhaps I was misreading machine.h, and "when the system is
initially started" refers to the first firmware start, rather than
when /Linux/ starts. If so, then yes I can see it isn't really
inconsistent.

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

* Re: boot_on regulator constraint vs. regulator-boot-on DT property
  2012-06-21  1:26   ` Stephen Warren
@ 2012-06-21  9:12     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-06-21  9:12 UTC (permalink / raw)
  To: Stephen Warren; +Cc: Liam Girdwood, linux-kernel

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

On Wed, Jun 20, 2012 at 07:26:13PM -0600, Stephen Warren wrote:
> On 06/20/2012 05:46 PM, Mark Brown wrote:

> > There's no great inconsistency between the two, this is only
> > supposed to be used for supplies which are already enabled on boot

> Hmm. Perhaps I was misreading machine.h, and "when the system is
> initially started" refers to the first firmware start, rather than
> when /Linux/ starts. If so, then yes I can see it isn't really
> inconsistent.

Yes, that's the idea - it's for telling the core that everything has
been done on the basis that the initial power up state of the system
(possibly after some intervention by the bootloader) should be whatever,
it's not supposed to be an instruction to Linux itself.  Linux should be
using consumers or always on.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-06-21  9:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-20 20:55 boot_on regulator constraint vs. regulator-boot-on DT property Stephen Warren
2012-06-20 23:46 ` Mark Brown
2012-06-21  1:26   ` Stephen Warren
2012-06-21  9:12     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.