phy: tusb1210: use bitmasks to set VENDOR_SPECIFIC2
authorLiam Beguin <lvb@xiphos.com>
Fri, 11 Dec 2020 19:12:41 +0000 (14:12 -0500)
committerVinod Koul <vkoul@kernel.org>
Fri, 12 Mar 2021 10:03:05 +0000 (15:33 +0530)
commiteb445a15fa6910dd25b2fc1217ac39f47104b7d6
treef75a88c0725dbf256f5452f40e0131b870ac7539
parent015acd5d3addb0e2cae1c4e1ed81d5f0a1c785ad
phy: tusb1210: use bitmasks to set VENDOR_SPECIFIC2

Start by reading the content of the VENDOR_SPECIFIC2 register and update
each bit field based on device properties when defined.

The use of bit masks prevents fields from overriding each other and
enables users to clear bits which are set by default, like datapolarity
in this instance.

Signed-off-by: Liam Beguin <lvb@xiphos.com>
Link: https://lore.kernel.org/r/20201211191241.21306-1-liambeguin@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/ti/phy-tusb1210.c