aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/musb/musb_io.h
diff options
context:
space:
mode:
authorMin Guo <min.guo@mediatek.com>2020-01-15 07:25:42 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-15 14:46:58 +0100
commitfe3bbd6b383fbc62128fd1fe850105080cb4c9da (patch)
tree894744e30a18b9c3ce179712c68f2c2fd5eed71c /drivers/usb/musb/musb_io.h
parentdt-bindings: usb: musb: Add support for MediaTek musb controller (diff)
downloadwireguard-linux-fe3bbd6b383fbc62128fd1fe850105080cb4c9da.tar.xz
wireguard-linux-fe3bbd6b383fbc62128fd1fe850105080cb4c9da.zip
usb: musb: Add get/set toggle hooks
Add get/set toggle hooks in struct musb_io and struct musb_platform_ops for special platform; remove function musb_save_toggle, use the set/get callback to handle toggle. Signed-off-by: Min Guo <min.guo@mediatek.com> Signed-off-by: Bin Liu <b-liu@ti.com> Link: https://lore.kernel.org/r/20200115132547.364-21-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_io.h')
-rw-r--r--drivers/usb/musb/musb_io.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index 8058a58092cf..8179334f405b 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -22,6 +22,8 @@
* @read_fifo: platform specific function to read fifo
* @write_fifo: platform specific function to write fifo
* @busctl_offset: platform specific function to get busctl offset
+ * @get_toggle: platform specific function to get toggle
+ * @set_toggle: platform specific function to set toggle
*/
struct musb_io {
u32 (*ep_offset)(u8 epnum, u16 offset);
@@ -30,6 +32,8 @@ struct musb_io {
void (*read_fifo)(struct musb_hw_ep *hw_ep, u16 len, u8 *buf);
void (*write_fifo)(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf);
u32 (*busctl_offset)(u8 epnum, u16 offset);
+ u16 (*get_toggle)(struct musb_qh *qh, int is_out);
+ u16 (*set_toggle)(struct musb_qh *qh, int is_out, struct urb *urb);
};
/* Do not add new entries here, add them the struct musb_io instead */