* Tony Lindgren <tony@xxxxxxxxxxx> [160513 14:19]: > * Bin Liu <b-liu@xxxxxx> [160513 14:05]: > > In stead of removing it, session bit should only be set when musb_mode > > == MUSB_HOST, will this fix the D+ pullup problem? > > Good point, I forgot about it being specific to host mode. I'll check. Yeah good call, the patch below fixes the issue. Then we can remove the set_mode later if the generic approach looks OK to you. Regards, Tony 8< ---------------------- From: Tony Lindgren <tony@xxxxxxxxxxx> Date: Fri, 13 May 2016 07:59:35 -0700 Subject: [PATCH] usb: musb: Don't set d+ high before enable for 2430 glue layer At least 2430 glue layer pulls d+ high on start up even if there are no gadgets configured. This is bad at least for anything using a separate battery charger chip as it can confuse the charger detection. Let's fix the issue by only setting the SESSION bit in host mode as suggested by Bin Liu <b-liu@xxxxxx>. Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -124,8 +124,12 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on) static int omap2430_musb_set_mode(struct musb *musb, u8 musb_mode) { - u8 devctl = musb_readb(musb->mregs, MUSB_DEVCTL); + u8 devctl; + if (musb_mode != MUSB_HOST) + return 0; + + devctl = musb_readb(musb->mregs, MUSB_DEVCTL); devctl |= MUSB_DEVCTL_SESSION; musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); -- 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