[PATCH 4/4] powerpc: Call of_register_i2c_devices() for fsl-i2c.
Scott Wood
scottwood at freescale.com
Sat Dec 9 09:54:23 EST 2006
Kumar Gala wrote:
> What about doing the of_register_i2c_devices in the fsl-i2c driver
> itself. Than it knows what bus number its been assigned.
It won't know the dynamic bus number until after it registers the
adapter, which is too late (even if the new-style device registration
were modified to support registering devices after adapter registration,
legacy probing drivers for devices on the same address might grab the
device first, before the proper device gets registered).
The allocation of an i2c bus ID could be factored out into its own
function that gets called before registering the i2c adapter. This
(plus calling of_register_i2c_devices in the adapter driver) isn't much
different from passing the list in with the adapter registration, but it
would avoid some list management. OTOH, it means we'd have to continue
having global numeric bus IDs even after the last legacy driver is
converted.
-Scott
More information about the Linuxppc-dev
mailing list