Message ID | 20190424211208.17499-4-fancer.lancer@gmail.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 6e7adf3ea6133255deae219b8d6a57eee4ac9cf5 |
Headers | show |
Series | usb: usb251xb: Add upstream port lanes polarity inversion | expand |
On 24/04/2019 23:12, Serge Semin wrote: > 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> > --- > drivers/usb/misc/usb251xb.c | 2 ++ > 1 file changed, 2 insertions(+) Acked-by: Richard Leitner <richard.leitner@skidata.com>
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 4ef34df948ad..56f0a10633fc 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -531,6 +531,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.
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> --- drivers/usb/misc/usb251xb.c | 2 ++ 1 file changed, 2 insertions(+)