Skip to content

Commit 3463321

Browse files
anderssonvinodkoul
authored andcommitted
phy: qmp: Provide unique clock names for DP clocks
The USB/DP combo PHY exposes the "qmp_dp_phy_pll_link_clk" and "qmp_dp_phy_pll_vco_div_clk" clocks, that are consumed by the display clock controller. But for boards with multiple enabled QMP USB/DP combo instances the hard coded names collides - and hence only the first probed device is allowed to register. Given that clocks are no longer reference globally by name and it's possible to replace the hard coded names by something unique, but still user friendly. The two new clock names are based on dev_name() and results in names such as "88ee000.phy::link_clk" and "88ee000.phy::vco_div_clk". Signed-off-by: Bjorn Andersson <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 89161cd commit 3463321

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5195,6 +5195,7 @@ static int phy_dp_clks_register(struct qcom_qmp *qmp, struct qmp_phy *qphy,
51955195
{
51965196
struct clk_init_data init = { };
51975197
struct qmp_phy_dp_clks *dp_clks;
5198+
char name[64];
51985199
int ret;
51995200

52005201
dp_clks = devm_kzalloc(qmp->dev, sizeof(*dp_clks), GFP_KERNEL);
@@ -5204,15 +5205,17 @@ static int phy_dp_clks_register(struct qcom_qmp *qmp, struct qmp_phy *qphy,
52045205
dp_clks->qphy = qphy;
52055206
qphy->dp_clks = dp_clks;
52065207

5208+
snprintf(name, sizeof(name), "%s::link_clk", dev_name(qmp->dev));
52075209
init.ops = &qcom_qmp_dp_link_clk_ops;
5208-
init.name = "qmp_dp_phy_pll_link_clk";
5210+
init.name = name;
52095211
dp_clks->dp_link_hw.init = &init;
52105212
ret = devm_clk_hw_register(qmp->dev, &dp_clks->dp_link_hw);
52115213
if (ret)
52125214
return ret;
52135215

5216+
snprintf(name, sizeof(name), "%s::vco_div_clk", dev_name(qmp->dev));
52145217
init.ops = &qcom_qmp_dp_pixel_clk_ops;
5215-
init.name = "qmp_dp_phy_pll_vco_div_clk";
5218+
init.name = name;
52165219
dp_clks->dp_pixel_hw.init = &init;
52175220
ret = devm_clk_hw_register(qmp->dev, &dp_clks->dp_pixel_hw);
52185221
if (ret)

0 commit comments

Comments
 (0)