diff options
| author | Brian Masney <bmasney@redhat.com> | 2025-11-06 18:40:43 -0500 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2025-11-19 18:06:50 +0100 |
| commit | 80ed617a62fe076bbfe700c8289fc2118d724821 (patch) | |
| tree | 302fd883a52a731cdcb72e7b0e47366873adf89b | |
| parent | 3ee4082545fe0867e2fe951b68f7a7f9217240fe (diff) | |
pmdomain: mediatek: convert from clk round_rate() to determine_rate()
The round_rate() clk ops is deprecated in the clk framework in favor
of the determine_rate() clk ops, so let's convert this driver so that
round_rate() can be removed from the clk core.
Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c b/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c index af20111067c0..9bad577b3ae4 100644 --- a/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c +++ b/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c @@ -309,11 +309,11 @@ static unsigned long mtk_mfg_recalc_rate_gpu(struct clk_hw *hw, return readl(mfg->shared_mem + GF_REG_FREQ_OUT_GPU) * HZ_PER_KHZ; } -static long mtk_mfg_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int mtk_mfg_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { /* - * The round_rate callback needs to be implemented to avoid returning + * The determine_rate callback needs to be implemented to avoid returning * the current clock frequency, rather than something even remotely * close to the frequency that was asked for. * @@ -325,7 +325,7 @@ static long mtk_mfg_round_rate(struct clk_hw *hw, unsigned long rate, * high current frequency, breaking the powersave governor in the process. */ - return rate; + return 0; } static unsigned long mtk_mfg_recalc_rate_stack(struct clk_hw *hw, @@ -338,12 +338,12 @@ static unsigned long mtk_mfg_recalc_rate_stack(struct clk_hw *hw, static const struct clk_ops mtk_mfg_clk_gpu_ops = { .recalc_rate = mtk_mfg_recalc_rate_gpu, - .round_rate = mtk_mfg_round_rate, + .determine_rate = mtk_mfg_determine_rate, }; static const struct clk_ops mtk_mfg_clk_stack_ops = { .recalc_rate = mtk_mfg_recalc_rate_stack, - .round_rate = mtk_mfg_round_rate, + .determine_rate = mtk_mfg_determine_rate, }; static const struct clk_init_data mtk_mfg_clk_gpu_init = { |
