All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<patches@opensource.cirrus.com>
Subject: Re: [PATCH 3/3] gpio: Add reference counting for non-exclusive GPIOs
Date: Mon, 26 Nov 2018 14:30:28 +0000	[thread overview]
Message-ID: <20181126143028.GO16508@imbe.wolfsonmicro.main> (raw)
In-Reply-To: <20181126140927.GD9715@sirena.org.uk>

On Mon, Nov 26, 2018 at 02:09:27PM +0000, Mark Brown wrote:
> On Mon, Nov 26, 2018 at 01:00:01PM +0000, Charles Keepax wrote:
> > On Fri, Nov 23, 2018 at 01:25:22PM +0000, Mark Brown wrote:
> 
> > > help the multiple users find each other somehow.  I think what we want
> > > to do here is either push the gpiod requests into the regulator core or
> > > change things so that once the regulator is registered with the
> > > regulator core the regulator core owns and is responsible for freeing
> > > the regulator.
> 
> > On the co-ordinating do we expect that the behaviour will
> > be that the GPIO should in the "enabled" state whenever any
> > regulator is requesting it? IE. the GPIO state is an OR of
> > the regulator states. Or are we expecting to handle more
> > complex interaction?
> 
> For the regulators that's what we do, yes - it's like they're all
> sharing a single regulator.  That probably won't be true in general for
> all GPIO users.

Would there perhaps be milage in looking at just making
the regulator core request the GPIO, rather than the end
drivers? Gives us a single request/free point. We don't need
any special flags in the GPIO layer, as its just a single
user as far as GPIO is concerned.

Thanks,
Charles

  reply	other threads:[~2018-11-26 14:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181122173037epcas1p39fb96bb168427d58a74a085f42a0ba84@epcas1p3.samsung.com>
2018-11-22 17:30 ` [PATCH 1/3] regulator: wm8994: Revert back to using devres Charles Keepax
2018-11-22 17:30   ` [PATCH 2/3] regulator: Only free GPIOs if the core requested them Charles Keepax
2018-11-22 22:25     ` Linus Walleij
2018-11-23  9:24     ` Marek Szyprowski
2018-11-23 14:25     ` Mark Brown
2018-11-30 22:15       ` Linus Walleij
2018-11-22 17:30   ` [PATCH 3/3] gpio: Add reference counting for non-exclusive GPIOs Charles Keepax
2018-11-23  9:25     ` Marek Szyprowski
2018-11-23  9:40     ` Linus Walleij
2018-11-23 10:57       ` Charles Keepax
2018-11-23 13:25         ` Mark Brown
2018-11-26 13:00           ` Charles Keepax
2018-11-26 14:09             ` Mark Brown
2018-11-26 14:30               ` Charles Keepax [this message]
2018-11-26 14:54                 ` Mark Brown
2018-11-26 16:53                   ` Charles Keepax
2018-11-26 21:53           ` Linus Walleij
2018-11-27  9:18             ` Charles Keepax
2018-11-27 10:50             ` Linus Walleij
2018-11-27 13:30             ` Mark Brown
2018-11-23  9:24   ` [PATCH 1/3] regulator: wm8994: Revert back to using devres Marek Szyprowski

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=20181126143028.GO16508@imbe.wolfsonmicro.main \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=patches@opensource.cirrus.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.