From: Frank Rowand <frowand.list@gmail.com>
To: Grant Likely <grant.likely@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh+dt@kernel.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] sysfs, device-tree: aid for debugging device tree boot problems
Date: Wed, 23 Apr 2014 15:48:15 -0700 [thread overview]
Message-ID: <5358432F.8040202@gmail.com> (raw)
In-Reply-To: <20140423115418.A8C0EC40969@trevor.secretlab.ca>
On 4/23/2014 4:54 AM, Grant Likely wrote:
> On Tue, 22 Apr 2014 20:20:44 -0700, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> On Tue, Apr 22, 2014 at 06:25:25PM -0700, Frank Rowand wrote:
>>> Create some infrastructure to aid trouble shooting device tree related
>>> boot issues.
>>>
>>> Add a %driver_name file to each device tree node sysfs directory which has had
>>> a driver bound to it. This allows detecting device tree nodes which failed
>>> to be bound to any driver.
>>
>> Why is this needed, shouldn't there already be a "driver" symlink in
>> sysfs for these devices when a driver binds to them? The rest of the
>> driver model works that way, why is of devices any different?
>>
>
> Because it hasn't been added yet! I only just committed the change to
> convert device_nodes into kobjects in v3.14. The next step is to add
> driver symlinks.
No need to add a "driver" symlink. The device directories in sysfs already
have a driver symlink.
>
> That said, the devicetree node is already exposed in the uevent for a
> device. It should already be possible to find all device tree nodes that
> don't have a device, or devices without a driver:
>
> To get a list of all nodes:
>
> find /proc/device-tree/ -type d | sed -e 's/\/proc\/device-tree//'
>
> or a little more nuanced, only choosing nodes with a compatible property:
>
> for k in `find /proc/device-tree/ -name compatible`; do
> echo $(dirname $k) | sed -e 's/\/proc\/device-tree//'
> done | sort
>
> It can get even more refined than that if need be.
>
> To get a list of all nodes with a device that has been created:
>
> for k in `find devices -name uevent`; do
> grep '^OF_FULLNAME' $k | sed -e 's/OF_FULLNAME=//'
> done | sort
< snip >
Thanks Grant! I did not realize that uevent contained that
information.
-Frank
next prev parent reply other threads:[~2014-04-23 22:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 1:25 [PATCH] sysfs, device-tree: aid for debugging device tree boot problems Frank Rowand
[not found] ` <53571685.5060403-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-23 3:20 ` Greg Kroah-Hartman
[not found] ` <20140423032044.GA26233-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2014-04-23 11:54 ` Grant Likely
2014-04-23 22:48 ` Frank Rowand [this message]
2014-04-28 15:09 ` Grant Likely
2014-04-23 22:45 ` Frank Rowand
2014-04-23 23:45 ` Greg Kroah-Hartman
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=5358432F.8040202@gmail.com \
--to=frowand.list@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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).