RFC: new device types in the device tree (RE: [PATCH] powerpc: Add EDAC platform devices for 85xx)

Segher Boessenkool segher at kernel.crashing.org
Wed May 2 10:34:45 EST 2007


>> "name" = "memory-controller"
>> "compatible" = "fsl,85xx-memory-controller"
>> (or a more specific 85xx model if the controller
>> isn't identical across those chips)
>> No "device_type" at all, since there is no binding
>> for this kind of device.
>
> Is "no device_type" really the approach that should be
> taken?

Yes.

> booting-without-of.txt currently reads:
>
>    Every node which actually represents an actual device
>    (that is, a node which isn't only a virtual "container"
>    for more nodes, like "/cpus" is) is also required to
>    have a "device_type" property indicating the type of
>    node

That is wrong, IMNSHO.

> The 1275 spec is 'Open Firmware centric' in that it says
> you don't need a device_type if the node is not used
> by Open Firmware.

It is "Open firmware centric" in every way; it is
the Open firmware definition after all.

"device_type" specifies what firmware interfaces a
node implements.  "name" and "compatible" are for
the client (i.e., OS, bootloader, etc.) to use for
matching drivers to device nodes.

It typically makes no sense to create a new "device_type"
value for anything else than very generic classes of
device, where you can drive the device without knowing
anything else than what is defined in the binding for
that "device_type".

> What should the approach be for new device types that
> keep popping up?   If the device type is generally useful
> I think it makes sense to create a binding and add it to
> booting-without-of.txt-- essentially documenting the
> required properties, their values, and what they mean.

And the associated methods and anything else that is
needed.  It would be a big mistake to create incompatibilities
with "real OF" where those can be avoided just as easily.

> If it is vendor specific, that vendor should create some
> vendors specific doc for their bindings--
> Documentation/powerpc/fsl-of-dev-bindings.txt.
>
> Comments?

In short: having a "device_type" in your node doesn't
help at all if all users need to know the "compatible"
property as well; and it _does_ hurt.


Segher




More information about the Linuxppc-dev mailing list