Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1642975
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] PM / OPP: opp-microvolt is not optional if regulators are set |
| Date | 2017-05-17 06:50 +0200 |
| Message-ID | <tHZ4m-6Ti-21@gated-at.bofh.it> (permalink) |
| References | <tHZ4l-6Ti-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If dev_pm_opp_set_regulators() is called for a device and its regulators
are set in the OPP core, the OPP nodes for the device must contain the
"opp-microvolt" property, otherwise there is something wrong and we
better error out.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/base/power/opp/of.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c
index 779428676f63..c6fc8cbad10d 100644
--- a/drivers/base/power/opp/of.c
+++ b/drivers/base/power/opp/of.c
@@ -131,8 +131,15 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
prop = of_find_property(opp->np, name, NULL);
/* Missing property isn't a problem, but an invalid entry is */
- if (!prop)
- return 0;
+ if (!prop) {
+ /* The regulator-count must be zero here */
+ if (!opp_table->regulator_count)
+ return 0;
+
+ dev_err(dev, "%s: opp-microvolt missing even if regulators are available\n",
+ __func__);
+ return -EINVAL;
+ }
}
vcount = of_property_count_u32_elems(opp->np, name);
--
2.13.0.303.g4ebf3021692d
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 3/4] PM / OPP: opp-microvolt is not optional if regulators are set Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-17 06:50 +0200 Re: [PATCH 3/4] PM / OPP: opp-microvolt is not optional if regulators are set Stephen Boyd <sboyd@codeaurora.org> - 2017-05-23 03:30 +0200
csiph-web