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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
80e04837a4
commit
ec69e9533c
@@ -18,6 +18,7 @@ typedef enum usb_role (*usb_role_switch_get_t)(struct device *dev);
|
||||
|
||||
/**
|
||||
* struct usb_role_switch_desc - USB Role Switch Descriptor
|
||||
* @fwnode: The device node to be associated with the role switch
|
||||
* @usb2_port: Optional reference to the host controller port device (USB2)
|
||||
* @usb3_port: Optional reference to the host controller port device (USB3)
|
||||
* @udc: Optional reference to the peripheral controller device
|
||||
@@ -32,6 +33,7 @@ typedef enum usb_role (*usb_role_switch_get_t)(struct device *dev);
|
||||
* usb_role_switch_register() before registering the switch.
|
||||
*/
|
||||
struct usb_role_switch_desc {
|
||||
struct fwnode_handle *fwnode;
|
||||
struct device *usb2_port;
|
||||
struct device *usb3_port;
|
||||
struct device *udc;
|
||||
|
Reference in New Issue
Block a user