diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2023-02-22 16:36:38 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2023-04-03 09:45:09 +0530 |
commit | 528f2d8d540a3c374d6b765c769620d91536b176 (patch) | |
tree | b71e2d6df288b7d9856a38739d3ccdfdbf03237a /drivers/opp/of.c | |
parent | 29b1a92e5e953214388ac1f3656cb3af266ca74f (diff) |
OPP: Move required opps configuration to specialized callback
The required-opps configuration is closely tied to genpd and performance
states at the moment and it is not very obvious that required-opps can
live without genpds. Though we don't support configuring required-opps
for non-genpd cases currently.
This commit aims at separating these parts, where configuring genpds
would be a special case of configuring the required-opps.
Add a specialized callback, set_required_opps(), to the opp table and
set it to different callbacks accordingly.
This shouldn't result in any functional changes for now.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/opp/of.c')
-rw-r--r-- | drivers/opp/of.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index bed2b651deb0..233eab70e15e 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -196,6 +196,8 @@ static void _opp_table_alloc_required_tables(struct opp_table *opp_table, /* Let's do the linking later on */ if (lazy) list_add(&opp_table->lazy, &lazy_opp_tables); + else + _update_set_required_opps(opp_table); goto put_np; @@ -411,6 +413,7 @@ static void lazy_link_required_opp_table(struct opp_table *new_table) /* All required opp-tables found, remove from lazy list */ if (!lazy) { + _update_set_required_opps(opp_table); list_del_init(&opp_table->lazy); list_for_each_entry(opp, &opp_table->opp_list, node) |