linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "lrg@ti.com" <lrg@ti.com>,
	"rabin.vincent@gmail.com" <rabin.vincent@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V3] regulator: disable supply regulator if it is enabled for boot-on
Date: Fri, 7 Sep 2012 18:21:25 +0530	[thread overview]
Message-ID: <5049EDCD.4050805@nvidia.com> (raw)
In-Reply-To: <20120907015900.GC6827@opensource.wolfsonmicro.com>

On Friday 07 September 2012 07:29 AM, Mark Brown wrote:
> On Mon, Sep 03, 2012 at 07:55:39PM +0530, Laxman Dewangan wrote:
>
>> +	/* If supply enabled during registrtaion then need to disable
>> +	 * when full constraint enabled.
>> +	 */
>> +	unsigned int need_supply_disable:1;
> I don't understand why we need this flag.  Shouldn't we just be making
> the reference counts for the supplies correct and then have the
> regulator disabled in the late initcall as a result of its refcount
> falling to zero when the children are disabled?
Here we are trying to call the supply disable if child refcount become 0.
So when child calls disable, it need to call the supply disable also.

>   I think what we need to
> do here is always take a reference to the supply if the child is enabled
> during boot, then in the initcall we can just disable the parent
> regulator as normal.
My second patch was similar but Rabin has some issue to handle the case 
when is_regulator_enable() is not implementd by regulator device driver.


  reply	other threads:[~2012-09-07 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 14:25 [PATCH V3] regulator: disable supply regulator if it is enabled for boot-on Laxman Dewangan
2012-09-07  1:59 ` Mark Brown
2012-09-07 12:51   ` Laxman Dewangan [this message]
2012-09-07 13:19     ` Mark Brown

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=5049EDCD.4050805@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).