summaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-02-13 02:45:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-14 04:52:25 -0500
commitec69e9533c4879c81eb7122771792864eb49af35 (patch)
tree25afd3f9bc970b7f21838a90b88c2340344c0399 /include/linux/usb
parent80e04837a40f6f1c8e93437be3f772c967a41d2f (diff)
usb: roles: Find the muxes by also matching against the device node
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Acked-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Jun Li <jun.li@nxp.com> Tested-by: Jun Li <jun.li@nxp.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/role.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/role.h b/include/linux/usb/role.h
index edc51be4a77c..c05ffa6abda9 100644
--- a/include/linux/usb/role.h
+++ b/include/linux/usb/role.h
@@ -18,6 +18,7 @@ typedef enum usb_role (*usb_role_switch_get_t)(struct device *dev);
18 18
19/** 19/**
20 * struct usb_role_switch_desc - USB Role Switch Descriptor 20 * struct usb_role_switch_desc - USB Role Switch Descriptor
21 * @fwnode: The device node to be associated with the role switch
21 * @usb2_port: Optional reference to the host controller port device (USB2) 22 * @usb2_port: Optional reference to the host controller port device (USB2)
22 * @usb3_port: Optional reference to the host controller port device (USB3) 23 * @usb3_port: Optional reference to the host controller port device (USB3)
23 * @udc: Optional reference to the peripheral controller device 24 * @udc: Optional reference to the peripheral controller device
@@ -32,6 +33,7 @@ typedef enum usb_role (*usb_role_switch_get_t)(struct device *dev);
32 * usb_role_switch_register() before registering the switch. 33 * usb_role_switch_register() before registering the switch.
33 */ 34 */
34struct usb_role_switch_desc { 35struct usb_role_switch_desc {
36 struct fwnode_handle *fwnode;
35 struct device *usb2_port; 37 struct device *usb2_port;
36 struct device *usb3_port; 38 struct device *usb3_port;
37 struct device *udc; 39 struct device *udc;