}
#endif
-int dm_usb_gadget_handle_interrupts(struct udevice *dev)
-{
- struct ti_musb_peripheral *priv = dev_get_priv(dev);
-
- priv->periph->isr(0, priv->periph);
-
- return 0;
-}
-
static int ti_musb_peripheral_probe(struct udevice *dev)
{
struct ti_musb_peripheral *priv = dev_get_priv(dev);
return 0;
}
+static int ti_musb_gadget_handle_interrupts(struct udevice *dev)
+{
+ struct ti_musb_peripheral *priv = dev_get_priv(dev);
+
+ priv->periph->isr(0, priv->periph);
+
+ return 0;
+}
+
+static const struct usb_gadget_generic_ops ti_musb_gadget_ops = {
+ .handle_interrupts = ti_musb_gadget_handle_interrupts,
+};
+
U_BOOT_DRIVER(ti_musb_peripheral) = {
.name = "ti-musb-peripheral",
.id = UCLASS_USB_GADGET_GENERIC,
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_to_plat = ti_musb_peripheral_of_to_plat,
#endif
+ .ops = &ti_musb_gadget_ops,
.probe = ti_musb_peripheral_probe,
.remove = ti_musb_peripheral_remove,
.ops = &musb_usb_ops,