[PATCH] regulator: core: Keep boot_on regulators powered during init

From: Ulf Hansson
Date: Mon Apr 23 2012 - 05:38:13 EST


Regulators which has boot_on constraints set, will now remain
powered after regulator_init_complete is done.

In this case we leave the enable->disable operation to be
handled by the regulator consumer instead.

Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxx>
---
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 1caada2..c5af6d2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3393,7 +3393,7 @@ static int __init regulator_init_complete(void)
ops = rdev->desc->ops;
c = rdev->constraints;

- if (!ops->disable || (c && c->always_on))
+ if (!ops->disable || (c && (c->always_on || c->boot_on)))
continue;

mutex_lock(&rdev->mutex);
--
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/