* Regulator constraints and userspace consumer
@ 2011-09-14 18:54 Marcus Folkesson
2011-09-14 23:27 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Marcus Folkesson @ 2011-09-14 18:54 UTC (permalink / raw)
To: linux-kernel, Mark Brown
Hello there,
I'm currently working with a custom made board based on a OMAP-l138 processor.
I've a few questions about the regulator interface.
The regulators is registered and loaded correctly with well-defined constraints.
I have also registered userspace consumers for each regulator.
* One regulator constraint is set to 1000mV as min and max in the
boardfile. The default voltage for that regulator is 1125mV (the
regulator has this output when powered up).
What is the most accurate way to set the voltage for these
limitations when the system starts up? There is apparently no check if
the default configuration is within limits as the regulator stays on
1125mV.
When I'm looking in the userspace consumer (/sys/class/regulator/),
the "max_microvolts" and "min_microvolts" is set to 1000000 but the
"microvolts" is set to 1125000.
* I want to change the output voltage from userspace on demand. What
is the most proper way to do this? If I have understand correctly, the
userspace consumer just exports interface for switching on/off the
regulator, is that correct?
Thanks in advance!
Med vänliga hälsningar / Best regards
Marcus Folkesson
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regulator constraints and userspace consumer
2011-09-14 18:54 Regulator constraints and userspace consumer Marcus Folkesson
@ 2011-09-14 23:27 ` Mark Brown
2011-09-15 5:21 ` Marcus Folkesson
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-09-14 23:27 UTC (permalink / raw)
To: Marcus Folkesson; +Cc: linux-kernel
On Wed, Sep 14, 2011 at 08:54:47PM +0200, Marcus Folkesson wrote:
> What is the most accurate way to set the voltage for these
> limitations when the system starts up? There is apparently no check if
> the default configuration is within limits as the regulator stays on
> 1125mV.
> When I'm looking in the userspace consumer (/sys/class/regulator/),
> the "max_microvolts" and "min_microvolts" is set to 1000000 but the
> "microvolts" is set to 1125000.
Set apply_uV in hte constraints. The regulator framework won't touch
the hardware unless explicitly told to.
> * I want to change the output voltage from userspace on demand. What
> is the most proper way to do this? If I have understand correctly, the
> userspace consumer just exports interface for switching on/off the
> regulator, is that correct?
Why do you wish to do this? In general this is not a good sign. There
is the virtual consumer but that is explicitly intended for test, it's
not really supposed to be used in production.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regulator constraints and userspace consumer
2011-09-14 23:27 ` Mark Brown
@ 2011-09-15 5:21 ` Marcus Folkesson
2011-09-15 7:51 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Marcus Folkesson @ 2011-09-15 5:21 UTC (permalink / raw)
To: Mark Brown, linux-kernel
2011/9/15 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Wed, Sep 14, 2011 at 08:54:47PM +0200, Marcus Folkesson wrote:
>
>> What is the most accurate way to set the voltage for these
>> limitations when the system starts up? There is apparently no check if
>> the default configuration is within limits as the regulator stays on
>> 1125mV.
>> When I'm looking in the userspace consumer (/sys/class/regulator/),
>> the "max_microvolts" and "min_microvolts" is set to 1000000 but the
>> "microvolts" is set to 1125000.
>
> Set apply_uV in hte constraints. The regulator framework won't touch
> the hardware unless explicitly told to.
Ok, thank you!
>> * I want to change the output voltage from userspace on demand. What
>> is the most proper way to do this? If I have understand correctly, the
>> userspace consumer just exports interface for switching on/off the
>> regulator, is that correct?
>
> Why do you wish to do this? In general this is not a good sign. There
> is the virtual consumer but that is explicitly intended for test, it's
> not really supposed to be used in production.
We are working on an Software Defined Radio (SDR) in which power
consumption is an important part of the product.
The "modem" application executes in user space and has the
responsibility to turn the voltage regulators on/off to the radio card
and so on.
When the application goes into power-down mode, there are circuits
that are not used and we are able to reduce the voltage further by set
down a few boost regulators.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regulator constraints and userspace consumer
2011-09-15 5:21 ` Marcus Folkesson
@ 2011-09-15 7:51 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-09-15 7:51 UTC (permalink / raw)
To: Marcus Folkesson; +Cc: linux-kernel
On Thu, Sep 15, 2011 at 07:21:24AM +0200, Marcus Folkesson wrote:
> We are working on an Software Defined Radio (SDR) in which power
> consumption is an important part of the product.
> The "modem" application executes in user space and has the
> responsibility to turn the voltage regulators on/off to the radio card
> and so on.
> When the application goes into power-down mode, there are circuits
> that are not used and we are able to reduce the voltage further by set
> down a few boost regulators.
I'd expect you have some sort of kernel mode driver for the hardware
side of things - shouldn't that be able to manage the regulators for
you? What happens when someone deploys the software on a different
board?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-15 7:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-14 18:54 Regulator constraints and userspace consumer Marcus Folkesson
2011-09-14 23:27 ` Mark Brown
2011-09-15 5:21 ` Marcus Folkesson
2011-09-15 7:51 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox