[i2c] [PATCH 2/5] i2c: Allow preallocation of I2C bus numbers.

Jean Delvare khali at linux-fr.org
Sat May 19 00:47:55 EST 2007


On Thu, 17 May 2007 19:55:38 -0700, David Brownell wrote:
> I confess I don't quite follow the intent of this patch.
> 
>  - i2c_alloc_bus_number() ... why not just have the platform
>    maintainer define the numbers?  (Or in the OF case, just
>    have the OF glue assign them.)   And it's pointless to
>    export this, given it supports calling a non-exported routine.
> 
>  - i2c_add_prenumbered_adapter() ... caller should just set
>    adapter->number itself and call i2c_add_numbered_adapter();
>    no need for a new routine.
> 
> Both calls seem useless to me.

I can only second David's scepticism here. I fail to see the purpose of
this patch. It looks to me like we already have everything in place to
cover all use cases:

* If you need to declare the I2C devices before the I2C adapters are
created, you have i2c_register_board_info() and
i2c_add_numbered_adapter().

* If you declare the I2C adapters first, you have i2c_add_adapter() and
i2c_new_device/i2c_new_probed_device().

Scott, what problem were you trying to solve?

-- 
Jean Delvare



More information about the Linuxppc-dev mailing list