[U-Boot-Users] [PATCH 1/2] Add support for multiple I2C buses
Ben Warren
bwarren at qstreams.com
Fri Sep 1 21:42:53 CEST 2006
On Thu, 2006-08-31 at 22:45 -0500, Nishanth Menon wrote:
> Ben Warren stated on 8/30/2006 4:35 PM:
>
> > Overview:
> <snip>
> > be skipped by the 'i2c probe' command.
> Thanks Ben, this is finally in tune with Denx requirements I guess ;)
Hope so...
> > ------------------------------------------------------------------------
> >
> > diff --git a/README b/README
> > index e772c1a..f674050 100644
> > --- a/README
> > +++ b/README
> > @@ -1188,7 +1188,12 @@ The following options need to be configu
> > clock chips. See common/cmd_i2c.c for a description of the
> > command line interface.
> >
> > - CONFIG_HARD_I2C selects the CPM hardware driver for I2C.
> > + CONFIG_I2C_CMD_TREE is a recommended option that places
> > + all I2C commands under a single 'i2c' root command. The
> > + older 'imm', 'imd', 'iprobe' etc. commands are considered
> > + deprecated and may disappear in the future.
> > +
> > + CONFIG_HARD_I2C selects a hardware I2C controller.
> I guess I am slow abt this.... but !slow_i2c... is that not good enough?
> and I cant see any other part in the the common patch using it...
Sorry, I don't know what you're talking about. What's slow_i2c? I just
grepped the source and didn't find it anywhere.
> > diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
> > index c543bb5..824f7c7 100644
> > --- a/common/cmd_i2c.c
> > +++ b/common/cmd_i2c.c
>
> > +int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
> > +{
> > + int speed, ret=0;
> > +
> > + if (argc == 1) /* querying current speed */
> > + {
> > + printf("Current bus speed=%d\n", i2c_get_bus_speed());
> > + }
> > + else
> > + {
> > + speed = simple_strtoul(argv[1], NULL, 10);
> > + printf("Setting bus speed to %d Hz\n", speed);
> > + ret = i2c_set_bus_speed(speed);
> > + if(ret)
> > + {
> > + printf("Failure changing bus speed (%d)\n", ret);
> > + }
> > + }
> > + return ret;
> > +}
> Err... Does this mean that all other folks who can only support a single
> speed need to implement this api (including all other existing
> drivers??)...... Lotsa people are not going to like this if that is so...
Yes. If you want to use the new command tree, you'll have to add a
small number of stub functions to your driver. Or else use the old
commands. Although I've mentioned deprecation, I suspect they'll be
around longer than you or me. I guess if there's huge pushback we can
always wrap these calls by yet another CONFIG option, but aren't there
enough already?
>
> Looks good to me.. it should fit in OMAP2430 framework too :)
>
> Some one gotta tell Denx to update this:
> http://sourceforge.net/cvs/?group_id=65938. i thought we moved to git
> sometime back. Do we even look at cvs anymore??? :(
>
Wolfgang has mentioned MANY times to people that the CVS isn't in use
any more and to use git. I suspect it's hard if not impossible to
remove that from Sourceforge, and obviously Wolfgang has lots of things
on his plate that have a priority...
> Regards,
> Nishanth Menon
More information about the U-Boot
mailing list