[RESEND PATCH] usb: max3420: add the gadget driver
Marek Vasut
marex at denx.de
Wed Jun 24 11:22:10 CEST 2020
On 6/24/20 6:53 AM, Jassi Brar wrote:
> Hi Marek,
Hi,
> 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.
Ah, right. Isn't there already some such macro in include/linux/ ?
[...]
>>>> +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 ?
More information about the U-Boot
mailing list