[U-Boot-Users] PATCH: Add command support for second I2Ccontroller
Menon, Nishanth
x0nishan at ti.com
Tue May 16 17:43:51 CEST 2006
Ben,
> This approach sounds good. The only down-side that I can see is that
> the driver needs to keep track of context. Personally, I prefer
Yes and no, yes- if the driver has multiple busses to support, and no-
if they don't have multiple busses to support.
>
> In order to do this properly, we should add to the base API in
> include/i2c.h something like:
>
> void i2c_set_bus(uchar dev);
> uchar i2c_get_bus(void);
> void i2c_set_bus_speed(int speed);
> int i2c_get_bus_speed(void);
>
> or merge the index and speed as you have in your code.
For controllers allowing me to switch between standard/full speed/HS
mode or standard/fullspeed: Two commands to run
Versus:
For controllers having a single speed:
One command..
Interesting call.. Being biased towards my platform I'd suggest merged
code.. but I leave it to the common wisdom to decide :)
>
> The drivers can then either choose to implement or not implement this
> feature, and we can add a parallel command tree based on 'i2c' as
> Wolfgang has suggested.
Don't know if a parallel cmd tree is required, as far as I see, it is an
additional command to extend the reach of i2c driver, and since the
changes wont affect other drivers, I hope it can be patched in to the
mainline tree..
Regards,
Nishanth Menon
More information about the U-Boot
mailing list