[PATCH 4/4] powerpc: Call of_register_i2c_devices() for fsl-i2c.
Arnd Bergmann
arnd at arndb.de
Fri Dec 8 06:35:55 EST 2006
On Thursday 07 December 2006 18:35, Scott Wood wrote:
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -345,6 +345,8 @@ static int __init fsl_i2c_of_init(void)
> fsl_i2c_platform_data));
> if (ret)
> goto unreg;
> +
> + of_register_i2c_devices(np, i);
> }
I get the impression that this fsl_i2c_of_init function is doing the
probing in the opposite way it should. Instead of searching the
whole device tree for type="i2c" devices to call
platform_device_register_simple, can't you use of_platform_bus_probe
to create the i2c device in the first place, and then have a
of_platform_driver that calls of_register_i2c_devices() in its probe
function?
Arnd <><
More information about the Linuxppc-dev
mailing list