usb: gadget: atmel: Add DM_USB_GADGET support
Add driver model support by using the uclass UCLASS_USB_GADGET_GENERIC. Disable local usb_gadget_register_driver()/usb_gadget_unregister_driver() implementation which is implemented in udc-core.c when DM_USB_GADGET is enabled. Replace dm_usb_gadget_handle_interrupts() with handle_interrupts ops when DM_USB_GADGET is enabled. Disable legacy struct usba_udc controller as controller point is extracted from udevice private data with DM. Disable legacy usba_udc_probe() to avoid conflict with DM when it's enabled. Compared to Linux driver only supported devices' DT bindings are included (sorted as Linux driver) Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240725153204.358925-8-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:

committed by
Mattijs Korpershoek

parent
ef5e1d1f97
commit
d6376f7ed8
@@ -20,6 +20,8 @@ struct usba_platform_data {
|
||||
struct usba_ep_data *ep;
|
||||
};
|
||||
|
||||
#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
|
||||
extern int usba_udc_probe(struct usba_platform_data *pdata);
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_USB_USBA_H */
|
||||
|
Reference in New Issue
Block a user