OSDN Git Service

usb: mtu3: support function remote wakeup
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Fri, 8 Jul 2022 07:19:03 +0000 (15:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 12:53:30 +0000 (14:53 +0200)
commit1742b765982cd6d9d5e76ba040598981d53e0a0f
tree01f45c6e9e0e6a5bc4d445425811d2644e09c65b
parent683ff6e485f1d16fe3ad4f5fbd04af11ce917caf
usb: mtu3: support function remote wakeup

Add function wake notification to support function remote wakeup,
currently assume the composite device only enable function wake
for the first interface.

Forward request to function driver when the recipient is an interface,
including:
GetStatus() request to the first interface in a function returns the
information about 'function remote wakeup' and 'function remote wakeup
capalbe';
SetFeature request of FUNCTION_SUSPEND to an interface recipient, the
controller driver saves the suspend option;

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220708071903.25752-5-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_gadget.c
drivers/usb/mtu3/mtu3_gadget_ep0.c
drivers/usb/mtu3/mtu3_hw_regs.h