summaryrefslogtreecommitdiff
path: root/drivers/clk/qcom
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2024-10-22 10:05:21 +0200
committerBjorn Andersson <andersson@kernel.org>2024-10-22 21:46:35 -0500
commit05b2363b1359195f3c86c98abc133907f8769a69 (patch)
tree8473fff6cf5bf40269f73a965b729b3b8145909e /drivers/clk/qcom
parentf9b493de63eccf0fb6dc1549863590b9749f6f26 (diff)
downloadlwn-05b2363b1359195f3c86c98abc133907f8769a69.tar.gz
lwn-05b2363b1359195f3c86c98abc133907f8769a69.zip
clk: qcom: clk-alpha-pll: fix lucid 5lpe pll enabled check
The lucid 5lpe PLL enable check only checks for an impossible negative return value and does not actually return as intended in case the PLL is already enabled (e.g. has been left enabled by boot firmware). Fixes: f4c7e27aa4b6 ("clk: qcom: clk-alpha-pll: Add support for Lucid 5LPE PLL") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20241022080521.359-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/clk/qcom')
-rw-r--r--drivers/clk/qcom/clk-alpha-pll.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index 99d6962d25bb..bd1dbef04d9d 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -1903,9 +1903,8 @@ static int alpha_pll_lucid_5lpe_enable(struct clk_hw *hw)
}
/* Check if PLL is already enabled, return if enabled */
- ret = trion_pll_is_enabled(pll, pll->clkr.regmap);
- if (ret < 0)
- return ret;
+ if (trion_pll_is_enabled(pll, pll->clkr.regmap))
+ return 0;
ret = regmap_update_bits(pll->clkr.regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N);
if (ret)