FAILED: Patch "phy: qcom: edp: Make the number of clocks flexible" failed to apply to 6.12-stable tree
Subsystems (3)
Sasha Levin
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 7d51b709262c5aa31d2b9cd31444112c1b2dae03 Mon Sep 17 00:00:00 2001
From: Abel Vesa <[email protected]>
Date: Wed, 24 Dec 2025 12:53:28 +0200
Subject: [PATCH] phy: qcom: edp: Make the number of clocks flexible
On X Elite, the DP PHY needs another clock called ref, while all other platforms do not.
The current X Elite devices supported upstream work fine without this clock, because the boot firmware leaves this clock enabled. But we should not rely on that. Also, even though this change breaks the ABI, it is needed in order to make the driver disables this clock along with the other ones, for a proper bring-down of the entire PHY.
So in order to handle these clocks on different platforms, make the driver get all the clocks regardless of how many there are provided.
--- drivers/phy/qualcomm/phy-qcom-edp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/phy/qualcomm/phy-qcom-edp.c +8 -8
@@ -103,7 +103,9 @@ struct qcom_edp {struct phy_configure_opts_dp dp_opts; -struct clk_bulk_data clks[2 ]; +struct clk_bulk_data *clks; +int num_clks; +struct regulator_bulk_data supplies[2 ];bool is_edp;
@@ -218,7 +220,7 @@ static int qcom_edp_phy_init(struct phy *phy)if (ret)return ret; - ret =clk_bulk_prepare_enable (ARRAY_SIZE (edp->clks), edp->clks); + ret =clk_bulk_prepare_enable (edp->num_clks, edp->clks);if (ret) goto out_disable_supplies;
@@ -885,7 +887,7 @@ static int qcom_edp_phy_exit(struct phy *phy) {struct qcom_edp *edp =phy_get_drvdata (phy); -clk_bulk_disable_unprepare (ARRAY_SIZE (edp->clks), edp->clks); +clk_bulk_disable_unprepare (edp->num_clks, edp->clks);regulator_bulk_disable (ARRAY_SIZE (edp->supplies), edp->supplies);return 0 ;
@@ -1092,11 +1094,9 @@ static int qcom_edp_phy_probe(struct platform_device *pdev)if (IS_ERR (edp->pll))return PTR_ERR (edp->pll); - edp->clks[0 ].id ="aux" ; - edp->clks[1 ].id ="cfg_ahb" ; - ret =devm_clk_bulk_get (dev,ARRAY_SIZE (edp->clks), edp->clks); -if (ret) -return ret; + edp->num_clks =devm_clk_bulk_get_all (dev, &edp->clks); +if (edp->num_clks <0 ) +return dev_err_probe (dev, edp->num_clks,"failed to get clocks\n" ); edp->supplies[0 ].supply ="vdda-phy" ; edp->supplies[1 ].supply ="vdda-pll" ;
Signature · 1 line
2.51.0