mirror of
https://xff.cz/git/u-boot/
synced 2025-10-10 04:26:51 +02:00
usb: gadget: Introduce handle_interrupts ops to USB_GADGET_GENERIC uclass
Introduce .ops for USB_GADGET_GENERIC uclass. The first new ops is .handle_interrupts which must be implemented by DM capable USB gadget controller drivers and must implement interrupt handling similar to dm_usb_gadget_handle_interrupts(). This patch currently provides weak dm_usb_gadget_handle_interrupts() implementation which is overridden by the drivers, but this will be removed once conversion to handle_interrupts callback is complete. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3 Link: https://lore.kernel.org/r/20240614005309.34433-2-marek.vasut+renesas@mailbox.org [mkorpershoek: fixed trivial typo in commit message] Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
committed by
Mattijs Korpershoek
parent
1918b8010c
commit
d36ef5cbed
@@ -970,6 +970,14 @@ extern void usb_ep_autoconfig_reset(struct usb_gadget *);
|
||||
|
||||
extern int dm_usb_gadget_handle_interrupts(struct udevice *);
|
||||
|
||||
/**
|
||||
* struct usb_gadget_generic_ops - The functions that a gadget driver must implement.
|
||||
* @handle_interrupts: Handle UDC interrupts.
|
||||
*/
|
||||
struct usb_gadget_generic_ops {
|
||||
int (*handle_interrupts)(struct udevice *udevice);
|
||||
};
|
||||
|
||||
/**
|
||||
* udc_device_get_by_index() - Get UDC udevice by index
|
||||
* @index: UDC device index
|
||||
|
Reference in New Issue
Block a user