On Wed, Apr 27, 2016 at 10:20:53AM +0530, maitysanchayan@xxxxxxxxx wrote: > > > > Do you know the connect/disconnect by using USB Cable (not ID cable), I > > just want to know if the software can know connection, > > I did not understand this? Can you elaborate? When the board connects to PC, does the software know connection event? Eg, there is 5v on vbus or there is a gpio toggle event. > > > if not, please > > try below patch on the top of this patch set, my patch set can't cover > > this case for dual-role switch. > > Can you give me some pointers in the right direction to look and work on > so I can also try to upstream our use case? > It depends on my above comments. First, could you see the correct ID event? Check ci_handle_id_switch to see if the ID event is correct, and the switch between host and device mode are correct. Second, if your platform doesn't know connect and disconnect event, if nothing is connected, make sure you are at device mode and dp is pulled up (usbcmd.rs =1). Peter > > > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > > index 6986a50..d9a0119 100644 > > --- a/drivers/usb/chipidea/udc.c > > +++ b/drivers/usb/chipidea/udc.c > > @@ -1960,6 +1960,9 @@ static int udc_id_switch_for_device(struct ci_hdrc *ci) > > ci_write_otgsc(ci, OTGSC_BSVIS | OTGSC_BSVIE, > > OTGSC_BSVIS | OTGSC_BSVIE); > > > > + if (ci->dp_always_pullup) > > + usb_gadget_vbus_connect(&ci->gadget); > > + > > return 0; > > } > > > > Tried the above none the less, but no change in previous observations. > -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html