* [PATCH] regulator: core: allow enabling without enable op
@ 2014-02-25 6:57 Alexandre Courbot
2014-02-25 9:43 ` Sachin Kamat
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Courbot @ 2014-02-25 6:57 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Markus Pargmann
Cc: linux-kernel, gnurou, Alexandre Courbot
Commit 14c32a3ce6676265d7a27ea64a4d406e6dbad111 replaced direct uses of
ops->enable by calls to _regulator_do_enable. This prevents a fixed
regulators without a GPIO from being probed, since the former code
checked the existence of ops->enable and continued if it did not exist,
while _regulator_do_enable return -EINVAL in that case.
This patch fixes this by allowing _regulator_do_enable to go through
without error if ops->enable is not defined, similarly to what
_regulator_do_disable already does.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/regulator/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index bdb12659dd41..4306422cee5d 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1763,8 +1763,6 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
ret = rdev->desc->ops->enable(rdev);
if (ret < 0)
return ret;
- } else {
- return -EINVAL;
}
/* Allow the regulator to ramp; it would be useful to extend
--
1.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] regulator: core: allow enabling without enable op
2014-02-25 6:57 [PATCH] regulator: core: allow enabling without enable op Alexandre Courbot
@ 2014-02-25 9:43 ` Sachin Kamat
0 siblings, 0 replies; 2+ messages in thread
From: Sachin Kamat @ 2014-02-25 9:43 UTC (permalink / raw)
To: Alexandre Courbot
Cc: Mark Brown, Liam Girdwood, Markus Pargmann, LKML, Alexandre Courbot
On 25 February 2014 12:27, Alexandre Courbot <acourbot@nvidia.com> wrote:
> Commit 14c32a3ce6676265d7a27ea64a4d406e6dbad111 replaced direct uses of
> ops->enable by calls to _regulator_do_enable. This prevents a fixed
> regulators without a GPIO from being probed, since the former code
> checked the existence of ops->enable and continued if it did not exist,
> while _regulator_do_enable return -EINVAL in that case.
>
> This patch fixes this by allowing _regulator_do_enable to go through
> without error if ops->enable is not defined, similarly to what
> _regulator_do_disable already does.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This patch fixes the fixed regulator registration failure on Exynos5420 board.
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-25 9:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-25 6:57 [PATCH] regulator: core: allow enabling without enable op Alexandre Courbot
2014-02-25 9:43 ` Sachin Kamat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®