* [PATCH] regulator: Fix machine constraints apply for min_uV != max_uV
@ 2010-09-03 13:43 Jarkko Nikula
2010-09-03 14:54 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Nikula @ 2010-09-03 13:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula
Constraints are not applied until both min_uV and max_uV are the same. This
looks like a typo in the test.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
drivers/regulator/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 422a709..b092070 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -724,7 +724,7 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
/* do we need to apply the constraint voltage */
if (rdev->constraints->apply_uV &&
- rdev->constraints->min_uV == rdev->constraints->max_uV &&
+ rdev->constraints->min_uV && rdev->constraints->max_uV &&
ops->set_voltage) {
ret = ops->set_voltage(rdev,
rdev->constraints->min_uV, rdev->constraints->max_uV);
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Fix machine constraints apply for min_uV != max_uV
2010-09-03 13:43 [PATCH] regulator: Fix machine constraints apply for min_uV != max_uV Jarkko Nikula
@ 2010-09-03 14:54 ` Mark Brown
2010-09-03 15:32 ` Jarkko Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2010-09-03 14:54 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-kernel, Liam Girdwood
On Fri, Sep 03, 2010 at 04:43:49PM +0300, Jarkko Nikula wrote:
> Constraints are not applied until both min_uV and max_uV are the same. This
> looks like a typo in the test.
>
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
This is deliberate behaviour, apply_uV can only be used with a fixed
voltage at startup in order to avoid issues with handover from the
bootloader if we suddenly drop the supply voltage on a device which has
not yet been claimed by a driver. The expectation is that if the
voltage can vary then something that understands the hardware state
needs to be involved in maintaining the voltage.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Fix machine constraints apply for min_uV != max_uV
2010-09-03 14:54 ` Mark Brown
@ 2010-09-03 15:32 ` Jarkko Nikula
0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Nikula @ 2010-09-03 15:32 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, Liam Girdwood
On Fri, 3 Sep 2010 15:54:20 +0100
Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> This is deliberate behaviour, apply_uV can only be used with a fixed
> voltage at startup in order to avoid issues with handover from the
> bootloader if we suddenly drop the supply voltage on a device which has
> not yet been claimed by a driver. The expectation is that if the
> voltage can vary then something that understands the hardware state
> needs to be involved in maintaining the voltage.
Ah, true. It could be possible that machine constraints are specified
broader, like they include standby state voltage which is not enough to
probe & initialize the device etc.
--
Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-03 15:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-03 13:43 [PATCH] regulator: Fix machine constraints apply for min_uV != max_uV Jarkko Nikula
2010-09-03 14:54 ` Mark Brown
2010-09-03 15:32 ` Jarkko Nikula
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.