LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: milo.kim@ti.com, Axel Lin <axel.lin@ingics.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Olof Johansson <olof@lixom.net>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Paul Stewart <pstew@chromium.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: core: Fix enable GPIO reference counting
Date: Wed, 4 Mar 2015 11:27:12 +0000	[thread overview]
Message-ID: <20150304112712.GI21293@sirena.org.uk> (raw)
In-Reply-To: <CAD=FV=V4jT=dGMNoLXb-Anuv9=uO5UDeo+mMFgcoGzccgENz1w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On Tue, Mar 03, 2015 at 03:21:21PM -0800, Doug Anderson wrote:

> It looks as if "ena_gpio_state" is not quite what I thought it was and
> I think is not actually consistent in the regulator framework itself.
> In _regulator_do_enable() and _regulator_do_disable() is clear that
> ena_gpio_state is 1 when an "rdev" is enabled and 0 when the "rdev" is
> disabled.  That was my assumption.  It's also clear in
> _regulator_is_enabled().

> ...but then I looked in regulator_register().  There you can see that
> ena_gpio_state could be set to 1 if you've got an active low GPIO that
> is disabled at boot.  That totally throws my logic for a loop.  Also
> with my patch the reference counting will be all messed up for active
> high / boot on regulators.  :(

Isn't that just a bug in the registration code?  I'd not be entirely
surprised if that were the case.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-03-04 11:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 19:41 Doug Anderson
2015-02-27 20:08 ` Greg KH
2015-02-27 21:01 ` Javier Martinez Canillas
2015-03-02 18:57   ` Mark Brown
2015-03-02 20:21     ` Javier Martinez Canillas
2015-03-03 14:24       ` Mark Brown
2015-03-02 18:47 ` Mark Brown
2015-03-02 21:13   ` Doug Anderson
2015-03-03 14:23     ` Mark Brown
2015-03-03 23:21       ` Doug Anderson
2015-03-04 11:27         ` Mark Brown [this message]
2015-03-04 17:13           ` Doug Anderson

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=20150304112712.GI21293@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=axel.lin@ingics.com \
    --cc=dianders@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=javier.martinez@collabora.co.uk \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milo.kim@ti.com \
    --cc=olof@lixom.net \
    --cc=pstew@chromium.org \
    --cc=stable@vger.kernel.org \
    --subject='Re: [PATCH] regulator: core: Fix enable GPIO reference counting' \
    /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

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).