[PATCH] of: support an enumerated-bus compatible value

Segher Boessenkool segher at kernel.crashing.org
Tue Jul 3 10:27:15 EST 2012


>> So what is the issue?  You have some node (the "bus node") under  
>> which
>> you have the "regulator at 0", "frobnicator at 1" etc. nodes.  You refer to
>> these device nodes by phandle always, you cannot programmatically
>> control those devices (otherwise, they should be child node of a  
>> *real*
>> bus node).  The bus node does not represent any device at all, and no
>> device driver can ever do anything with it; it should not have a
>> "compatible" property either.
>
> Without the "bus" node having a compatible property, nothing will
> recurse into it to instantiate the devices that the child nodes
> represent; the fact that they're reference by phandle doesn't
> instantiate the device, just references it.

Why would you want to instantiate devices that you cannot address
at all anyway?  The only driver that can know what to do with the
device node is the driver for the device that has the phandle
reference to it; it can instantiate it.

A bus node without "compatible" is Just Fine(tm), and not unusual
at all either; if current Linux will not work with devices under
such a bus node, well, there's a bug to fix then :-)


Segher



More information about the devicetree-discuss mailing list