summaryrefslogtreecommitdiffstats
path: root/drivers/usb/mtu3/mtu3.h
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-07-27 09:14:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 16:53:58 +0200
commitdc4c1aa7eae99d7a69717247cc6bd1c071407104 (patch)
treec43fcf1891d7a049f5efcac4b1f797e11e5b05bc /drivers/usb/mtu3/mtu3.h
parentusb: mtu3: introduce a funtion to check maximum speed (diff)
downloadlinux-dc4c1aa7eae99d7a69717247cc6bd1c071407104.tar.xz
linux-dc4c1aa7eae99d7a69717247cc6bd1c071407104.zip
usb: mtu3: add ->udc_set_speed()
Make use of the method to make sure connect on speeds supported by the gadget driver. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1595834101-13094-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3/mtu3.h')
-rw-r--r--drivers/usb/mtu3/mtu3.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index d49db92ab26c..9d68f25e4c85 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -348,7 +348,8 @@ struct mtu3 {
struct usb_gadget_driver *gadget_driver;
struct mtu3_request ep0_req;
u8 setup_buf[EP0_RESPONSE_BUF];
- u32 max_speed;
+ enum usb_device_speed max_speed;
+ enum usb_device_speed speed;
unsigned is_active:1;
unsigned may_wakeup:1;
@@ -433,6 +434,7 @@ void mtu3_ep0_setup(struct mtu3 *mtu);
void mtu3_start(struct mtu3 *mtu);
void mtu3_stop(struct mtu3 *mtu);
void mtu3_dev_on_off(struct mtu3 *mtu, int is_on);
+void mtu3_set_speed(struct mtu3 *mtu, enum usb_device_speed speed);
int mtu3_gadget_setup(struct mtu3 *mtu);
void mtu3_gadget_cleanup(struct mtu3 *mtu);