From: Jens Scharsig <esw@bus-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch] Disable/Enable Flat I²C Commands
Date: Thu, 29 Jan 2009 12:46:34 +0100 [thread overview]
Message-ID: <gls4tp$bib$1@ger.gmane.org> (raw)
Since CONFIG_I2C_CMD_TREE are defined, the old flat i2c commands are
still present.
This patch disables the old flat command by default, if
CONFIG_I2C_CMD_TREE is defined.
The new option CONFIG_I2C_CMD_FLAT makes it possible to use the flat
commands in addition of tree commands.
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
diff --git a/README b/README
index 86c1304..3ad6d34 100644
--- a/README
+++ b/README
@@ -1306,6 +1306,9 @@ The following options need to be configured:
older 'imm', 'imd', 'iprobe' etc. commands are considered
deprecated and may disappear in the future.
+ CONFIG_I2C_CMD_FLAT enable the old flat i2c commands like
+ 'imm', 'imd', 'iprobe' etc. if CONFIG_I2C_CMD_TREE is defined.
+
CONFIG_HARD_I2C selects a hardware I2C controller.
CONFIG_SOFT_I2C configures u-boot to use a software (aka
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 16439ac..5fec13c 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1324,6 +1324,7 @@ U_BOOT_CMD(
#endif
);
#endif /* CONFIG_I2C_CMD_TREE */
+#if (defined(CONFIG_I2C_CMD_FLAT) || !defined(CONFIG_I2C_CMD_TREE))
U_BOOT_CMD(
imd, 4, 1, do_i2c_md, \
"i2c memory display", \
@@ -1369,6 +1370,7 @@ U_BOOT_CMD(
"chip address[.0, .1, .2] [# of objects]\n"
" - loop, reading a set of addresses\n"
);
+#endif /* CONFIG_I2C_CMD_FLAT/TREE */
#if defined(CONFIG_CMD_SDRAM)
U_BOOT_CMD(
next reply other threads:[~2009-01-29 11:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 11:46 Jens Scharsig [this message]
2009-01-29 18:16 ` [U-Boot] [Patch] Disable/Enable Flat I²C Commands Ben Warren
2009-01-29 18:23 ` Peter Tyser
2009-01-29 19:07 ` Wolfgang Denk
2009-01-29 19:30 ` Ben Warren
2009-01-29 20:37 ` Wolfgang Denk
2009-01-29 20:56 ` Peter Tyser
2009-01-29 21:04 ` Ben Warren
2009-01-29 21:15 ` Wolfgang Denk
2009-01-29 21:34 ` Peter Tyser
2009-01-29 20:59 ` Ben Warren
2009-01-29 18:52 ` Wolfgang Denk
2009-01-30 7:37 ` Jens Scharsig
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='gls4tp$bib$1@ger.gmane.org' \
--to=esw@bus-elektronik.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox