Patchwork [U-Boot] i2c, soft_i2c: deblock bus if switching to another i2c bus

login
register
mail settings
Submitter Valentin Longchamp
Date April 8, 2011, 12:47 p.m.
Message ID <a2d5e9a92c3b0d17d214bff50cb9e4f0c621e69c.1302266367.git.valentin.longchamp@keymile.com>
Download mbox | patch
Permalink /patch/90318/
State Accepted
Commit 4bd5566ee89c906022215dc0064beb0d6c128060
Headers show

Comments

Valentin Longchamp - April 8, 2011, 12:47 p.m.
From: Heiko Schocher <hs@denx.de>

Deblock i2c bus when switching to another i2c bus, if using
i2c_set_bus_num().

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---
 drivers/i2c/soft_i2c.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 69b5f42..9b02e89 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -286,6 +286,7 @@  int i2c_set_bus_num(unsigned int bus)
 		int	ret;
 
 		ret = i2x_mux_select_mux(bus);
+		i2c_init_board();
 		if (ret == 0)
 			i2c_bus_num = bus;
 		else