Message ID | 20240723131817.262596-6-zli@ogga.fr |
---|---|
State | Changes Requested |
Delegated to: | Mattijs Korpershoek |
Headers | show |
Series | usb: gadget: atmel: Code refactor and DM_USB_GADGET support | expand |
On 7/23/24 3:18 PM, Zixun LI wrote: > Rename atmel_usba_start() / atmel_usba_stop() to usba_udc_enable() > / usba_udc_disable(), remove atmel_ prefix to be inline with other > functions. Also avoid confusion with DM start() / stop() functions. Reviewed-by: Marek Vasut <marex@denx.de> Thanks !
Hi Zixun, Thank you for the patch. On mar., juil. 23, 2024 at 15:18, Zixun LI <admin@hifiphile.com> wrote: > Rename atmel_usba_start() / atmel_usba_stop() to usba_udc_enable() > / usba_udc_disable(), remove atmel_ prefix to be inline with other > functions. Also avoid confusion with DM start() / stop() functions. > > Signed-off-by: Zixun LI <zli@ogga.fr> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> > --- > drivers/usb/gadget/atmel_usba_udc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c > index a3d24501ba..ea9ad7585e 100644 > --- a/drivers/usb/gadget/atmel_usba_udc.c > +++ b/drivers/usb/gadget/atmel_usba_udc.c > @@ -1153,7 +1153,7 @@ static int usba_udc_irq(struct usba_udc *udc) > return 0; > } > > -static int atmel_usba_start(struct usba_udc *udc) > +static int usba_udc_enable(struct usba_udc *udc) > { > udc->devstatus = 1 << USB_DEVICE_SELF_POWERED; > > @@ -1168,7 +1168,7 @@ static int atmel_usba_start(struct usba_udc *udc) > return 0; > } > > -static int atmel_usba_stop(struct usba_udc *udc) > +static int usba_udc_disable(struct usba_udc *udc) > { > udc->gadget.speed = USB_SPEED_UNKNOWN; > reset_all_endpoints(udc); > @@ -1253,7 +1253,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) > return -EBUSY; > } > > - atmel_usba_start(udc); > + usba_udc_enable(udc); > > udc->driver = driver; > > @@ -1279,7 +1279,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) > driver->unbind(&udc->gadget); > udc->driver = NULL; > > - atmel_usba_stop(udc); > + usba_udc_disable(udc); > > return 0; > } > -- > 2.45.2
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index a3d24501ba..ea9ad7585e 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -1153,7 +1153,7 @@ static int usba_udc_irq(struct usba_udc *udc) return 0; } -static int atmel_usba_start(struct usba_udc *udc) +static int usba_udc_enable(struct usba_udc *udc) { udc->devstatus = 1 << USB_DEVICE_SELF_POWERED; @@ -1168,7 +1168,7 @@ static int atmel_usba_start(struct usba_udc *udc) return 0; } -static int atmel_usba_stop(struct usba_udc *udc) +static int usba_udc_disable(struct usba_udc *udc) { udc->gadget.speed = USB_SPEED_UNKNOWN; reset_all_endpoints(udc); @@ -1253,7 +1253,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) return -EBUSY; } - atmel_usba_start(udc); + usba_udc_enable(udc); udc->driver = driver; @@ -1279,7 +1279,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) driver->unbind(&udc->gadget); udc->driver = NULL; - atmel_usba_stop(udc); + usba_udc_disable(udc); return 0; }
Rename atmel_usba_start() / atmel_usba_stop() to usba_udc_enable() / usba_udc_disable(), remove atmel_ prefix to be inline with other functions. Also avoid confusion with DM start() / stop() functions. Signed-off-by: Zixun LI <zli@ogga.fr> --- drivers/usb/gadget/atmel_usba_udc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)