[RESEND PATCH] usb: max3420: add the gadget driver

Jassi Brar jassisinghbrar at gmail.com
Wed Jun 24 06:53:20 CEST 2020


Hi Marek,

On Mon, Jun 15, 2020 at 6:49 PM Marek Vasut <marex at denx.de> 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.

> >> +#define msleep(a)      udelay((a) * 1000)
>
> Please use mdelay() .
>
Ok.

> >> +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.

Thank you!


More information about the U-Boot mailing list