Skip to content

Commit 80ed617

Browse files
masneybUlf Hansson
authored andcommitted
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>
1 parent 3ee4082 commit 80ed617

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,11 @@ static unsigned long mtk_mfg_recalc_rate_gpu(struct clk_hw *hw,
309309
return readl(mfg->shared_mem + GF_REG_FREQ_OUT_GPU) * HZ_PER_KHZ;
310310
}
311311

312-
static long mtk_mfg_round_rate(struct clk_hw *hw, unsigned long rate,
313-
unsigned long *parent_rate)
312+
static int mtk_mfg_determine_rate(struct clk_hw *hw,
313+
struct clk_rate_request *req)
314314
{
315315
/*
316-
* The round_rate callback needs to be implemented to avoid returning
316+
* The determine_rate callback needs to be implemented to avoid returning
317317
* the current clock frequency, rather than something even remotely
318318
* close to the frequency that was asked for.
319319
*
@@ -325,7 +325,7 @@ static long mtk_mfg_round_rate(struct clk_hw *hw, unsigned long rate,
325325
* high current frequency, breaking the powersave governor in the process.
326326
*/
327327

328-
return rate;
328+
return 0;
329329
}
330330

331331
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,
338338

339339
static const struct clk_ops mtk_mfg_clk_gpu_ops = {
340340
.recalc_rate = mtk_mfg_recalc_rate_gpu,
341-
.round_rate = mtk_mfg_round_rate,
341+
.determine_rate = mtk_mfg_determine_rate,
342342
};
343343

344344
static const struct clk_ops mtk_mfg_clk_stack_ops = {
345345
.recalc_rate = mtk_mfg_recalc_rate_stack,
346-
.round_rate = mtk_mfg_round_rate,
346+
.determine_rate = mtk_mfg_determine_rate,
347347
};
348348

349349
static const struct clk_init_data mtk_mfg_clk_gpu_init = {

0 commit comments

Comments
 (0)