[U-Boot] silencing i2c dev?

Wolfgang Denk wd at denx.de
Fri Oct 1 12:47:34 CEST 2010


Dear Frans Meulenbroeks,

In message <AANLkTike41SDknUxKr+AbEbcu6pAXCLnURw4S1GHjWj=@mail.gmail.com> you wrote:
> If I run i2c dev to set the bus it replies what it did:
> 
> => i2c dev 0
> Setting bus to 0

I actually consider thsi somewhat useful, as you are performing a
change of the system state, and it is pretty useful to see that it did
what you wanted to do.

> Btw there might also be a parsing issue. I once mistyped the cmd but
> still it worked:
> 
> => i2c de v0
> Setting bus to 0
> 
> Haven't had time to dig into this

That's simple. We use strtoul to convert the argument to a bus number,
and "v0" converts as 0.

If you had typed

	=> i2c de v1

you would probably have appeciated the "Setting bus to 0" response...

[Ok, more error checking is an option, too ;-) ]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q: What do you get when you cross an ethernet with an income statement?
A: A local area networth.


More information about the U-Boot mailing list