diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-04-06 14:35:45 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-05-09 10:15:18 +0530 |
commit | a1e8c13600bfd96c51580732ccf31f69bc6de4d1 (patch) | |
tree | 42bf4de0062d62d7468d8a620d669721cc33108e /drivers/opp/opp.h | |
parent | b89469bdf0c2025a1c1f6ce2b841cb8abe589688 (diff) | |
download | linux-stable-a1e8c13600bfd96c51580732ccf31f69bc6de4d1.tar.gz linux-stable-a1e8c13600bfd96c51580732ccf31f69bc6de4d1.tar.bz2 linux-stable-a1e8c13600bfd96c51580732ccf31f69bc6de4d1.zip |
PM / OPP: "opp-hz" is optional for power domains
"opp-hz" property is optional for power domains now and we shouldn't
error out if it is missing for power domains.
This patch creates two new routines, _get_opp_count() and
_opp_is_duplicate(), by separating existing code from their parent
functions. Also skip duplicate OPP check for power domain OPPs as they
may not have any the "opp-hz" field, but a platform specific performance
state binding to uniquely identify OPP nodes.
By default the debugfs OPP nodes are named using the "rate" value, but
that isn't possible for the power domain OPP nodes and hence they use
the index of the OPP node in the OPP node list instead.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/opp/opp.h')
-rw-r--r-- | drivers/opp/opp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index 4d00061648a3..381a4fb15d5c 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -188,13 +188,14 @@ struct opp_table { /* Routines internal to opp core */ void _get_opp_table_kref(struct opp_table *opp_table); +int _get_opp_count(struct opp_table *opp_table); struct opp_table *_find_opp_table(struct device *dev); struct opp_device *_add_opp_dev(const struct device *dev, struct opp_table *opp_table); void _dev_pm_opp_remove_table(struct opp_table *opp_table, struct device *dev, bool remove_all); void _dev_pm_opp_find_and_remove_table(struct device *dev, bool remove_all); struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table); void _opp_free(struct dev_pm_opp *opp); -int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, struct opp_table *opp_table); +int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, struct opp_table *opp_table, bool rate_not_available); int _opp_add_v1(struct opp_table *opp_table, struct device *dev, unsigned long freq, long u_volt, bool dynamic); void _dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask, bool of); struct opp_table *_add_opp_table(struct device *dev); |