[i2c] mixed-speed I2C system

Nishanth Menon menon.nishanth at gmail.com
Sat Apr 7 17:41:51 CEST 2007


Syed Mohammed, Khasim stated on 4/6/2007 5:20 PM:
> static int omap2_i2c2_clkrate = 400;
>
> static struct platform_device omap_i2c_device2 = {
>         .name           = "i2c_omap",
>         .id             = 2,
>         .num_resources  = ARRAY_SIZE(i2c_resources2),
>         .resource       = i2c_resources2,
>         .dev            = {
>                 .platform_data = &omap2_i2c2_clkrate,
>         },
> };
>
> Can we add a config structure like the one for SPI shown below,
>
>   
I dont mind this, only I have to do extra work for a adaptor driver as a
kernel module wanting to use dev->platform_data for it's internal
structure storage. by default platform_data is "not controlled" if it
needs to use the clkrate, it will need to swap out the info in
platfom_data as required.
why do that when i have IORESOURCE and 0-7 bits for bus specific flags
which i can use??? it is cleaner I think.. basically my argument is
"speed" is a characteristic of a bus, hence a resource. we dont need to
"workaround it"... :) further, the current structure proposed cannot
handle describing either:
a) range of speed supported by the adapter
b) discrete speeds supported by the adapter.

How will we define the speed for a client? I think these structures need
to come from a common definition something similar to what i had done in
my HS Patch. the only issue with my patch is that it does not allow for
speed range support.

Regards,
Nishanth Menon



More information about the i2c mailing list