Commit d9fc703246840c4b268debf48c334ba55c597dc0

Authored by Matthias Fuchs
Committed by Stefan Roese
1 parent ced5b90290

[PATCH] I2C: disable flat i2c commands when CONFIG_I2C_CMD_TREE is defined

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>

Showing 1 changed file with 20 additions and 20 deletions Side-by-side Diff

... ... @@ -948,7 +948,27 @@
948 948  
949 949 /***************************************************/
950 950  
  951 +#if defined(CONFIG_I2C_CMD_TREE)
951 952 U_BOOT_CMD(
  953 + i2c, 6, 1, do_i2c,
  954 + "i2c - I2C sub-system\n",
  955 +#if defined(CONFIG_I2C_MULTI_BUS)
  956 + "dev [dev] - show or set current I2C bus\n"
  957 +#endif /* CONFIG_I2C_MULTI_BUS */
  958 + "i2c speed [speed] - show or set I2C bus speed\n"
  959 + "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
  960 + "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
  961 + "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
  962 + "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
  963 + "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
  964 + "i2c probe - show devices on the I2C bus\n"
  965 + "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
  966 +#if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
  967 + "i2c sdram chip - print SDRAM configuration information\n"
  968 +#endif /* CFG_CMD_SDRAM */
  969 +);
  970 +#else /* CONFIG_I2C_CMD_TREE */
  971 +U_BOOT_CMD(
952 972 imd, 4, 1, do_i2c_md, \
953 973 "imd - i2c memory display\n", \
954 974 "chip address[.0, .1, .2] [# of objects]\n - i2c memory display\n" \
... ... @@ -1002,26 +1022,6 @@
1002 1022 " (valid chip values 50..57)\n"
1003 1023 );
1004 1024 #endif
1005   -
1006   -#if defined(CONFIG_I2C_CMD_TREE)
1007   -U_BOOT_CMD(
1008   - i2c, 6, 1, do_i2c,
1009   - "i2c - I2C sub-system\n",
1010   -#if defined(CONFIG_I2C_MULTI_BUS)
1011   - "dev [dev] - show or set current I2C bus\n"
1012   -#endif /* CONFIG_I2C_MULTI_BUS */
1013   - "i2c speed [speed] - show or set I2C bus speed\n"
1014   - "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
1015   - "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
1016   - "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
1017   - "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
1018   - "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
1019   - "i2c probe - show devices on the I2C bus\n"
1020   - "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
1021   -#if (CONFIG_COMMANDS & CFG_CMD_SDRAM)
1022   - "i2c sdram chip - print SDRAM configuration information\n"
1023   -#endif /* CFG_CMD_SDRAM */
1024   -);
1025 1025 #endif /* CONFIG_I2C_CMD_TREE */
1026 1026  
1027 1027 #endif /* CFG_CMD_I2C */