[RESEND PATCH] usb: max3420: add the gadget driver
Marek Vasut
marex at denx.de
Tue Jun 16 01:49:18 CEST 2020
On 6/16/20 1:25 AM, Jassi Brar wrote:
> ... a polite ping, Lukasz.
so while I don't know much about the gadget subsystem, a few nits below.
[...]
>> +#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() ?
>> +#define msleep(a) udelay((a) * 1000)
Please use mdelay() .
[...]
>> +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 ?
>> + __max3420_start(udc);
>> +
>> + return 0;
>> +}
The rest looks good, thanks!
And sorry for the inactivity.
More information about the U-Boot
mailing list