[RFC] Rework of i2c-mpc.c - Freescale i2c driver

Scott Wood scottwood at freescale.com
Wed Nov 7 04:36:23 EST 2007


Jean Delvare wrote:
>>>> We might as well just use i2c_new_device() instead of messing around
>>>> with bus numbers.  Note that this is technically no longer platform
>>>> code, so it's harder to justify claiming the static numberspace.
>>> I was allowing control of the bus number with "cell-index" and
>>> i2c_add_numbered_adapter().
>>> Should I get rid of this and switch to i2c_add_adapter()?
>> Yes.
> 
> No! If you don't call i2c_add_numbered_adapter() then new-style i2c
> clients will never work on your i2c adapter.

I thought that was what i2c_new_device() was for?

By handling all the device tree stuff in the driver, it acts more like 
an add-on adapter than a platform device.

-Scott



More information about the Linuxppc-dev mailing list