[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5358432F.8040202@gmail.com>
Date: Wed, 23 Apr 2014 15:48:15 -0700
From: Frank Rowand <frowand.list@...il.com>
To: Grant Likely <grant.likely@...aro.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Linux Kernel list <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH] sysfs, device-tree: aid for debugging device tree boot
problems
On 4/23/2014 4:54 AM, Grant Likely wrote:
> On Tue, 22 Apr 2014 20:20:44 -0700, Greg Kroah-Hartman <gregkh@...uxfoundation.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists