pmdomain: mediatek: airoha: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
appended to the "under-the-cut" portion of the patch.

Note that prior to running the Coccinelle,
airoha_cpu_pmdomain_clk_round() was renamed to
airoha_cpu_pmdomain_clk_round_rate().

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Brian Masney 2025-08-10 18:16:19 -04:00 committed by Ulf Hansson
parent 5b3a897c3f
commit c60934d5ca

View file

@ -21,10 +21,10 @@ struct airoha_cpu_pmdomain_priv {
struct generic_pm_domain pd;
};
static long airoha_cpu_pmdomain_clk_round(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate)
static int airoha_cpu_pmdomain_clk_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
return rate;
return 0;
}
static unsigned long airoha_cpu_pmdomain_clk_get(struct clk_hw *hw,
@ -48,7 +48,7 @@ static int airoha_cpu_pmdomain_clk_is_enabled(struct clk_hw *hw)
static const struct clk_ops airoha_cpu_pmdomain_clk_ops = {
.recalc_rate = airoha_cpu_pmdomain_clk_get,
.is_enabled = airoha_cpu_pmdomain_clk_is_enabled,
.round_rate = airoha_cpu_pmdomain_clk_round,
.determine_rate = airoha_cpu_pmdomain_clk_determine_rate,
};
static int airoha_cpu_pmdomain_set_performance_state(struct generic_pm_domain *domain,