Hi Marek, Thank you for the patch.
On ven., juin 14, 2024 at 02:51, Marek Vasut <marek.vasut+rene...@mailbox.org> wrote: > Implement .handle_interrupts callback as a replacement for deprecated > dm_usb_gadget_handle_interrupts() function. The new callback allows > for each DM capable USB gadget controller driver to define its own > IRQ handling implementation without colliding with other controller > drivers. > > Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org> Reviewed-by: Mattijs Korpershoek <mkorpersh...@baylibre.com> nitpick below (up to you if you want to fix it) > --- > Cc: Alexander Sverdlin <alexander.sverd...@siemens.com> > Cc: Felipe Balbi <felipe.ba...@linux.intel.com> > Cc: Lukasz Majewski <lu...@denx.de> > Cc: Mattijs Korpershoek <mkorpersh...@baylibre.com> > Cc: Nishanth Menon <n...@ti.com> > Cc: Simon Glass <s...@chromium.org> > Cc: Thinh Nguyen <thinh.ngu...@synopsys.com> > Cc: Tom Rini <tr...@konsulko.com> > Cc: u-boot@lists.denx.de > --- > drivers/usb/musb-new/ux500.c | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/musb-new/ux500.c b/drivers/usb/musb-new/ux500.c > index 6b4ef3c8578..89dd75b7d05 100644 > --- a/drivers/usb/musb-new/ux500.c > +++ b/drivers/usb/musb-new/ux500.c > @@ -91,14 +91,6 @@ static const struct musb_platform_ops ux500_musb_ops = { > .disable = ux500_musb_disable, > }; > > -int dm_usb_gadget_handle_interrupts(struct udevice *dev) > -{ > - struct ux500_glue *glue = dev_get_priv(dev); > - > - glue->mdata.host->isr(0, glue->mdata.host); > - return 0; > -} > - > static int ux500_musb_probe(struct udevice *dev) > { > #ifdef CONFIG_USB_MUSB_HOST > @@ -155,6 +147,19 @@ static int ux500_musb_remove(struct udevice *dev) > return 0; > } > > +static int ux500_gadget_handle_interrupts(struct udevice *dev) > +{ > + struct ux500_glue *glue = dev_get_priv(dev); > + > + glue->mdata.host->isr(0, glue->mdata.host); > + > + return 0; > +} > + > +static const struct usb_gadget_generic_ops ux500_gadget_ops = { > + .handle_interrupts = ux500_gadget_handle_interrupts, > +}; > + > static const struct udevice_id ux500_musb_ids[] = { > { .compatible = "stericsson,db8500-musb" }, > { } > @@ -168,6 +173,7 @@ U_BOOT_DRIVER(ux500_musb) = { > .id = UCLASS_USB_GADGET_GENERIC, > #endif > .of_match = ux500_musb_ids, > + .ops = &ux500_gadget_ops, In case of CONFIG_USB_MUSB_HOST=y, ops gets redefined below. Can we move this assignment below ``` .id = UCLASS_USB_GADGET_GENERIC, ``` ? > .probe = ux500_musb_probe, > .remove = ux500_musb_remove, > #ifdef CONFIG_USB_MUSB_HOST > -- > 2.43.0