[PATCH v2 4/7] clk: rockchip: clean-up simple provider misuse of the consumer API

From: Jerome Brunet

Date: Fri Jul 24 2026 - 05:08:32 EST


Clock provider should not be using the consumer interface.
In other words, a provider should not be dealing with struct clk.

This change targets occurrences for which the provider uses the
consumer interface and corresponding clk_hw interface exist.

Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>
Signed-off-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
---
drivers/clk/rockchip/clk-pll.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index 6b853800cb6b..89a783204f0e 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -259,13 +259,13 @@ static int rockchip_rk3036_pll_set_rate(struct clk_hw *hw, unsigned long drate,
const struct rockchip_pll_rate_table *rate;

pr_debug("%s: changing %s to %lu with a parent rate of %lu\n",
- __func__, __clk_get_name(hw->clk), drate, prate);
+ __func__, clk_hw_get_name(hw), drate, prate);

/* Get required rate settings from table */
rate = rockchip_get_pll_settings(pll, drate);
if (!rate) {
pr_err("%s: Invalid rate : %lu for pll clk %s\n", __func__,
- drate, __clk_get_name(hw->clk));
+ drate, clk_hw_get_name(hw));
return -EINVAL;
}

@@ -319,7 +319,7 @@ static int rockchip_rk3036_pll_init(struct clk_hw *hw)

rockchip_rk3036_pll_get_params(pll, &cur);

- pr_debug("%s: pll %s@%lu: Hz\n", __func__, __clk_get_name(hw->clk),
+ pr_debug("%s: pll %s@%lu: Hz\n", __func__, clk_hw_get_name(hw),
drate);
pr_debug("old - fbdiv: %d, postdiv1: %d, refdiv: %d, postdiv2: %d, dsmpd: %d, frac: %d\n",
cur.fbdiv, cur.postdiv1, cur.refdiv, cur.postdiv2,
@@ -336,12 +336,12 @@ static int rockchip_rk3036_pll_init(struct clk_hw *hw)

if (!parent) {
pr_warn("%s: parent of %s not available\n",
- __func__, __clk_get_name(hw->clk));
+ __func__, clk_hw_get_name(hw));
return 0;
}

pr_debug("%s: pll %s: rate params do not match rate table, adjusting\n",
- __func__, __clk_get_name(hw->clk));
+ __func__, clk_hw_get_name(hw));
rockchip_rk3036_pll_set_params(pll, rate);
}

@@ -743,13 +743,13 @@ static int rockchip_rk3399_pll_set_rate(struct clk_hw *hw, unsigned long drate,
const struct rockchip_pll_rate_table *rate;

pr_debug("%s: changing %s to %lu with a parent rate of %lu\n",
- __func__, __clk_get_name(hw->clk), drate, prate);
+ __func__, clk_hw_get_name(hw), drate, prate);

/* Get required rate settings from table */
rate = rockchip_get_pll_settings(pll, drate);
if (!rate) {
pr_err("%s: Invalid rate : %lu for pll clk %s\n", __func__,
- drate, __clk_get_name(hw->clk));
+ drate, clk_hw_get_name(hw));
return -EINVAL;
}

@@ -803,7 +803,7 @@ static int rockchip_rk3399_pll_init(struct clk_hw *hw)

rockchip_rk3399_pll_get_params(pll, &cur);

- pr_debug("%s: pll %s@%lu: Hz\n", __func__, __clk_get_name(hw->clk),
+ pr_debug("%s: pll %s@%lu: Hz\n", __func__, clk_hw_get_name(hw),
drate);
pr_debug("old - fbdiv: %d, postdiv1: %d, refdiv: %d, postdiv2: %d, dsmpd: %d, frac: %d\n",
cur.fbdiv, cur.postdiv1, cur.refdiv, cur.postdiv2,
@@ -820,12 +820,12 @@ static int rockchip_rk3399_pll_init(struct clk_hw *hw)

if (!parent) {
pr_warn("%s: parent of %s not available\n",
- __func__, __clk_get_name(hw->clk));
+ __func__, clk_hw_get_name(hw));
return 0;
}

pr_debug("%s: pll %s: rate params do not match rate table, adjusting\n",
- __func__, __clk_get_name(hw->clk));
+ __func__, clk_hw_get_name(hw));
rockchip_rk3399_pll_set_params(pll, rate);
}

@@ -992,13 +992,13 @@ static int rockchip_rk3588_pll_set_rate(struct clk_hw *hw, unsigned long drate,
const struct rockchip_pll_rate_table *rate;

pr_debug("%s: changing %s to %lu with a parent rate of %lu\n",
- __func__, __clk_get_name(hw->clk), drate, prate);
+ __func__, clk_hw_get_name(hw), drate, prate);

/* Get required rate settings from table */
rate = rockchip_get_pll_settings(pll, drate);
if (!rate) {
pr_err("%s: Invalid rate : %lu for pll clk %s\n", __func__,
- drate, __clk_get_name(hw->clk));
+ drate, clk_hw_get_name(hw));
return -EINVAL;
}


--
2.47.3