diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-13 12:26:40 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-13 12:26:40 -0500 |
| commit | 237f38c3b3ab08eadecc89b7c9647b1cdb996bbe (patch) | |
| tree | ed3740f13723f9082715d656d2bd3d37967ca858 /include/linux/usb | |
| parent | 67990608c8b95d2b8ccc29932376ae73d5818727 (diff) | |
| parent | 60d77b3d2229eaf29eddf0d7a7947c3c922b1a4d (diff) | |
Merge tag 'usb-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH:
"Here is the big USB drivers update for 4.5-rc1.
Lots of gadget driver updates and fixes, like usual, and a mix of
other USB driver updates as well. Full details in the shortlog. All
of these have been in linux-next for a while"
* tag 'usb-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (191 commits)
MAINTAINERS: change my email address
USB: usbmon: remove assignment from IS_ERR argument
USB: mxu11x0: drop redundant function name from error messages
USB: mxu11x0: fix debug-message typos
USB: mxu11x0: rename usb-serial driver
USB: mxu11x0: fix modem-control handling on B0-transitions
USB: mxu11x0: fix memory leak on firmware download
USB: mxu11x0: fix memory leak in port-probe error path
USB: serial: add Moxa UPORT 11x0 driver
USB: cp210x: add ID for ELV Marble Sound Board 1
usb: chipidea: otg: use usb autosuspend to suspend bus for HNP
usb: chipidea: host: set host to be null after hcd is freed
usb: chipidea: removing of_find_property
usb: chipidea: implement platform shutdown callback
usb: chipidea: clean up CONFIG_USB_CHIPIDEA_DEBUG reference
usb: chipidea: delete static debug support
usb: chipidea: support debugfs without CONFIG_USB_CHIPIDEA_DEBUG
usb: chipidea: udc: improve error handling on _hardware_enqueue
usb: chipidea: udc: _ep_queue and _hw_queue cleanup
usb: dwc3: of-simple: fix build warning on !PM
...
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/gadget.h | 11 | ||||
| -rw-r--r-- | include/linux/usb/hcd.h | 4 | ||||
| -rw-r--r-- | include/linux/usb/musb-omap.h | 30 | ||||
| -rw-r--r-- | include/linux/usb/musb.h | 15 | ||||
| -rw-r--r-- | include/linux/usb/of.h | 6 | ||||
| -rw-r--r-- | include/linux/usb/renesas_usbhs.h | 18 |
6 files changed, 48 insertions, 36 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 3d583a10b926..d82d0068872b 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -402,6 +402,9 @@ static inline void usb_ep_free_request(struct usb_ep *ep, | |||
| 402 | static inline int usb_ep_queue(struct usb_ep *ep, | 402 | static inline int usb_ep_queue(struct usb_ep *ep, |
| 403 | struct usb_request *req, gfp_t gfp_flags) | 403 | struct usb_request *req, gfp_t gfp_flags) |
| 404 | { | 404 | { |
| 405 | if (WARN_ON_ONCE(!ep->enabled && ep->address)) | ||
| 406 | return -ESHUTDOWN; | ||
| 407 | |||
| 405 | return ep->ops->queue(ep, req, gfp_flags); | 408 | return ep->ops->queue(ep, req, gfp_flags); |
| 406 | } | 409 | } |
| 407 | 410 | ||
| @@ -1012,6 +1015,9 @@ static inline int usb_gadget_activate(struct usb_gadget *gadget) | |||
| 1012 | * @reset: Invoked on USB bus reset. It is mandatory for all gadget drivers | 1015 | * @reset: Invoked on USB bus reset. It is mandatory for all gadget drivers |
| 1013 | * and should be called in_interrupt. | 1016 | * and should be called in_interrupt. |
| 1014 | * @driver: Driver model state for this driver. | 1017 | * @driver: Driver model state for this driver. |
| 1018 | * @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL, | ||
| 1019 | * this driver will be bound to any available UDC. | ||
| 1020 | * @pending: UDC core private data used for deferred probe of this driver. | ||
| 1015 | * | 1021 | * |
| 1016 | * Devices are disabled till a gadget driver successfully bind()s, which | 1022 | * Devices are disabled till a gadget driver successfully bind()s, which |
| 1017 | * means the driver will handle setup() requests needed to enumerate (and | 1023 | * means the driver will handle setup() requests needed to enumerate (and |
| @@ -1072,6 +1078,9 @@ struct usb_gadget_driver { | |||
| 1072 | 1078 | ||
| 1073 | /* FIXME support safe rmmod */ | 1079 | /* FIXME support safe rmmod */ |
| 1074 | struct device_driver driver; | 1080 | struct device_driver driver; |
| 1081 | |||
| 1082 | char *udc_name; | ||
| 1083 | struct list_head pending; | ||
| 1075 | }; | 1084 | }; |
| 1076 | 1085 | ||
| 1077 | 1086 | ||
| @@ -1117,8 +1126,6 @@ extern int usb_add_gadget_udc_release(struct device *parent, | |||
| 1117 | struct usb_gadget *gadget, void (*release)(struct device *dev)); | 1126 | struct usb_gadget *gadget, void (*release)(struct device *dev)); |
| 1118 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); | 1127 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); |
| 1119 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); | 1128 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); |
| 1120 | extern int usb_udc_attach_driver(const char *name, | ||
| 1121 | struct usb_gadget_driver *driver); | ||
| 1122 | 1129 | ||
| 1123 | /*-------------------------------------------------------------------------*/ | 1130 | /*-------------------------------------------------------------------------*/ |
| 1124 | 1131 | ||
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index f89c24bd53a4..4dcf8446dbcd 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -660,7 +660,7 @@ struct usb_mon_operations { | |||
| 660 | /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */ | 660 | /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */ |
| 661 | }; | 661 | }; |
| 662 | 662 | ||
| 663 | extern struct usb_mon_operations *mon_ops; | 663 | extern const struct usb_mon_operations *mon_ops; |
| 664 | 664 | ||
| 665 | static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb) | 665 | static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb) |
| 666 | { | 666 | { |
| @@ -682,7 +682,7 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb, | |||
| 682 | (*mon_ops->urb_complete)(bus, urb, status); | 682 | (*mon_ops->urb_complete)(bus, urb, status); |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | int usb_mon_register(struct usb_mon_operations *ops); | 685 | int usb_mon_register(const struct usb_mon_operations *ops); |
| 686 | void usb_mon_deregister(void); | 686 | void usb_mon_deregister(void); |
| 687 | 687 | ||
| 688 | #else | 688 | #else |
diff --git a/include/linux/usb/musb-omap.h b/include/linux/usb/musb-omap.h deleted file mode 100644 index 7774c5986f07..000000000000 --- a/include/linux/usb/musb-omap.h +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011-2012 by Texas Instruments | ||
| 3 | * | ||
| 4 | * The Inventra Controller Driver for Linux is free software; you | ||
| 5 | * can redistribute it and/or modify it under the terms of the GNU | ||
| 6 | * General Public License version 2 as published by the Free Software | ||
| 7 | * Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __MUSB_OMAP_H__ | ||
| 11 | #define __MUSB_OMAP_H__ | ||
| 12 | |||
| 13 | enum omap_musb_vbus_id_status { | ||
| 14 | OMAP_MUSB_UNKNOWN = 0, | ||
| 15 | OMAP_MUSB_ID_GROUND, | ||
| 16 | OMAP_MUSB_ID_FLOAT, | ||
| 17 | OMAP_MUSB_VBUS_VALID, | ||
| 18 | OMAP_MUSB_VBUS_OFF, | ||
| 19 | }; | ||
| 20 | |||
| 21 | #if (defined(CONFIG_USB_MUSB_OMAP2PLUS) || \ | ||
| 22 | defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE)) | ||
| 23 | void omap_musb_mailbox(enum omap_musb_vbus_id_status status); | ||
| 24 | #else | ||
| 25 | static inline void omap_musb_mailbox(enum omap_musb_vbus_id_status status) | ||
| 26 | { | ||
| 27 | } | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #endif /* __MUSB_OMAP_H__ */ | ||
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index fa6dc132bd1b..96ddfb7ab018 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
| @@ -133,6 +133,21 @@ struct musb_hdrc_platform_data { | |||
| 133 | const void *platform_ops; | 133 | const void *platform_ops; |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | enum musb_vbus_id_status { | ||
| 137 | MUSB_UNKNOWN = 0, | ||
| 138 | MUSB_ID_GROUND, | ||
| 139 | MUSB_ID_FLOAT, | ||
| 140 | MUSB_VBUS_VALID, | ||
| 141 | MUSB_VBUS_OFF, | ||
| 142 | }; | ||
| 143 | |||
| 144 | #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) | ||
| 145 | void musb_mailbox(enum musb_vbus_id_status status); | ||
| 146 | #else | ||
| 147 | static inline void musb_mailbox(enum musb_vbus_id_status status) | ||
| 148 | { | ||
| 149 | } | ||
| 150 | #endif | ||
| 136 | 151 | ||
| 137 | /* TUSB 6010 support */ | 152 | /* TUSB 6010 support */ |
| 138 | 153 | ||
diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h index c3fe9e48ce27..974bce93aa28 100644 --- a/include/linux/usb/of.h +++ b/include/linux/usb/of.h | |||
| @@ -12,10 +12,16 @@ | |||
| 12 | #include <linux/usb/phy.h> | 12 | #include <linux/usb/phy.h> |
| 13 | 13 | ||
| 14 | #if IS_ENABLED(CONFIG_OF) | 14 | #if IS_ENABLED(CONFIG_OF) |
| 15 | enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np); | ||
| 15 | bool of_usb_host_tpl_support(struct device_node *np); | 16 | bool of_usb_host_tpl_support(struct device_node *np); |
| 16 | int of_usb_update_otg_caps(struct device_node *np, | 17 | int of_usb_update_otg_caps(struct device_node *np, |
| 17 | struct usb_otg_caps *otg_caps); | 18 | struct usb_otg_caps *otg_caps); |
| 18 | #else | 19 | #else |
| 20 | static inline enum usb_dr_mode | ||
| 21 | of_usb_get_dr_mode_by_phy(struct device_node *phy_np) | ||
| 22 | { | ||
| 23 | return USB_DR_MODE_UNKNOWN; | ||
| 24 | } | ||
| 19 | static inline bool of_usb_host_tpl_support(struct device_node *np) | 25 | static inline bool of_usb_host_tpl_support(struct device_node *np) |
| 20 | { | 26 | { |
| 21 | return false; | 27 | return false; |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index bfb74723f151..4db191fe8c2c 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
| @@ -105,12 +105,26 @@ struct renesas_usbhs_platform_callback { | |||
| 105 | * some register needs USB chip specific parameters. | 105 | * some register needs USB chip specific parameters. |
| 106 | * This struct show it to driver | 106 | * This struct show it to driver |
| 107 | */ | 107 | */ |
| 108 | |||
| 109 | struct renesas_usbhs_driver_pipe_config { | ||
| 110 | u8 type; /* USB_ENDPOINT_XFER_xxx */ | ||
| 111 | u16 bufsize; | ||
| 112 | u8 bufnum; | ||
| 113 | bool double_buf; | ||
| 114 | }; | ||
| 115 | #define RENESAS_USBHS_PIPE(_type, _size, _num, _double_buf) { \ | ||
| 116 | .type = (_type), \ | ||
| 117 | .bufsize = (_size), \ | ||
| 118 | .bufnum = (_num), \ | ||
| 119 | .double_buf = (_double_buf), \ | ||
| 120 | } | ||
| 121 | |||
| 108 | struct renesas_usbhs_driver_param { | 122 | struct renesas_usbhs_driver_param { |
| 109 | /* | 123 | /* |
| 110 | * pipe settings | 124 | * pipe settings |
| 111 | */ | 125 | */ |
| 112 | u32 *pipe_type; /* array of USB_ENDPOINT_XFER_xxx (from ep0) */ | 126 | struct renesas_usbhs_driver_pipe_config *pipe_configs; |
| 113 | int pipe_size; /* pipe_type array size */ | 127 | int pipe_size; /* pipe_configs array size */ |
| 114 | 128 | ||
| 115 | /* | 129 | /* |
| 116 | * option: | 130 | * option: |
