75b57ecf9d
Device tree nodes are already treated as objects, and we already want to expose them to userspace which is done using the /proc filesystem today. Right now the kernel has to do a lot of work to keep the /proc view in sync with the in-kernel representation. If device_nodes are switched to be kobjects then the device tree code can be a whole lot simpler. It also turns out that switching to using /sysfs from /proc results in smaller code and data size, and the userspace ABI won't change if /proc/device-tree symlinks to /sys/firmware/devicetree/base. v7: Add missing sysfs_bin_attr_init() v6: Add __of_add_property() early init fixes from Pantelis v5: Rename firmware/ofw to firmware/devicetree Fix updating property values in sysfs v4: Fixed build error on Powerpc Fixed handling of dynamic nodes on powerpc v3: Fixed handling of duplicate attribute and child node names v2: switch to using sysfs bin_attributes which solve the problem of reporting incorrect property size. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David S. Miller <davem@davemloft.net> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
43 lines
793 B
Plaintext
43 lines
793 B
Plaintext
|
|
/ {
|
|
testcase-data {
|
|
security-password = "password";
|
|
duplicate-name = "duplicate";
|
|
duplicate-name { };
|
|
phandle-tests {
|
|
provider0: provider0 {
|
|
#phandle-cells = <0>;
|
|
};
|
|
|
|
provider1: provider1 {
|
|
#phandle-cells = <1>;
|
|
};
|
|
|
|
provider2: provider2 {
|
|
#phandle-cells = <2>;
|
|
};
|
|
|
|
provider3: provider3 {
|
|
#phandle-cells = <3>;
|
|
};
|
|
|
|
consumer-a {
|
|
phandle-list = <&provider1 1>,
|
|
<&provider2 2 0>,
|
|
<0>,
|
|
<&provider3 4 4 3>,
|
|
<&provider2 5 100>,
|
|
<&provider0>,
|
|
<&provider1 7>;
|
|
phandle-list-names = "first", "second", "third";
|
|
|
|
phandle-list-bad-phandle = <12345678 0 0>;
|
|
phandle-list-bad-args = <&provider2 1 0>,
|
|
<&provider3 0>;
|
|
empty-property;
|
|
unterminated-string = [40 41 42 43];
|
|
};
|
|
};
|
|
};
|
|
};
|