Subject: Re: [i2c] [PATCH] Convert i2c-mpc from a platform driver to an of_platform one

From: David Brownell <[email-masked]>
Date: Sun, 29 Jun 2008 19:51:14 -0700

On Sunday 29 June 2008, Jean Delvare wrote:
> 
> > After the i2c adapter registers itself, of_register_i2c_devices() is called
> > which walks through the child nodes of the i2c adapter node in the device
> > tree.  Each child node is an i2c device, and it immediately get
> > registered with the adapter.  Because this ensures that i2c device
> > registration always happens after adapter registration, and since the
> > pointer to the i2c_adapter is known, then i2c_new_device() can be used
> > directly without ever needing to know the bus number.
> 
> Ah, OK. If you use i2c_new_device() then it's alright.

Right.  Conceptually the way that the i2c core uses "numbered"
adapters and registered board_info could be viewed as a way to
let platforms avoid tracking that stuff themselves.  Since
the of_* framework is already tracking that, there's no big win
in trying to have i2c-core track that too, on its behalf.

- Dave