diff options
| author | Marek Vasut <[email protected]> | 2024-06-14 02:51:16 +0200 |
|---|---|---|
| committer | Mattijs Korpershoek <[email protected]> | 2024-07-05 14:06:05 +0200 |
| commit | d36ef5cbedd08e9a11c6a719d853f1003173133e (patch) | |
| tree | 124a7515e90a5b18c5201ed519c78ac478a15d2c /include/linux | |
| parent | 1918b8010c321c939fdedd6e461ccac87e0d3415 (diff) | |
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 <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Tested-by: Alexander Sverdlin <[email protected]>
Tested-by: Mattijs Korpershoek <[email protected]> # vim3
Link: https://lore.kernel.org/r/[email protected]
[mkorpershoek: fixed trivial typo in commit message]
Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/usb/gadget.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 36572be89e6..cf2161603d6 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -971,6 +971,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 * @udev: UDC udevice matching the index (if found) |
