Skip to content

Commit 526103b

Browse files
jhovoldvinodkoul
authored andcommitted
phy: qcom-qmp-combo: clean up DP callback names
Clean up and unify the DP callbacks by dropping the redundant "qcom" and "phy" prefix and infix and by using a common naming scheme ("qmp" + version + callback name). Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 44aff8e commit 526103b

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-combo.c

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -903,17 +903,17 @@ struct qmp_combo {
903903
struct qmp_phy_dp_clks *dp_clks;
904904
};
905905

906-
static void qcom_qmp_v3_phy_dp_aux_init(struct qmp_combo *qmp);
907-
static void qcom_qmp_v3_phy_configure_dp_tx(struct qmp_combo *qmp);
908-
static int qcom_qmp_v3_phy_configure_dp_phy(struct qmp_combo *qmp);
909-
static int qcom_qmp_v3_dp_phy_calibrate(struct qmp_combo *qmp);
906+
static void qmp_v3_dp_aux_init(struct qmp_combo *qmp);
907+
static void qmp_v3_configure_dp_tx(struct qmp_combo *qmp);
908+
static int qmp_v3_configure_dp_phy(struct qmp_combo *qmp);
909+
static int qmp_v3_calibrate_dp_phy(struct qmp_combo *qmp);
910910

911-
static void qcom_qmp_v4_phy_dp_aux_init(struct qmp_combo *qmp);
912-
static void qcom_qmp_v4_phy_configure_dp_tx(struct qmp_combo *qmp);
913-
static int qcom_qmp_v4_phy_configure_dp_phy(struct qmp_combo *qmp);
914-
static int qcom_qmp_v4_dp_phy_calibrate(struct qmp_combo *qmp);
911+
static void qmp_v4_dp_aux_init(struct qmp_combo *qmp);
912+
static void qmp_v4_configure_dp_tx(struct qmp_combo *qmp);
913+
static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp);
914+
static int qmp_v4_calibrate_dp_phy(struct qmp_combo *qmp);
915915

916-
static int qcom_qmp_v5_phy_configure_dp_phy(struct qmp_combo *qmp);
916+
static int qmp_v5_configure_dp_phy(struct qmp_combo *qmp);
917917

