]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: gadget: atmel: Add DM_USB_GADGET support
authorZixun LI <admin@hifiphile.com>
Thu, 25 Jul 2024 15:32:01 +0000 (17:32 +0200)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Tue, 6 Aug 2024 12:58:14 +0000 (14:58 +0200)
commitd6376f7ed823569acd8bb0fdfa501c040cfec36f
treeee4feec4130d0e40fc6e793aad18e8e1bdf4a74f
parentef5e1d1f97623f8c549c6fffd481bb120df12dcb
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>
drivers/usb/gadget/atmel_usba_udc.c
drivers/usb/gadget/atmel_usba_udc.h
include/linux/usb/atmel_usba_udc.h