Subject: Re: [PATCH 4/4] powerpc: Call of_register_i2c_devices() for fsl-i2c.

From: Arnd Bergmann <[email-masked]>
Date: Thu, 7 Dec 2006 20:35:55 +0100

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 <><