]> git.baikalelectronics.ru Git - kernel.git/commit
usb: usb251xb: Create a ports field collector method
authorSerge Semin <fancer.lancer@gmail.com>
Wed, 24 Apr 2019 21:12:06 +0000 (00:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 17:28:56 +0000 (19:28 +0200)
commitb54bcb57d7c3e6669a36dd09180d554f23ba1d20
treea3891a572ffc871be1b8cc68939f9701967c86fc
parent12e490b0d0b294052b3a98a523b128221fde25d9
usb: usb251xb: Create a ports field collector method

Seeing the ports field collection functionality is used four times per
just one function, it's better to have a dedicated method performing
the task. Note that this fix filters the port 0 out from the lanes
swapping property the same way as it has been programmed for the rest
multi-ports properties. But unlike the rest of ports config registers
the BIT(0) of the Port Lanes Swap register refers to the Upstream Port
lanes inversion. This fact hasn't been documented in the driver bindings
nor there were any mentioning about port 0 being treated as upstream
port. Lets then leave this fix as is for the properties unification
and create an additional "swap-us-lanes" in the next patch.

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>
drivers/usb/misc/usb251xb.c