From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] of/platform: depopulate devices in the reverse order of creation
Date: Wed, 14 Dec 2016 14:40:12 -0700 [thread overview]
Message-ID: <20161214214012.GB6947@obsidianresearch.com> (raw)
In-Reply-To: <CAL_Jsq+JdmKj88Tp=N+V781qj+muEB6nuGpjDCgiPsrzB9tWMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Dec 14, 2016 at 02:54:02PM -0600, Rob Herring wrote:
> On Mon, Dec 12, 2016 at 12:39 PM, Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> > If the DT has inter-dependencies, then the devices need to be removed
> > in the right order to avoid removal problems.
> >
> > Assuming the DT is constructed so that EPROBE_DEFER doesn't happen
> > during creating then a good way to avoid removal problems is reversing
> > the order during depopulation.
>
> I assume you mean by sorting the nodes to get lucky with the init
> order.
Not quite, the init order doesn't matter, just that the device list/DT
is ordered topologically. The driver bind order can still be
randomized. No luck needed.
> > In my specific case I have a gpio driver, followed by a i2c bitbang
> > using that driver. So gpiolib prints an error if it the gpio driver is
> > removed before the gpio client..
>
> Good news, functional dependencies are going into 4.10. Let's fix GPIO
> and use that.
Sure, but it will be some time until that is used everwhere..
You don't think there is some value in 'hiding' the problem with
ordering until that work is done? IIRC that was essentially how
EPROBE_DEFER was introduced?
Jason
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-12-14 21:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 18:39 [PATCH] of/platform: depopulate devices in the reverse order of creation Jason Gunthorpe
[not found] ` <20161212183905.GA30702-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-14 20:54 ` Rob Herring
[not found] ` <CAL_Jsq+JdmKj88Tp=N+V781qj+muEB6nuGpjDCgiPsrzB9tWMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-14 21:40 ` Jason Gunthorpe [this message]
2016-12-15 14:57 ` Rob Herring
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=20161214214012.GB6947@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).