public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, <hias@horus.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	<patches@opensource.cirrus.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] regulator: arizona-ldo1: Use correct device to get enable GPIO
Date: Wed, 20 Jun 2018 09:14:42 +0100	[thread overview]
Message-ID: <20180620081442.GH18740@imbe.wolfsonmicro.main> (raw)
In-Reply-To: <CAHp75VeytT0aYxoNLbtGzbacubn_kw+44bW8zGZuRVA7=oQWPQ@mail.gmail.com>

On Tue, Jun 19, 2018 at 11:46:36PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 19, 2018 at 6:10 PM, Charles Keepax
> <ckeepax@opensource.cirrus.com> wrote:
> > Currently the enable GPIO is being looked up on the regulator
> > device itself but that does not have its own DT node, this causes
> > the lookup to fail and the regulator not to get its GPIO. The DT
> > node is shared across the whole MFD and as such the lookup needs
> > to happen on that parent device.
> 
> > Moving the lookup to the parent
> > device also means devres can no longer be used as the life time
> > would attach to the wrong device.
> 
> This part I didn't get.
> Why we can't use devm_...(parent_dev, ...) instead?
> 

Because it is possible to unbind the regulator driver itself,
which would leave the GPIO as acquired, since the MFD is never
unbound. Then when you rebind the regulator the GPIO would
already be held by the previous instantiation of the regulator
driver.

Thanks,
Charles

  reply	other threads:[~2018-06-20  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 15:10 [PATCH v2] regulator: arizona-ldo1: Use correct device to get enable GPIO Charles Keepax
2018-06-19 15:24 ` Applied "regulator: arizona-ldo1: Use correct device to get enable GPIO" to the regulator tree Mark Brown
2018-06-19 20:46 ` [PATCH v2] regulator: arizona-ldo1: Use correct device to get enable GPIO Andy Shevchenko
2018-06-20  8:14   ` Charles Keepax [this message]
2018-06-29  8:05 ` Linus Walleij

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=20180620081442.GH18740@imbe.wolfsonmicro.main \
    --to=ckeepax@opensource.cirrus.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=hias@horus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox