diff mbox

[U-Boot,01/12] cmd: eeprom: add bus switching support for all i2c drivers

Message ID 1460818513-24895-2-git-send-email-nikita@compulab.co.il
State Accepted
Commit 2636ac65a84f2bbab4b6a773384cfc630b9b6d7b
Delegated to: Tom Rini
Headers show

Commit Message

Nikita Kiryanov April 16, 2016, 2:55 p.m. UTC
The i2c_init function is always provided when CONFIG_SYS_I2C is
defined. No need to limit ourselves to just one supported I2C driver
(soft_i2c). Update the #ifdef conditions to support bus switching for
all I2C drivers.

Cc: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
 cmd/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini May 23, 2016, 10:12 p.m. UTC | #1
On Sat, Apr 16, 2016 at 05:55:02PM +0300, Nikita Kiryanov wrote:

> The i2c_init function is always provided when CONFIG_SYS_I2C is
> defined. No need to limit ourselves to just one supported I2C driver
> (soft_i2c). Update the #ifdef conditions to support bus switching for
> all I2C drivers.
> 
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Tom Rini <trini@konsulko.com>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 571240a..75def98 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -68,7 +68,7 @@  void eeprom_init(int bus)
 #endif
 
 	/* I2C EEPROM */
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C_SOFT)
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
 #if defined(CONFIG_SYS_I2C)
 	if (bus >= 0)
 		i2c_set_bus_num(bus);