usb: musb: Handle cable status better for 2430 glue layer
authorTony Lindgren <tony@atomide.com>
Tue, 31 May 2016 15:05:15 +0000 (10:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Jun 2016 21:58:59 +0000 (14:58 -0700)
commit21f77beece2b6f479648192a87ededd2fb8f1716
tree5baa25f6fa776a8bb36b26df4b2be5b24431f9dc
parent517bafffcaf8f882299a74e310082e7b6b2288ad
usb: musb: Handle cable status better for 2430 glue layer

We may have drivers loaded but no configured gadgets and MUSB may be in
host mode. If gadgets are configured during host mode, PM runtime will
get confused.

Disable PM runtime from gadget state, and do it based on the cable
and last state.

Note that we may get multiple cable events, so we need to keep track
of the power state.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/omap2430.c