Skip to contentSkip to conversation

cmd_i2c: Update available commands when CONFIG_I2C_CMD_TREE is defined

PATCH New Peter Tyser 3 participants 5 messages Oct 1, 2008 – Oct 15, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 common/cmd_i2c.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
common/cmd_i2c.c +2 -3
index ea80e8a..8a3cf10 100644
@@ -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 */
Signature · 1 line
1.6.0.2.GIT
#1 lore raw

PATCH 1/1 cmd_i2c: Update available commands when CONFIG_I2C_CMD_TREE is defined

Dear Peter Tyser,

Quoted 3 lines · In message <[email protected]> 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

Signature · 5 lines
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
Cogito cogito ergo cogito sum - "I think that I  think,  therefore  I
think that I am."          - Ambrose Bierce, "The Devil's Dictionary"
#2 lore raw

PATCH 1/1 cmd_i2c: Update available commands when CONFIG_I2C_CMD_TREE is defined

Hello Wolfgang,

Quoted 8 lines
Quoted 3 lines · In message <[email protected]> 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.

Quoted 6 lines

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

#3 lore raw

PATCH 1/1 cmd_i2c: Update available commands when CONFIG_I2C_CMD_TREE is defined

Dear Peter,

Quoted 6 lines · In message <[email protected]> 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.

Quoted 4 lines

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

Signature · 5 lines
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
Unsichtbar macht sich die Dummheit, indem sie immer  gr??ere  Ausma?e
annimmt.                             -- Bertold Brecht: Der Tui-Roman
#4 lore raw

PATCH 1/1 cmd_i2c: Update available commands when CONFIG_I2C_CMD_TREE is defined

In reply to Peter Tyser

Peter,

Quoted 23 lines · Peter Tyser

Hello Wolfgang,

Quoted 8 lines
Quoted 3 lines · In message <[email protected]> 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.

Quoted 6 lines

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."

Quoted 5 lines

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.

Quoted 3 lines

Best,
Peter

regards,
Ben