Device tree configuration for I2C eeprom

Grant Likely grant.likely at secretlab.ca
Fri Sep 19 17:44:58 EST 2008


On Fri, Sep 19, 2008 at 09:12:38AM +0200, Sebastian Siewior wrote:
> * Grant Likely | 2008-09-18 22:04:41 [-0700]:
> 
> >No, don't use the generic chip names.  Device tree convention is to be
> >specific and prefix the part number with the vendor name.  ie. You should
> >be using "at,at24c64", not "24c64".
> 
> What about the i2c drivers which don't have any prefix like the m41t80?
> Prior commit 0d1cde2 aka "powerpc/i2c: Convert i2c-mpc into an
> of_platform driver" the ids were converted.

Important Concept:  If the driver can't match with nodes that conform with
the device tree binding conventions, then it is a *Linux/device driver* bug;
not a device tree bug.  The device tree describes hardware.  It does not
describe the device driver implementation.

Do not fall into the temptation of writing the device tree to reflect
the current implementation of the operating system.  Stick to
established conventions and documented bindings.

That being said, it is a non-issue in this case.  The current Linux OF
support code automagically strips off the manufacturer prefix when
registering I2C devices.  Take a look at of_modalias_node() in
drivers/of/base.c for details.

g.



More information about the devicetree-discuss mailing list