summaryrefslogtreecommitdiff
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
authorElson Roy Serrao <quic_eserrao@quicinc.com>2023-03-25 00:47:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-29 11:27:01 +0300
commitf0db885fb05d35befa81896db6b19eb3ee9ccdfe (patch)
tree5025f5f11cf8956fc5dc5b2f388c18b563a36a7f /include/linux/usb/gadget.h
parent047161686b813ae9035a3fb342ba8b6932053492 (diff)
downloadlinux-f0db885fb05d35befa81896db6b19eb3ee9ccdfe.tar.xz
usb: gadget: Add function wakeup support
USB3.2 spec section 9.2.5.4 quotes that a function may signal that it wants to exit from Function Suspend by sending a Function Wake Notification to the host if it is enabled for function remote wakeup. Add an api in composite layer that can be used by the function drivers to support this feature. Also expose a gadget op so that composite layer can trigger a wakeup request to the UDC driver. Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com> Link: https://lore.kernel.org/r/1679694482-16430-4-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 1d796128030b..75bda0783395 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -310,6 +310,7 @@ struct usb_udc;
struct usb_gadget_ops {
int (*get_frame)(struct usb_gadget *);
int (*wakeup)(struct usb_gadget *);
+ int (*func_wakeup)(struct usb_gadget *gadget, int intf_id);
int (*set_remote_wakeup)(struct usb_gadget *, int set);
int (*set_selfpowered) (struct usb_gadget *, int is_selfpowered);
int (*vbus_session) (struct usb_gadget *, int is_active);