usb: gadget: Add function wakeup support
authorElson Roy Serrao <quic_eserrao@quicinc.com>
Fri, 24 Mar 2023 21:47:59 +0000 (14:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Mar 2023 08:27:01 +0000 (10:27 +0200)
commitf0db885fb05d35befa81896db6b19eb3ee9ccdfe
tree5025f5f11cf8956fc5dc5b2f388c18b563a36a7f
parent047161686b813ae9035a3fb342ba8b6932053492
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>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h
include/linux/usb/gadget.h