public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Rabin Vincent <rabin@rab.in>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
	lrg@ti.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] regulator: disable supply regulator if it is enabled for boot-on
Date: Thu, 30 Aug 2012 11:27:58 -0700	[thread overview]
Message-ID: <20120830182757.GM4356@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CAH+eYFBe6c0_H6z65AfW-6BCuxrQYFVFSXrZT865JGmcvyMRCg@mail.gmail.com>

On Thu, Aug 30, 2012 at 08:24:15PM +0200, Rabin Vincent wrote:

> This does not handle the case where a regulator is not set boot_on but
> is considered on (for example, because of the lack of an is_enabled
> callback), and is later actually enabled by a consumer before
> regulator_init_complete().  In this case, the supply's use count will
> still be one more than it should be, because the "&& c->boot_on"
> condition above will fail.

> To fix this, you should probably note which regulators' supplies you
> enable in regulator_register() and use that information in the above two
> checks here in regulator_init_complete().

Yeah, I didn't read this properly yet but this was my main concern -
this should all just fall out naturally through the normal disable
process.  Doing special case bodges feels really fragile and error
prone.

      reply	other threads:[~2012-08-30 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 14:53 [PATCH V2] regulator: disable supply regulator if it is enabled for boot-on Laxman Dewangan
2012-08-30 18:24 ` Rabin Vincent
2012-08-30 18:27   ` Mark Brown [this message]

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=20120830182757.GM4356@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=rabin@rab.in \
    /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