Wrapping proprietary nodes

Grant Likely grant.likely at secretlab.ca
Tue Oct 26 22:25:14 EST 2010


On Fri, Oct 22, 2010 at 02:44:54PM -0700, David VomLehn wrote:
> I expect my device tree will have some proprietary, one-off devices in
> it. Is it better to wrap these all up in one node:
> 
> 	cisco {
> 		device1 {
> 			...
> 		};
> 		device2 {
> 			...
> 		};
> 	};
> 
> Or should they be specified one node at a time:
> 
> 	cisco-device1 {
> 		...
> 	};
> 	cisco-device2 {
> 		...
> 	};
> 
> My inclination is for the former, but I'd prefer to follow existing usage,
> if any.

Neither.  The layout should reflect the actual hardware layout, and
the devices should follow the Generic Names recommended practice[1][2].

[1] http://playground.sun.com/1275/practice/gnames/gnamv14a.html
[2] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf
	section 2.2.2

The correct way to differentiate between devices (regardless of
whether or not the driver is proprietary, or if it is a custom device
for the system) is to use the 'compatible' property.  Therefore your
tree might look something like this:

	input@<address> {
		compatible = "cisco,<part/device>";
		...
	};
	dma-controller@<address> {
		compatible = "cisco,<part/device>";
		...
	};

g.


> -- 
> David VL
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss


More information about the devicetree-discuss mailing list