aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/opp/opp.h
diff options
context:
space:
mode:
authorKamil Konieczny <k.konieczny@samsung.com>2019-07-19 17:05:32 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2020-05-29 10:15:12 +0530
commit8d45719caaf56c859be0172447f8559c0df40f93 (patch)
tree6da388dcfeaf0feba91978efddd0d4027ea1e11e /drivers/opp/opp.h
parentopp: Reorder the code for !target_freq case (diff)
downloadwireguard-linux-8d45719caaf56c859be0172447f8559c0df40f93.tar.xz
wireguard-linux-8d45719caaf56c859be0172447f8559c0df40f93.zip
opp: core: add regulators enable and disable
Add enable regulators to dev_pm_opp_set_regulators() and disable regulators to dev_pm_opp_put_regulators(). Even if bootloader leaves regulators enabled, they should be enabled in kernel in order to increase the reference count. Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Clément Péron <peron.clem@gmail.com> Tested-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Kamil Konieczny <k.konieczny@samsung.com> [ Viresh: Enable the regulator only after it is programmed and add a flag to track its status. ] 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 2b81ffef1ba4..e51646ff279e 100644
--- a/drivers/opp/opp.h
+++ b/drivers/opp/opp.h
@@ -147,6 +147,7 @@ enum opp_table_access {
* @clk: Device's clock handle
* @regulators: Supply regulators
* @regulator_count: Number of power supply regulators. Its value can be -1
+ * @regulator_enabled: Set to true if regulators were previously enabled.
* (uninitialized), 0 (no opp-microvolt property) or > 0 (has opp-microvolt
* property).
* @paths: Interconnect path handles
@@ -194,6 +195,7 @@ struct opp_table {
struct clk *clk;
struct regulator **regulators;
int regulator_count;
+ bool regulator_enabled;
struct icc_path **paths;
unsigned int path_count;
bool genpd_performance_state;