All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.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 v2] regulator: wm8994: Don't use devres for enable GPIOs
Date: Thu, 22 Nov 2018 17:21:41 +0000	[thread overview]
Message-ID: <20181122172141.GJ16508@imbe.wolfsonmicro.main> (raw)
In-Reply-To: <CACRpkdb9KStEkMigDX2kA4Q-tr6DuuWqqTuF6jXZK67Zp+DxmA@mail.gmail.com>

On Thu, Nov 22, 2018 at 04:47:20PM +0100, Linus Walleij wrote:
> On Thu, Nov 22, 2018 at 3:19 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Wed, Nov 21, 2018 at 11:13 AM Charles Keepax
> > <ckeepax@opensource.cirrus.com> wrote:
> >
> > > The regulator core takes over managing the lifetime of the enable GPIO
> > > once the regulator is registered. As such we shouldn't register the
> > > enable GPIO using devm, or it will be freed twice.
> > >
> > > Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> >
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Oh no this is not the right solution I think.
> 

Yes I agree I actually am just about to send another series, I
guess I will send that and we can look at that and any
suggestions you have.

> All drivers passing a descriptor (config->ena_gpiod) do their
> own refcounting, including some using a function that has no
> non-devm* counterpart.
> 
> It is better if we teach the core to not gpiod_put() those.
> 

Yeah that is exactly what my patch chain is doing.

> The other patch series I am floating to get rid of the legacy
> GPIO handling from the core will do away with all the
> legacy GPIO handling anyway, so let me introduce a bit
> of ugliness (that can be backported) and then delete that
> ugliness with an updated series v8 of my legacy GPIO
> cleanup.
> 
> Sorry for the inconvenience.
> 
> Will send a patch soon.
> 
> Yours,
> Linus Walleij

Thanks,
Charles

      reply	other threads:[~2018-11-22 17:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181121101410epcas3p27a2a577c3b5a0608f7808ff733fab9d1@epcas3p2.samsung.com>
2018-11-21 10:13 ` [PATCH v2] regulator: wm8994: Don't use devres for enable GPIOs Charles Keepax
2018-11-21 10:42   ` Marek Szyprowski
2018-11-21 10:59     ` Charles Keepax
2018-11-22 14:20     ` Linus Walleij
2018-11-22 14:19   ` Linus Walleij
2018-11-22 15:47     ` Linus Walleij
2018-11-22 17:21       ` Charles Keepax [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=20181122172141.GJ16508@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.