linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] of: Create sysfs view of device tree nodes
@ 2013-03-20 14:51 Grant Likely
  2013-03-20 14:51 ` [PATCH 1/2] of: Make device nodes kobjects so they show up in sysfs Grant Likely
  2013-03-20 14:51 ` [PATCH 2/2] of: remove /proc/device-tree Grant Likely
  0 siblings, 2 replies; 20+ messages in thread
From: Grant Likely @ 2013-03-20 14:51 UTC (permalink / raw)
  To: linux-kernel, devicetree-discuss

Hi all,

This series reworks the device tree userspace view to be exposed via
sysfs. I've been wanting to move to using kobjects to manage the device
tree for a while now. It results in less code overall, and it gives us
the userspace view "for free".

The first patch converts the device_nodes into kobjects and registers
them under /sys/firmware/ofw/device-tree. The second removes the old
/proc/device-tree support code and replaces it with a symlink from
/proc/device-tree to the sysfs view.

I attempted to also remove the virtual /proc/openprom filesystem, but
unfortunately /proc/devicetree and /proc/openprom use different
semantics. In /proc/devicetree the properties are exposed as raw
binaries, but in /proc/openprom the properties are all converted into
ascii string representation first.

I've tested this series on ARM and embedded powerpc. I have build tested
on SPARC and x86. Dave, I'm particularly interested to know how well
this runs on SPARC. I think I've got it right, but I haven't tested the
changes to the driver/of/pdt.c code.

g.

 Documentation/ABI/testing/sysfs-firmware-ofw |   28 ++++++
 drivers/of/Kconfig                           |   10 +-
 drivers/of/base.c                            |  180 +++++++++++++++++++++++-------------
 drivers/of/fdt.c                             |    3 +-
 drivers/of/pdt.c                             |    4 +-
 fs/proc/Makefile                             |    1 -
 fs/proc/proc_devtree.c                       |  243 -------------------------------------------------
 fs/proc/root.c                               |    3 -
 include/linux/of.h                           |   10 +-
 include/linux/proc_fs.h                      |   16 ----
 10 files changed, 156 insertions(+), 342 deletions(-)


[PATCH 1/2] of: Make device nodes kobjects so they show up in sysfs
[PATCH 2/2] of: remove /proc/device-tree

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-11-16 20:09 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 14:51 [PATCH 0/2] of: Create sysfs view of device tree nodes Grant Likely
2013-03-20 14:51 ` [PATCH 1/2] of: Make device nodes kobjects so they show up in sysfs Grant Likely
2013-03-20 14:57   ` Benjamin Herrenschmidt
2013-03-20 16:56     ` Greg Kroah-Hartman
2013-03-20 17:46       ` Benjamin Herrenschmidt
2013-03-20 21:28     ` Grant Likely
2013-03-20 14:51 ` [PATCH 2/2] of: remove /proc/device-tree Grant Likely
2013-03-20 14:57   ` Benjamin Herrenschmidt
2013-03-20 21:38     ` Grant Likely
2013-03-21  4:19       ` Benjamin Herrenschmidt
2013-03-21  7:35         ` Grant Likely
2013-03-21  7:43           ` Benjamin Herrenschmidt
2013-03-21  8:16             ` Grant Likely
2013-03-21 12:36               ` Benjamin Herrenschmidt
2013-03-21 12:42                 ` Grant Likely
2013-11-16 20:09                 ` Geert Uytterhoeven
2013-03-20 15:19   ` Rob Herring
2013-03-20 16:24     ` Daniel Mack
2013-03-20 16:40       ` Grant Likely
2013-03-21  4:03       ` Rob Landley

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).