918918
static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val)
919919
{
@@ -991,10 +991,10 @@ static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = {
991991
.swing_hbr3_hbr2 = &qmp_dp_v3_voltage_swing_hbr3_hbr2,
992992
.pre_emphasis_hbr3_hbr2 = &qmp_dp_v3_pre_emphasis_hbr3_hbr2,
993993

994-
.dp_aux_init = qcom_qmp_v3_phy_dp_aux_init,
995-
.configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx,
996-
.configure_dp_phy = qcom_qmp_v3_phy_configure_dp_phy,
997-
.calibrate_dp_phy = qcom_qmp_v3_dp_phy_calibrate,
994+
.dp_aux_init = qmp_v3_dp_aux_init,
995+
.configure_dp_tx = qmp_v3_configure_dp_tx,
996+
.configure_dp_phy = qmp_v3_configure_dp_phy,
997+
.calibrate_dp_phy = qmp_v3_calibrate_dp_phy,
998998

999999
.clk_list = qmp_v3_phy_clk_l,
10001000
.num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l),
@@ -1036,10 +1036,10 @@ static const struct qmp_phy_cfg sdm845_usb3dpphy_cfg = {
10361036
.swing_hbr3_hbr2 = &qmp_dp_v3_voltage_swing_hbr3_hbr2,
10371037
.pre_emphasis_hbr3_hbr2 = &qmp_dp_v3_pre_emphasis_hbr3_hbr2,
10381038

1039-
.dp_aux_init = qcom_qmp_v3_phy_dp_aux_init,
1040-
.configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx,
1041-
.configure_dp_phy = qcom_qmp_v3_phy_configure_dp_phy,
1042-
.calibrate_dp_phy = qcom_qmp_v3_dp_phy_calibrate,
1039+
.dp_aux_init = qmp_v3_dp_aux_init,
1040+
.configure_dp_tx = qmp_v3_configure_dp_tx,
1041+
.configure_dp_phy = qmp_v3_configure_dp_phy,
1042+
.calibrate_dp_phy = qmp_v3_calibrate_dp_phy,
10431043

10441044
.clk_list = qmp_v3_phy_clk_l,
10451045
.num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l),
@@ -1083,10 +1083,10 @@ static const struct qmp_phy_cfg sc8180x_usb3dpphy_cfg = {
10831083
.swing_hbr3_hbr2 = &qmp_dp_v3_voltage_swing_hbr3_hbr2,
10841084
.pre_emphasis_hbr3_hbr2 = &qmp_dp_v3_pre_emphasis_hbr3_hbr2,
10851085

1086-
.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
1087-
.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
1088-
.configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy,
1089-
.calibrate_dp_phy = qcom_qmp_v4_dp_phy_calibrate,
1086+
.dp_aux_init = qmp_v4_dp_aux_init,
1087+
.configure_dp_tx = qmp_v4_configure_dp_tx,
1088+
.configure_dp_phy = qmp_v4_configure_dp_phy,
1089+
.calibrate_dp_phy = qmp_v4_calibrate_dp_phy,
10901090

10911091
.clk_list = qmp_v4_phy_clk_l,
10921092
.num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l),
@@ -1129,10 +1129,10 @@ static const struct qmp_phy_cfg sc8280xp_usb43dpphy_cfg = {
11291129
.swing_hbr3_hbr2 = &qmp_dp_v5_voltage_swing_hbr3_hbr2,
11301130
.pre_emphasis_hbr3_hbr2 = &qmp_dp_v5_pre_emphasis_hbr3_hbr2,
11311131

1132-
.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
1133-
.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
1134-
.configure_dp_phy = qcom_qmp_v5_phy_configure_dp_phy,
1135-
.calibrate_dp_phy = qcom_qmp_v4_dp_phy_calibrate,
1132+
.dp_aux_init = qmp_v4_dp_aux_init,
1133+
.configure_dp_tx = qmp_v4_configure_dp_tx,
1134+
.configure_dp_phy = qmp_v5_configure_dp_phy,
1135+
.calibrate_dp_phy = qmp_v4_calibrate_dp_phy,
11361136

11371137
.clk_list = qmp_v4_phy_clk_l,
11381138
.num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l),
@@ -1175,10 +1175,10 @@ static const struct qmp_phy_cfg sm8250_usb3dpphy_cfg = {
11751175
.swing_hbr3_hbr2 = &qmp_dp_v3_voltage_swing_hbr3_hbr2,
11761176
.pre_emphasis_hbr3_hbr2 = &qmp_dp_v3_pre_emphasis_hbr3_hbr2,
11771177

1178-
.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
1179-
.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
1180-
.configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy,
1181-
.calibrate_dp_phy = qcom_qmp_v4_dp_phy_calibrate,
1178+
.dp_aux_init = qmp_v4_dp_aux_init,
1179+
.configure_dp_tx = qmp_v4_configure_dp_tx,
1180+
.configure_dp_phy = qmp_v4_configure_dp_phy,
1181+
.calibrate_dp_phy = qmp_v4_calibrate_dp_phy,
11821182

11831183
.clk_list = qmp_v4_sm8250_usbphy_clk_l,
11841184
.num_clks = ARRAY_SIZE(qmp_v4_sm8250_usbphy_clk_l),
@@ -1251,7 +1251,7 @@ static int qmp_combo_dp_serdes_init(struct qmp_combo *qmp)
12511251
return 0;
12521252
}
12531253

1254-
static void qcom_qmp_v3_phy_dp_aux_init(struct qmp_combo *qmp)
1254+
static void qmp_v3_dp_aux_init(struct qmp_combo *qmp)
12551255
{
12561256
writel(DP_PHY_PD_CTL_PWRDN | DP_PHY_PD_CTL_AUX_PWRDN |
12571257
DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN,
@@ -1332,7 +1332,7 @@ static int qmp_combo_configure_dp_swing(struct qmp_combo *qmp,
13321332
return 0;
13331333
}
13341334

1335-
static void qcom_qmp_v3_phy_configure_dp_tx(struct qmp_combo *qmp)
1335+
static void qmp_v3_configure_dp_tx(struct qmp_combo *qmp)
13361336
{
13371337
const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
13381338
u32 bias_en, drvr_en;
@@ -1385,7 +1385,7 @@ static bool qmp_combo_configure_dp_mode(struct qmp_combo *qmp)
13851385
return reverse;
13861386
}
13871387

1388-
static int qcom_qmp_v3_phy_configure_dp_phy(struct qmp_combo *qmp)
1388+
static int qmp_v3_configure_dp_phy(struct qmp_combo *qmp)
13891389
{
13901390
const struct qmp_phy_dp_clks *dp_clks = qmp->dp_clks;
13911391
const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
@@ -1462,7 +1462,7 @@ static int qcom_qmp_v3_phy_configure_dp_phy(struct qmp_combo *qmp)
14621462
* We need to calibrate the aux setting here as many times
14631463
* as the caller tries
14641464
*/
1465-
static int qcom_qmp_v3_dp_phy_calibrate(struct qmp_combo *qmp)
1465+
static int qmp_v3_calibrate_dp_phy(struct qmp_combo *qmp)
14661466
{
14671467
static const u8 cfg1_settings[] = { 0x13, 0x23, 0x1d };
14681468
u8 val;
@@ -1476,7 +1476,7 @@ static int qcom_qmp_v3_dp_phy_calibrate(struct qmp_combo *qmp)
14761476
return 0;
14771477
}
14781478

1479-
static void qcom_qmp_v4_phy_dp_aux_init(struct qmp_combo *qmp)
1479+
static void qmp_v4_dp_aux_init(struct qmp_combo *qmp)
14801480
{
14811481
writel(DP_PHY_PD_CTL_PWRDN | DP_PHY_PD_CTL_PSR_PWRDN | DP_PHY_PD_CTL_AUX_PWRDN |
14821482
DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN,
@@ -1503,7 +1503,7 @@ static void qcom_qmp_v4_phy_dp_aux_init(struct qmp_combo *qmp)
15031503
qmp->dp_pcs + QSERDES_V4_DP_PHY_AUX_INTERRUPT_MASK);
15041504
}
15051505

1506-
static void qcom_qmp_v4_phy_configure_dp_tx(struct qmp_combo *qmp)
1506+
static void qmp_v4_configure_dp_tx(struct qmp_combo *qmp)
15071507
{
15081508
/* Program default values before writing proper values */
15091509
writel(0x27, qmp->dp_tx + QSERDES_V4_TX_TX_DRV_LVL);
@@ -1516,7 +1516,7 @@ static void qcom_qmp_v4_phy_configure_dp_tx(struct qmp_combo *qmp)
15161516
QSERDES_V4_TX_TX_EMP_POST1_LVL);
15171517
}
15181518

1519-
static int qcom_qmp_v45_phy_configure_dp_phy(struct qmp_combo *qmp)
1519+
static int qmp_v45_configure_dp_phy(struct qmp_combo *qmp)
15201520
{
15211521
const struct qmp_phy_dp_clks *dp_clks = qmp->dp_clks;
15221522
const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
@@ -1606,15 +1606,15 @@ static int qcom_qmp_v45_phy_configure_dp_phy(struct qmp_combo *qmp)
16061606
return 0;
16071607
}
16081608

1609-
static int qcom_qmp_v4_phy_configure_dp_phy(struct qmp_combo *qmp)
1609+
static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp)
16101610
{
16111611
const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
16121612
u32 bias0_en, drvr0_en, bias1_en, drvr1_en;
16131613
bool reverse = false;
16141614
u32 status;
16151615
int ret;
16161616

1617-
ret = qcom_qmp_v45_phy_configure_dp_phy(qmp);
1617+
ret = qmp_v45_configure_dp_phy(qmp);
16181618
if (ret < 0)
16191619
return ret;
16201620

@@ -1668,15 +1668,15 @@ static int qcom_qmp_v4_phy_configure_dp_phy(struct qmp_combo *qmp)
16681668
return 0;
16691669
}
16701670

1671-
static int qcom_qmp_v5_phy_configure_dp_phy(struct qmp_combo *qmp)
1671+
static int qmp_v5_configure_dp_phy(struct qmp_combo *qmp)
16721672
{
16731673
const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
16741674
u32 bias0_en, drvr0_en, bias1_en, drvr1_en;
16751675
bool reverse = false;
16761676
u32 status;
16771677
int ret;
16781678

1679-
ret = qcom_qmp_v45_phy_configure_dp_phy(qmp);
1679+
ret = qmp_v45_configure_dp_phy(qmp);
16801680
if (ret < 0)
16811681
return ret;
16821682

@@ -1729,7 +1729,7 @@ static int qcom_qmp_v5_phy_configure_dp_phy(struct qmp_combo *qmp)
17291729
* We need to calibrate the aux setting here as many times
17301730
* as the caller tries
17311731
*/
1732-
static int qcom_qmp_v4_dp_phy_calibrate(struct qmp_combo *qmp)
1732+
static int qmp_v4_calibrate_dp_phy(struct qmp_combo *qmp)
17331733
{
17341734
static const u8 cfg1_settings[] = { 0x20, 0x13, 0x23, 0x1d };
17351735
u8 val;

0 commit comments

Comments
 (0)