[U-Boot] [PATCH] 0/12 Multiadapter/multibus I2C

ksi at koi8.net ksi at koi8.net
Fri Feb 13 21:15:22 CET 2009


On Fri, 13 Feb 2009, Heiko Schocher wrote:

> Hello ksi,
> 
> ksi at koi8.net wrote:
> > Here is the second attempt for initial portion of multibus/multiadapter
> > I2C support.
> >   
> 
> Can you please send your patches with some better commit messages.
> You only send your Signed-off-by, without any explanation. Please
> change this.

There is not much sense in extensive commit messages in this case, IMHO. It
is not a bug fix or added feature at one particular place; it is a major
rework. The only message I can give is something like "Changes for
multiadapter/multibus I2C support..."

I'll add it to the second attempt that I will make later today.

> > This includes a set of common files, all drivers in drivers/i2c and all
> > boards affected by these changes (config files, board files, and lib_xx
> > files.)
> >
> > There is an illustrative example of multiadapter multibus I2C config in
> > MPC8548CDS.h config file (#if 0'd.) Definitions in that example are
> > bogus so please don't expect it to work. It will compile though...
> >
> > This set also includes big rework for soft_i2c.c that makes it template
> > version that allows up to 4 bitbanged adapters. This number can be
> >   
> 
> Didn;t you try my suggestion? This is a really big define monster now,
> which I think, we can avoid, and without to change nearly all lines of
> the existing driver.

We can not avoid it. At least I can not see an easy way to do this. SOFT_I2C
is special. Those multiple e.g. MXC or OMAP3 adapters can be parameterized
because different channels do only differ in their base address that can be
made into a parameter. Software I2C is totally different because it has
totally different functions for different channels, there is nothing we can
make into a parameter. All those I2C_SDA etc. are NOT DEFINES, they are
MACROS. Every function for every channel is built of those macros that can
be absolutely different for each channel. They define NOT some PARAMETERS
but function TEXT that will be compiled into executable code.

This is how it is done in Linux kernel (see e.g. drivers/hwmon/lm93.c.)

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************


More information about the U-Boot mailing list