All of lore.kernel.org
 help / color / mirror / Atom feed
* how to best map device regulators
@ 2011-09-02  9:42 Heiko Stübner
  2011-09-02 12:49 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Stübner @ 2011-09-02  9:42 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, linux-pm

Hi,

I'm at an impass on how to implement specific regulators found in an existing 
device.

My first candidate is a "GMT G9093", i.e. two fixed voltage regulators in one ic 
controlled via GPIOs. Here intuition suggest to simply use two instances of 
the fixed-driver - no use in duplicating its function. Correct?


Second, more complex chip, is a TI tps650240, i.e. 3 fixed voltage regulators, 
1 regulator switchable between 2 voltages - all controllable via GPIOs -  and 
two regulators whose enabled-state is controlled by one gpio only.

Here I'm torn between (1) building a new driver and (2) using fixed voltage 
drivers and building a switch-driver for the two voltage-regulator (here I'm 
also not sure if this should be crammed into the fixed-driver, as I think it is 
called fixed for a reason). For (2) I'm also not sure, on how to implement 
support for the two regulators controlled by one gpio.

Thanks
Heiko

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

* Re: how to best map device regulators
  2011-09-02  9:42 how to best map device regulators Heiko Stübner
@ 2011-09-02 12:49 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2011-09-02 12:49 UTC (permalink / raw)
  To: Heiko Stübner; +Cc: linux-pm, Liam Girdwood

On Fri, Sep 02, 2011 at 11:42:00AM +0200, Heiko Stübner wrote:

> My first candidate is a "GMT G9093", i.e. two fixed voltage regulators in one ic 
> controlled via GPIOs. Here intuition suggest to simply use two instances of 
> the fixed-driver - no use in duplicating its function. Correct?

Seems sensible.

> Second, more complex chip, is a TI tps650240, i.e. 3 fixed voltage regulators, 
> 1 regulator switchable between 2 voltages - all controllable via GPIOs -  and 
> two regulators whose enabled-state is controlled by one gpio only.

> Here I'm torn between (1) building a new driver and (2) using fixed voltage 
> drivers and building a switch-driver for the two voltage-regulator (here I'm 
> also not sure if this should be crammed into the fixed-driver, as I think it is 

A separate driver for one that can select voltages seems sensible.

> called fixed for a reason). For (2) I'm also not sure, on how to implement 
> support for the two regulators controlled by one gpio.

That's not really well supported but from a system integration point of
view it's usually fine since the design tends to be such that the two
are always enabled together so you can just give the enable to one of
the regulators and ignore the fact that it's actually controlling both
and software actually works fine even if it's not truly correct.

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

end of thread, other threads:[~2011-09-02 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-02  9:42 how to best map device regulators Heiko Stübner
2011-09-02 12:49 ` 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.