Timur Tabi wrote:
Scott Wood wrote:
No, it's not. It can determine that it's at address 0x4f on the i2c bus
at 0xe0003100. This is exactly how the ethernet phy lookup is done.
But how does the fabric driver know whether e0003100 is I2C1 or I2C2?
It shouldn't have to care.
And how does the codec driver, which sees only I2C information, know that it's
at e0003100?
This is an internal communications failure within the i2c layer, not
something that warrants expression in the device tree. Some solutions,
in increasing order of desirability, are:
1. Assign the I2C bus number based on the adapter's register offset.
2. Let the adapter provide a more helpful bus_id than a Linux-assigned
index.
3. Create a way to look up an I2C device by its OF node.
-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev