[U-Boot-Users] [Patch 5/9]U-boot-V2:cmd: add I2C commands

Menon, Nishanth x0nishan at ti.com
Mon Jun 23 15:29:07 CEST 2008


Sascha,
> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Monday, June 23, 2008 2:40 AM
> To: Menon, Nishanth
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [Patch 5/9]U-boot-V2:cmd: add I2C commands
>
> Are you aware of device parameters? Well, you are, they are used for
> setting the mac address and stuff like that. Maybe this would be a
> possibility for the user to change the address width.
Oh yeah, that would work just perfectly for our needs. Probably
additional patches can add that functionality.

>
> I don't think that this has to be dependent on an additional config
> option. I mean, is there something sensible left when this option is
> disabled?
Look at the makefile -> i2c-core.c which provides the basic
Infrastructure(i2c_transfer) is retained. Not all configurations need
i2c-dev. It is merely a debug tool. It is good to isolate it out.

> I haven't thought that to the end, that was just an idea, but it looks
> plausible. Please use 0 as base to simple_strtoul() so that the base is
> determined by the prefix.
I recommend a step by step approach, lets add features to the patches I
Proposed in a phased manner. Do comment on the patch(try2 and 3) I have send.

> Hm, what should the output look like for 'md /dev/i2cbusX'? How about
Do check the dox comments in patch try2/3. I have given a sample output.

> another command:
>
> i2cdetect -f /dev/i2cbusX
> - try to detect slave devices on a bus and register them.
This would be redundant. md command just works fine.
>
> or maybe just 'i2cadd -d -f /dev/i2cbusX' (d for detect) instead of
> another command.
This is a possible direction we could take, but -d will basically add
i2cdetect feature when none is required at the moment.

> whereas devinfo /dev/i2cbusX_Y could show the access mode (7bit/10bit
> addressing) and give the user a chance to change it.
We can add more information in show_info. Register width, data width being
The few of them. Current patches don't have that support, but is easy to
Introduce when we need them.

> It shouldn't need any changes, at least no i2c specific ones. If it
> does, we did something wrong.
Yes, I agree.

>
> >
> > The only negative I see is that folks need an additional command
> > to create a device node.
>
> Normally they wouldn't need it because mostly the board would register
> all devices available on the system. This may not be true for your
> board, but most boards I have only have an eeprom, a rtc and only a few
> other devices connected to the i2c bus. It's not a big memory penalty to
> register them.
>
Yes, you are right.


The current patches I have send provide the basic framework, all things we
Discussed above can be added in phases as our needs come in.

Regards,
Nishanth Menon




More information about the U-Boot mailing list