On Fri, Jun 7, 2013 at 11:32 PM, Wolfram Sang <wsa@xxxxxxxxxxxxx> 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? I think that is a generic problem with the device tree being completely stateless, and rather a comment on the of_match_device() intrinsics being inelegant than on this patch? Do you see it as a blocker for the patch? What happens before this patch is that instead of looping over the of_match_table, the id_table is always iterated to the end also in the DT case, yielding NULL as the last argument to driver->probe() anyway. Maybe the OF people have some comments on this... I cannot really see how it could be any different given the way the FDT works :-/ Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html