summaryrefslogtreecommitdiff
path: root/drivers/opp/opp.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-06-14 12:04:43 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-09-19 14:56:42 -0700
commitf06ed90e7051a3a50c2172001c86ff9645e5c2ba (patch)
treead370ce515f71f92b395d2a321b45906162472a4 /drivers/opp/opp.h
parenteb7c8743d6cf489e30091e6656fd4d3306621e9a (diff)
OPP: Parse OPP table's DT properties from _of_init_opp_table()
Parse the DT properties present in the OPP table from _of_init_opp_table(), which is a dedicated routine for DT parsing. Minor relocation of helpers is required for this. It is possible now for _managed_opp() to return a partially initialized OPP table if the OPP table is created via the helpers like dev_pm_opp_set_supported_hw() and we need another flag to indicate if the static OPP are already parsed or not to make sure we don't incorrectly skip initializing the static OPPs. Tested-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/opp.h')
-rw-r--r--drivers/opp/opp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h
index b235e76fc8cc..b04c2b511c4d 100644
--- a/drivers/opp/opp.h
+++ b/drivers/opp/opp.h
@@ -129,6 +129,7 @@ enum opp_table_access {
* @lock: mutex protecting the opp_list and dev_list.
* @np: struct device_node pointer for opp's DT node.
* @clock_latency_ns_max: Max clock latency in nanoseconds.
+ * @parsed_static_opps: True if OPPs are initialized from DT.
* @shared_opp: OPP is shared between multiple devices.
* @suspend_opp: Pointer to OPP to be used during device suspend.
* @supported_hw: Array of version number to support.
@@ -164,6 +165,7 @@ struct opp_table {
/* For backward compatibility with v1 bindings */
unsigned int voltage_tolerance_v1;
+ bool parsed_static_opps;
enum opp_table_access shared_opp;
struct dev_pm_opp *suspend_opp;