All of lore.kernel.org
 help / color / mirror / Atom feed
* Interaction between USB phy power and MADC driver
@ 2012-09-06 18:57 Frank Agius
  2012-09-06 20:01 ` Felipe Balbi
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Agius @ 2012-09-06 18:57 UTC (permalink / raw)
  To: linux-omap

I'm seeing what I think is an unintended consequence of powering down 
the USB phy.  All the relavent code is in file twl4030_usb.c. My system 
is setup to use the USB in otg mode.  If nothing is connected to the USB 
OTG port, the phy suspension code is called.  In the chain of calls that 
follows, the vusb3v1 regulator is disabled.  However, according to the 
OMAP power management manual, vusb3v1 is used "to bias the analog 
multiplexers on the four MCPC pins between the carkit and the MADC". 
I've seen if there is no bias on this mux, the MADC driver returns 
incorrect counts on these 4 pins that should be in A/D mode.  If I plug 
something into the USB OTG port, the MADC driver returns the expected 
counts.  I also created a debug version of the twl4030-usb driver, with 
the disabling of the vusb3v1 commented out and the MADC returns the 
correct counts regardless of the state of the USB OTG port.

Since the vusb3v1 regulator is required for the proper operation of the 
mux and by extension the MADC and carkit mode, shouldn't it always be 
enabled?

frank


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

* Re: Interaction between USB phy power and MADC driver
  2012-09-06 18:57 Interaction between USB phy power and MADC driver Frank Agius
@ 2012-09-06 20:01 ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2012-09-06 20:01 UTC (permalink / raw)
  To: Frank Agius; +Cc: linux-omap

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

On Thu, Sep 06, 2012 at 02:57:42PM -0400, Frank Agius wrote:
> I'm seeing what I think is an unintended consequence of powering down
> the USB phy.  All the relavent code is in file twl4030_usb.c. My
> system is setup to use the USB in otg mode.  If nothing is connected
> to the USB OTG port, the phy suspension code is called.  In the chain
> of calls that follows, the vusb3v1 regulator is disabled.  However,
> according to the OMAP power management manual, vusb3v1 is used "to
> bias the analog multiplexers on the four MCPC pins between the carkit
> and the MADC". I've seen if there is no bias on this mux, the MADC
> driver returns incorrect counts on these 4 pins that should be in A/D
> mode.  If I plug something into the USB OTG port, the MADC driver
> returns the expected counts.  I also created a debug version of the
> twl4030-usb driver, with the disabling of the vusb3v1 commented out
> and the MADC returns the correct counts regardless of the state of
> the USB OTG port.
> 
> Since the vusb3v1 regulator is required for the proper operation of
> the mux and by extension the MADC and carkit mode, shouldn't it
> always be enabled?

If MADC needs that regulator, it should request it as well so the
regulator framework has correct usecounts. Also, IIRC there is a
"suspend" mode for the regulator which won't power it down, but it will
consume minimal power while mantaining MADC working.

-- 
balbi

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

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

end of thread, other threads:[~2012-09-06 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06 18:57 Interaction between USB phy power and MADC driver Frank Agius
2012-09-06 20:01 ` Felipe Balbi

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.