[PATCH v2] i2c: core: make it possible to match a pure device tree driver

Grant Likely grant.likely at linaro.org
Wed Jun 12 23:20:22 EST 2013


On Fri, 7 Jun 2013 23:32:42 +0200, Wolfram Sang <wsa at the-dreams.de> wrote:
> ...
> > I2C devices probed from device tree should subsequently be
> > fixed to handle the case where of_match_table() is
> > used (I think none of them do that today), and platforms should
> > fix their device trees to use compatible strings for I2C devices
> > instead of setting the name to Linux device driver names as is
> > done in multiple cases today.
> 
> I guess your solution is the least intrusive one. Still, it could happen
> that of_match_table is scanned three times (by driver core, i2c layer,
> and i2c driver) which is IMO an indication to look for a more elegant
> solution tp find out what really matched?

It's what we do on platform_devices. It really isn't an expensive
operation so I haven't pushed anyone to go optimize it.

g.


More information about the devicetree-discuss mailing list