From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 18 May 2006 00:52:07 +0200 Subject: [U-Boot-Users] PATCH: Add command support for multiple I2C controllers In-Reply-To: Your message of "Wed, 17 May 2006 15:21:35 EDT." <1147893695.16780.239.camel@saruman.qstreams.net> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <1147893695.16780.239.camel@saruman.qstreams.net> you wrote: > > Attached is a second stab at a patch to allow access to multiple I2C > controllers. It enhances the command set by adding the following > command, which changes the 'current' I2C bus. Further write, read, > probe etc. commands will deal with the newly selected bus: > > ibus [bus_index] [speed in Hz] No. Please read my posting again. I want to see this as compatible as possible with other commands that operate on devices connected to busses. We use "ide dev ...", so I want to see "i2c dev" here, too. As mentioned before, in the long term all i2c related commands should become sub-commands to the new "i2c" command. > In addition, the logic for ignoring I2C devices during a probe command > has been enhanced to work with multiple controllers. The software has > been tested with new and old configurations (i.e. is backwards > compatible). > > Old way of ignoring devices: > > #define CFG_I2C_NOPROBES {0x11, 0x22} > > New way: > > #define CFG_I2C_MULTI_NOPROBES {0x11, 0x22, 0xff, 0x33, 0x44, 0xff} Argh... This is pretty unreadable. Can';t we just use an array of lists? Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Things are not as simple as they seem at first. - Edward Thorp