On Thu, Jun 25, 2020 at 12:22 PM Jassi Brar <[email protected]> wrote: > > On Wed, Jun 24, 2020 at 4:24 AM Marek Vasut <[email protected]> wrote: > > > > On 6/24/20 6:53 AM, Jassi Brar wrote: > > > Hi Marek, > > > > Hi, > > > > > On Mon, Jun 15, 2020 at 6:49 PM Marek Vasut <[email protected]> wrote: > > > > > >>>> +#define MAX3420_REG_MODE 27 > > >>>> +#define MAX3420_REG_PERADDR 28 > > >>>> +#define MAX3420_REG_HCTL 29 > > >>>> +#define MAX3420_REG_HXFR 30 > > >>>> +#define MAX3420_REG_HRSL 31 > > >>>> + > > >>>> +#define field(val, bit) ((val) << (bit)) > > >> > > >> Is this GENMASK() ? > > >> > > > The 'val' is not a mask, otherwise we could use genmask. > > > > Ah, right. Isn't there already some such macro in include/linux/ ? > > > I am not aware if there is. > > > [...] > > > > >>>> +static int max3420_udc_start(struct usb_gadget *gadget, > > >>>> + struct usb_gadget_driver *driver) > > >>>> +{ > > >>>> + struct max3420_udc *udc = to_udc(gadget); > > >>>> + unsigned long flags; > > >>>> + > > >>>> + udc->driver = driver; > > >>>> + udc->remote_wkp = 0; > > >>>> + udc->softconnect = true; > > >>>> + > > >>>> + //if (udc->vbus_active) > > >> > > >> Is this intended to be commented out ? > > >> > > > Yes. > > > > Why ? > > > That was remnant of debugging. The enumeration fails randomly if we > don't always reset the chip upon connection and the spec isn't clear > about it. > Hi Marek, Hi Lukasz I am perfectly fine to make more changes if you want, please let me know.
Thanks.

