summaryrefslogtreecommitdiff
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2019-04-25 00:12:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-02 19:28:56 +0200
commit6e7adf3ea6133255deae219b8d6a57eee4ac9cf5 (patch)
treec85239edab14d3164b7078eac1e1c1a51c3cccc3 /drivers/usb/misc
parent73d31def1aabd2a57b85bd2e48d244a5d5a2f58d (diff)
usb: usb251xb: Add US port lanes inversion property
The driver bindings already declare the "swap-dx-lanes" property to invert the downstream ports lanes polarity. The similar config can be defined for a single upstream port - "swap-us-lanes". It's going to be boolean since there is only one upstream port on the hub. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Acked-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/usb251xb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 119aeb658c81..4d6ae3795a88 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -574,6 +574,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
hub->port_swap = USB251XB_DEF_PORT_SWAP;
usb251xb_get_ports_field(hub, "swap-dx-lanes", data->port_cnt,
&hub->port_swap);
+ if (of_get_property(np, "swap-us-lanes", NULL))
+ hub->port_swap |= BIT(0);
/* The following parameters are currently not exposed to devicetree, but
* may be as soon as needed.