[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5034AA28.5050306@nvidia.com>
Date: Wed, 22 Aug 2012 15:15:12 +0530
From: Laxman Dewangan <ldewangan@...dia.com>
To: "rabin.vincent@...il.com" <rabin.vincent@...il.com>
CC: Laxman Dewangan <ldewangan@...dia.com>,
"broonie@...nsource.wolfsonmicro.com"
<broonie@...nsource.wolfsonmicro.com>, "lrg@...com" <lrg@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: disable supply regulator if it is enabled
for boot-on
Hi Rabin,
Is it resolved the issue you mentioned?
Thanks,
Laxman
On Tuesday 14 August 2012 03:37 PM, Laxman Dewangan wrote:
> If supply regulator is enabled because of boot-on (not always-on)
> then disable regulator need to be call if regulator have some
> user or full constraint has been enabled.
> This will make sure that reference count of supply regulator
> is in sync with child regulator's state.
>
> Signed-off-by: Laxman Dewangan<ldewangan@...dia.com>
> Reported-by: Rabin Vincent<rabin.vincent@...il.com>
> ---
> drivers/regulator/core.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 0fffeae..4632909 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -3614,8 +3614,11 @@ static int __init regulator_init_complete(void)
>
> mutex_lock(&rdev->mutex);
>
> - if (rdev->use_count)
> + if (rdev->use_count) {
> + if (rdev->supply&& c->boot_on)
> + regulator_disable(rdev->supply);
> goto unlock;
> + }
>
> /* If we can't read the status assume it's on. */
> if (ops->is_enabled)
> @@ -3634,6 +3637,8 @@ static int __init regulator_init_complete(void)
> if (ret != 0) {
> rdev_err(rdev, "couldn't disable: %d\n", ret);
> }
> + if (rdev->supply)
> + regulator_disable(rdev->supply);
> } else {
> /* The intention is that in future we will
> * assume that full constraints are provided
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists