summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Masney <bmasney@redhat.com>2026-05-05 20:49:11 -0400
committerBrian Masney <bmasney@redhat.com>2026-06-29 17:53:17 -0400
commite3a9ad35af677ecdff0aed12891f9360d1a493bd (patch)
tree51882bdbcca98b8fdfd2319e9d38a2f4fadf9d69
parentb37966e116cb0456e5804c485f7d0872d0c17449 (diff)
downloadlinux-stable-e3a9ad35af677ecdff0aed12891f9360d1a493bd.tar.gz
linux-stable-e3a9ad35af677ecdff0aed12891f9360d1a493bd.zip
pmdomain: mediatek: mtk-mfg: use clk_determine_rate_noop()
Drop the driver-specific empty determine_rate() function and use the new shared clk_determine_rate_noop() helper. Acked-by: Ulf Hansson <ulfh@kernel.org> Signed-off-by: Brian Masney <bmasney@redhat.com>
-rw-r--r--drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c b/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c
index 53bdab66cf15..cdcd1d1a812f 100644
--- a/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c
+++ b/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c
@@ -310,25 +310,6 @@ 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 int mtk_mfg_determine_rate(struct clk_hw *hw,
- struct clk_rate_request *req)
-{
- /*
- * 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.
- *
- * Instead of writing considerable amounts of possibly slow code just to
- * somehow figure out which of the three PLLs to round for, or even to
- * do a search through one of two OPP tables in order to find the closest
- * OPP of a frequency, just return the rate as-is. This avoids devfreq
- * "rounding" a request for the lowest frequency to the possibly very
- * high current frequency, breaking the powersave governor in the process.
- */
-
- return 0;
-}
-
static unsigned long mtk_mfg_recalc_rate_stack(struct clk_hw *hw,
unsigned long parent_rate)
{
@@ -339,12 +320,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,
- .determine_rate = mtk_mfg_determine_rate,
+ .determine_rate = clk_determine_rate_noop,
};
static const struct clk_ops mtk_mfg_clk_stack_ops = {
.recalc_rate = mtk_mfg_recalc_rate_stack,
- .determine_rate = mtk_mfg_determine_rate,
+ .determine_rate = clk_determine_rate_noop,
};
static const struct clk_init_data mtk_mfg_clk_gpu_init = {