Hi, Jianqiang Tang <jianqiang.tang.kernel@xxxxxxxxx> writes: > Set the otg flag during dwc3 gadget init function for ceritification certification > test requirement. > We must set this otg flag for ceritification test in order to be able certification > to return OTG descriptor during enumeration. > > Signed-off-by: Jianqiang Tang <jianqiang.tang@xxxxxxxxx> > --- > drivers/usb/dwc3/gadget.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index a58376f..72dc8dc 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -2750,6 +2750,12 @@ int dwc3_gadget_init(struct dwc3 *dwc) > dwc->gadget.name = "dwc3-gadget"; > > /* > + * Set the otg flag if Controller in OTG mode for Ceritification Test > + */ comment is pointless (it's clear what code is doing below) and also you're using multi-line comment style for a single line comment. Oh, and you also have the same typo ;-) > + if (dwc->dr_mode == USB_DR_MODE_OTG) > + dwc->gadget.is_otg = 1; following is more succint: dwc->gadget.is_otg = dwc->dr_mode == USB_DR_MODE_OTG; ps: which other patches do you have to get OTG certification ? Do you want, perhaps, to send those upstream ? -- balbi
Attachment:
signature.asc
Description: PGP signature