Re: [PATCH 03/10] usb: musb: Fix PM runtime handling for connected cable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx> [160428 10:55]:
> Hello.
> 
> On 04/28/2016 08:33 PM, Tony Lindgren wrote:
> 
> >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.
> >
> >Disconnect PM runtime from gadget state, and do it only
> >based on the cable.
> >
> >Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> >---
> >  drivers/usb/musb/omap2430.c | 20 +++++++++++++-------
> >  1 file changed, 13 insertions(+), 7 deletions(-)
> >
> >diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> >index c84e0322..9d3645f 100644
> >--- a/drivers/usb/musb/omap2430.c
> >+++ b/drivers/usb/musb/omap2430.c
> >@@ -259,6 +259,13 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
> >  	struct musb_hdrc_platform_data *pdata = dev_get_platdata(dev);
> >  	struct omap_musb_board_data *data = pdata->board_data;
> >  	struct usb_otg *otg = musb->xceiv->otg;
> >+	bool cable_connected;
> >+
> >+	cable_connected = ((glue->status & MUSB_ID_GROUND) ||
> >+			   (glue->status & MUSB_VBUS_VALID));
> 
> 	cable_connected = glue->status & (MUSB_ID_GROUND |
> 					MUSB_VBUS_VALID);

Thanks, actually that's an enumeration so needs fixing.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux