* [PATCH] regulator: Only apply voltage constraints from consumers that set them
@ 2011-05-14 20:42 Mark Brown
2011-05-16 12:19 ` Liam Girdwood
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-05-14 20:42 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, patches, David Collins, Mark Brown
When applying the set_voltage() requests from consumers skip over those
consumers that haven't set anything, otherwise we'll come out with a
maximum voltage of zero.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 051a45d..60ae920 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -161,6 +161,13 @@ static int regulator_check_consumers(struct regulator_dev *rdev,
struct regulator *regulator;
list_for_each_entry(regulator, &rdev->consumer_list, list) {
+ /*
+ * Assume consumers that didn't say anything are OK
+ * with anything in the constraint range.
+ */
+ if (!regulator->min_uV && !regulator->max_uV)
+ continue;
+
if (*max_uV > regulator->max_uV)
*max_uV = regulator->max_uV;
if (*min_uV < regulator->min_uV)
--
1.7.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: Only apply voltage constraints from consumers that set them
2011-05-14 20:42 [PATCH] regulator: Only apply voltage constraints from consumers that set them Mark Brown
@ 2011-05-16 12:19 ` Liam Girdwood
0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-05-16 12:19 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com,
David Collins
On 14/05/11 21:42, Mark Brown wrote:
> When applying the set_voltage() requests from consumers skip over those
> consumers that haven't set anything, otherwise we'll come out with a
> maximum voltage of zero.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
Applied.
Thanks
Liam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-16 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-14 20:42 [PATCH] regulator: Only apply voltage constraints from consumers that set them Mark Brown
2011-05-16 12:19 ` Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox