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
> [email protected]
> https://lists.ozlabs.org/listinfo/devicetree-discuss
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to