summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2008-10-01 12:25:04 -0500
committerWolfgang Denk <wd@denx.de>2008-10-14 22:27:04 +0200
commit9bc2e4eee3bcb8e63847d7a733e0c607807d6141 (patch)
tree95e1f155d91635accd3fa498c04b30ef9bdabc28 /common
parenta0b1b610e980e253d4c2519ee15bd0937c3f8be1 (diff)
downloadu-boot-imx-9bc2e4eee3bcb8e63847d7a733e0c607807d6141.zip
u-boot-imx-9bc2e4eee3bcb8e63847d7a733e0c607807d6141.tar.gz
u-boot-imx-9bc2e4eee3bcb8e63847d7a733e0c607807d6141.tar.bz2
cmd_i2c: Fix help for CONFIG_I2C_CMD_TREE && !CONFIG_I2C_MULTI_BUS
Original code displayed: => help i2c i2c i2c speed [speed] - show or set I2C bus speed i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device ... Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_i2c.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index ef3928e..ea80e8a 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1220,12 +1220,12 @@ int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
+ if (!strncmp(argv[1], "sp", 2))
+ return do_i2c_bus_speed(cmdtp, flag, --argc, ++argv);
#if defined(CONFIG_I2C_MULTI_BUS)
if (!strncmp(argv[1], "de", 2))
return do_i2c_bus_num(cmdtp, flag, --argc, ++argv);
#endif /* CONFIG_I2C_MULTI_BUS */
- if (!strncmp(argv[1], "sp", 2))
- return do_i2c_bus_speed(cmdtp, flag, --argc, ++argv);
if (!strncmp(argv[1], "md", 2))
return do_i2c_md(cmdtp, flag, --argc, ++argv);
if (!strncmp(argv[1], "mm", 2))
@@ -1256,10 +1256,10 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
U_BOOT_CMD(
i2c, 6, 1, do_i2c,
"i2c - I2C sub-system\n",
+ "speed [speed] - show or set I2C bus speed\n"
#if defined(CONFIG_I2C_MULTI_BUS)
- "dev [dev] - show or set current I2C bus\n"
+ "i2c dev [dev] - show or set current I2C bus\n"
#endif /* CONFIG_I2C_MULTI_BUS */
- "i2c speed [speed] - show or set I2C bus speed\n"
"i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
"i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
"i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"