From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@kernel.org>
Cc: lee.jones@linaro.org, sameo@linux.intel.com,
patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mfd: core: Add the option to order destruction of MFD cells
Date: Tue, 3 Jun 2014 10:49:32 +0100 [thread overview]
Message-ID: <20140603094932.GF11951@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20140602210117.GO31751@sirena.org.uk>
On Mon, Jun 02, 2014 at 10:01:17PM +0100, Mark Brown wrote:
> On Mon, Jun 02, 2014 at 10:01:43AM +0100, Charles Keepax wrote:
> > Sometimes MFD children will have interdependancies. For example an MFD
> > device might contain a regulator cell and another cell which requires
> > that regulator to function. Probe deferral will ensure that these
> > devices probe in the correct order, however currently nothing ensures
> > they are destroyed in the correct order. As such it is possible for a
> > cell to be destroyed whilst another cell still expects it to exist. For
> > example the cell mentioned earlier would attempt to do a regulator_put
> > as part of its own tear-down but the regulator may have already been
> > destroyed.
>
> Probe deferral is supposed to handle removal too, we're supposed to be
> able to walk the device list in reverse order and everything just work.
I had considered this approach but was perhaps incorrectly too
nervous about it. I was slightly concerned about breaking other
MFD devices by changing the order things destroy in. Also the way
the child devices are iterated with device_for_each_child, there is
lack of helpers to process the klist in reverse and it felt like
code I probably shouldn't be modifying.
I am happy to do a version that removes devices in reverse probe
order, if that is preferrable? But any pointers if I am missing
the obvious way to do that would be appreciated.
Thanks,
Charles
next prev parent reply other threads:[~2014-06-03 9:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 9:01 [PATCH 1/2] mfd: core: Add the option to order destruction of MFD cells Charles Keepax
2014-06-02 9:01 ` [PATCH 2/2] mfd: arizona: Destroy regulators after the other " Charles Keepax
2014-06-17 14:54 ` Lee Jones
2014-06-17 15:16 ` Charles Keepax
2014-06-02 21:01 ` [PATCH 1/2] mfd: core: Add the option to order destruction of " Mark Brown
2014-06-03 9:49 ` Charles Keepax [this message]
2014-06-03 10:35 ` Mark Brown
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=20140603094932.GF11951@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.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.