From 65a97e7fcf54feb7c4ebe1aee8a572830af4cf51 Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Fri, 7 Dec 2018 14:50:37 +0100 Subject: cmd: Kconfig: Do not include EEPROM if DM_I2C is used without DM_I2C_COMPAT The implementation of the EEPROM commands does not support the DM I2C API. Prevent compilation breakage by not enabling it if the non-DM API is not available (if DM_I2C is used without DM_I2C_COMPAT) Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Heiko Schocher --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index b1cd1c9690..ea1a325eb3 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -445,6 +445,7 @@ config CRC32_VERIFY config CMD_EEPROM bool "eeprom - EEPROM subsystem" + depends on !DM_I2C || DM_I2C_COMPAT help (deprecated, needs conversion to driver model) Provides commands to read and write EEPROM (Electrically Erasable -- cgit v1.2.1 From 19f8c4dfb6e744a31da59bdd23b24d144152f1dc Mon Sep 17 00:00:00 2001 From: Christoph Muellner Date: Tue, 4 Dec 2018 11:27:18 +0100 Subject: cmd: i2c: Fix help output of i2c command. In case SYS_I2C or DM_I2C are defined, then the "i2c " prefix of the "i2c crc32" command is missing. This patch addresses this, so that users can't get confused by the "crc32" command. Without the patch we get => i2c help i2c - I2C sub-system Usage: i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info crc32 chip address[.0, .1, .2] count - compute CRC32 checksum i2c dev [dev] - show or set current I2C bus [...] With the patch we get => i2c help i2c - I2C sub-system Usage: i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum i2c dev [dev] - show or set current I2C bus ... Signed-off-by: Christoph Muellner Reviewed-by: Philipp Tomsich Reviewed-by: Heiko Schocher --- cmd/i2c.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd') diff --git a/cmd/i2c.c b/cmd/i2c.c index 56df8eb3bc..09c4ba9a1c 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -2023,6 +2023,7 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) static char i2c_help_text[] = #if defined(CONFIG_SYS_I2C) || defined(CONFIG_DM_I2C) "bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n" + "i2c " /* That's the prefix for the crc32 command below. */ #endif "crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n" #if defined(CONFIG_SYS_I2C) || \ -- cgit v1.2.1