USB: otg: twl4030: fix wrong assumption of starting state
authorFelipe Balbi <felipe.balbi@nokia.com>
Wed, 11 Aug 2010 10:02:32 +0000 (13:02 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Aug 2010 03:50:16 +0000 (20:50 -0700)
commit461c317705eca5cac09a360f488715927fd0a927
tree680ffe25b91adce6638a727657f5898a8d9c4ec1
parent7c81aafaf059b81ead2330bc13db78269ef62612
USB: otg: twl4030: fix wrong assumption of starting state

The reset state of twl4030-usb is not sleeping, it starts
up awaken and we need to disable it if we have booted
with a disconnected cable to avoid over consumption on
the default state.

To avoid problems later, we read the current state of the
transceiver from the PHY_PWR_CTRL register. The bootloader
can, anyways, put the device to sleep before us.

Tested on a custom OMAP board.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/otg/twl4030-usb.c