Jean Delvare wrote:
> Sorry, I've not been completely clear. Yes, you can use
> i2c_new_device() on an adapter that has been added with
> i2c_add_adapter(). However, this requires that you have a reference to
> that i2c_adapter, which is usually not the case with system-wide I2C
> buses.

But it is the case here, because the i2c driver knows about the device 
tree, and thus can pass the device tree node and the adapter struct to 
the enumeration function.

The driver should still do i2c_add_numbered_adapter() when using the 
non-OF platform device binding, in which case it gets the bus number 
from the platform data.

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to