[U-Boot] [PATCH] cmd_i2c: Update available commands when CONFIG_I2C_CMD_TREE is defined

If CONFIG_I2C_CMD_TREE is defined, individual i2c commands such as 'imd', 'imm', 'imw', etc should not be available as their functionality is duplicated in the 'i2c' command.
Signed-off-by: Peter Tyser ptyser@xes-inc.com --- common/cmd_i2c.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index ea80e8a..8a3cf10 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -1248,11 +1248,9 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) printf ("Usage:\n%s\n", cmdtp->usage); return 0; } -#endif /* CONFIG_I2C_CMD_TREE */
/***************************************************/
-#if defined(CONFIG_I2C_CMD_TREE) U_BOOT_CMD( i2c, 6, 1, do_i2c, "i2c - I2C sub-system\n", @@ -1271,7 +1269,7 @@ U_BOOT_CMD( "i2c sdram chip - print SDRAM configuration information\n" #endif ); -#endif /* CONFIG_I2C_CMD_TREE */ +#else /* !CONFIG_I2C_CMD_TREE */ U_BOOT_CMD( imd, 4, 1, do_i2c_md, \ "imd - i2c memory display\n", \ @@ -1326,3 +1324,4 @@ U_BOOT_CMD( " (valid chip values 50..57)\n" ); #endif +#endif /* CONFIG_I2C_CMD_TREE */

Dear Peter Tyser,
In message 1222883937-2640-1-git-send-email-ptyser@xes-inc.com you wrote:
If CONFIG_I2C_CMD_TREE is defined, individual i2c commands such as 'imd', 'imm', 'imw', etc should not be available as their functionality is duplicated in the 'i2c' command.
If I remember correctly, there has been discussion to keep both variants in parallel for some transition time.
I have added a link to your patch to the Feature Removal page at http://www.denx.de/wiki/U-Boot/TaskFeatureRemovalSchedule so we will not forget this as soon as e have a formal Feature Removal file in place.
Is this OK with you?
Best regards,
Wolfgang Denk

Hello Wolfgang,
In message 1222883937-2640-1-git-send-email-ptyser@xes-inc.com you wrote:
If CONFIG_I2C_CMD_TREE is defined, individual i2c commands such as 'imd', 'imm', 'imw', etc should not be available as their functionality is duplicated in the 'i2c' command.
If I remember correctly, there has been discussion to keep both variants in parallel for some transition time.
I have added a link to your patch to the Feature Removal page at http://www.denx.de/wiki/U-Boot/TaskFeatureRemovalSchedule so we will not forget this as soon as e have a formal Feature Removal file in place.
Is this OK with you?
According to the top-level README file since at least U-Boot v1.1.5: "CONFIG_I2C_CMD_TREE is a recommended option that places all I2C commands under a single 'i2c' root command. The older 'imm', 'imd', 'iprobe' etc. commands are considered deprecated and may disappear in the future."
I personally think that the 2 year warning the README gave is sufficient but don't have a strong preference if this feature is removed now or at a later date. Either way, I think the task feature removal schedule in general is a great idea.
Best, Peter

Dear Peter,
In message 1224017454.18428.178.camel@localhost.localdomain you wrote:
According to the top-level README file since at least U-Boot v1.1.5: "CONFIG_I2C_CMD_TREE is a recommended option that places all I2C commands under a single 'i2c' root command. The older 'imm', 'imd', 'iprobe' etc. commands are considered deprecated and may disappear in the future."
Yes, I know. But then "may disappear in the future" is not really clear. We should set a specific date.
I personally think that the 2 year warning the README gave is sufficient but don't have a strong preference if this feature is removed now or at a later date. Either way, I think the task feature removal schedule in general is a great idea.
Fine. So let's add such a file for the next release. 6 more months will not really matter :-)
Best regards,
Wolfgang Denk

Peter,
On Tue, Oct 14, 2008 at 1:50 PM, Peter Tyser ptyser@xes-inc.com wrote:
Hello Wolfgang,
In message 1222883937-2640-1-git-send-email-ptyser@xes-inc.com you wrote:
If CONFIG_I2C_CMD_TREE is defined, individual i2c commands such as 'imd', 'imm', 'imw', etc should not be available as their functionality is duplicated in the 'i2c' command.
If I remember correctly, there has been discussion to keep both variants in parallel for some transition time.
I have added a link to your patch to the Feature Removal page at http://www.denx.de/wiki/U-Boot/TaskFeatureRemovalSchedule so we will not forget this as soon as e have a formal Feature Removal file in place.
Is this OK with you?
According to the top-level README file since at least U-Boot v1.1.5: "CONFIG_I2C_CMD_TREE is a recommended option that places all I2C commands under a single 'i2c' root command. The older 'imm', 'imd', 'iprobe' etc. commands are considered deprecated and may disappear in the future."
I personally think that the 2 year warning the README gave is sufficient but don't have a strong preference if this feature is removed now or at a later date. Either way, I think the task feature removal schedule in general is a great idea.
As the author of this stuff, I apologize for the ambiguous wording. At the time, I lobbied to have the old-style commands removed and IIRC we settled on leaving them for a couple of releases. You have my full ACK to purge it at any time.
Best, Peter
regards, Ben
participants (3)
-
Ben Warren
-
Peter Tyser
-
Wolfgang Denk