From: Laxman Dewangan <ldewangan@nvidia.com>
To: "rabin.vincent@gmail.com" <rabin.vincent@gmail.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>, "lrg@ti.com" <lrg@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on
Date: Wed, 22 Aug 2012 15:15:12 +0530 [thread overview]
Message-ID: <5034AA28.5050306@nvidia.com> (raw)
In-Reply-To: <1344938848-29606-1-git-send-email-ldewangan@nvidia.com>
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@nvidia.com>
> Reported-by: Rabin Vincent<rabin.vincent@gmail.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
next prev parent reply other threads:[~2012-08-22 10:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 10:07 [PATCH] regulator: disable supply regulator if it is enabled for boot-on Laxman Dewangan
2012-08-14 11:08 ` Rabin Vincent
2012-08-22 9:45 ` Laxman Dewangan [this message]
2012-08-23 14:53 ` Mark Brown
2012-08-23 14:43 ` Laxman Dewangan
2012-08-24 17:52 ` Laxman Dewangan
2012-08-24 23:40 ` Rabin Vincent
2012-08-28 12:20 ` Laxman Dewangan
2012-08-28 15:52 ` Rabin Vincent
2012-08-24 17:53 ` Laxman Dewangan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5034AA28.5050306@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=rabin.vincent@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.