PATCH: Support for multiple I2C controllers + new command structure
Hello,
Let's try this again - attached is a patch which provides command support for multiple I2C devices in U-Boot. This isn't meant as a final submission, more as a design review. The features:
1. Include new 'i2c' command (based on USB implementation) using CONFIG_I2C_CMD_TREE. Note - this should probably be a bit in CONFIG_COMMANDS, but right now I'm more interested in feedback for the command structure.
2. Allow multiple buses by defining CONFIG_I2C_MULTI_BUS. Note that this is only available under the new 'i2c' command mentioned in bullet 1.
3. Allow by-passing of devices when probing a bus by defining CFG_I2C_MULTI_NOPROBES. This array contains a list for each bus, where lists are delimited by 0xff. I'm sticking with this implementation for now because I can't come up with anything better.
Not implemented yet:
- support for 10-bit addresses
- integration of new command into CONFIG_COMMANDS
- Different approach for no-probe list, as requested by Wolfgang Denk.
CHANGELOG:
Added new 'i2c' master command for all I2C interaction. This is
conditionally compiled with CONFIG_I2C_CMD_TREE. New commands added for setting I2C bus speed as well as changing the active bus if the board has more than one bus (conditionally compiled with CONFIG_I2C_MULTI_BUS). Added a list of devices to ignore when probing the buses when more than one bus is present.
Please have a look and let me know what you think. Any comments on style as well as substance are welcomed.
regards,
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: I2C_CMD.patch
Type: text/x-patch
Size: 7272 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060522/6ebe783c/attachment.bin