From: Stephan Linz <linz@mazet.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Proposal to add "ispeed" (I2C speed) command
Date: Thu, 4 Mar 2004 09:48:12 +0100 [thread overview]
Message-ID: <04030409481200.12732@pcj86> (raw)
In-Reply-To: <11176.216.110.51.8.1078335375.squirrel@www.orkun.us>
Hi Tolunay,
Am Mittwoch, 3. M?rz 2004 18:36 schrieb listmember at orkun.us:
> We have some instrumentation hanging on I2C bus. I would like to introduce
> a new u-boot command ispeed to set the i2c speed so fast devices would not
> be constrained to the lowest denominator speed.
Makes sense, but why do you need measuring datas in context of a bootloader ?
>
> If desired we can make be conditionally included if CONFIG_CMD_ISPEED
> (suggestions?) so it would not take space when it is not needed (or
> desired) on a particular board. The proposed syntax would be.
>
> ispeed {i2c bus speed}
>
> Since u-boot uses hex: 100kHz => 186A0, 400kHz => 61A80
Hm, I think you should expand the command syntax -- ex.:
ispeed [i2c_bus_speed_in_hz]
Without a argument 'ispeed' gets back the current setting.
With an argument 'ispeed' converts the given string to ulong and setup the
new speed. The argument can be a decimal integer, because simple_strtoul()
from lib_generic/vsprintf.c understands base option 10.
> I would also set an environment variable in ispeed command indicating
> current i2c speed ("i2cspeed") so it could be used in scripts.
Is it really needed ... I don't think so. You can read back the current
setting with 'ispeed' and save the result into a environment variable of
your choice. So you can use it again in another or the same script.
Best Regards,
Stephan Linz
next prev parent reply other threads:[~2004-03-04 8:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-03 17:36 [U-Boot-Users] Proposal to add "ispeed" (I2C speed) command listmember at orkun.us
2004-03-04 8:48 ` Stephan Linz [this message]
2004-03-04 15:58 ` listmember at orkun.us
2004-03-04 16:13 ` Wolfgang Denk
2004-03-04 9:11 ` Wolfgang Denk
2004-03-04 12:33 ` Stephan Linz
2004-03-04 13:21 ` Wolfgang Denk
2004-03-04 15:08 ` Stephan Linz
2004-03-04 16:10 ` listmember at orkun.us
2004-03-04 16:36 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04030409481200.12732@pcj86 \
--to=linz@mazet.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.