Skip to contentSkip to conversation

i2c: designware: Allow sending restart conditions

PATCH New Marek Vasut 2 participants 3 messages Aug 7, 2017 – Aug 10, 2017 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: designware: Allow sending restart conditions

Allow sending restart conditions upon direction change as this is required by some chips.

Cc Stefan Roese <[email protected]>
Cc Alexey Brodkin <[email protected]>
Cc Heiko Schocher <[email protected]>
---
 drivers/i2c/designware_i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/designware_i2c.c +2 -1
index d4df35a69a..8cfed2194c 100644
@@ -374,7 +374,8 @@ static void __dw_i2c_init(struct i2c_regs *i2c_base, int speed, int slaveaddr)
 	/* Disable i2c */
 	dw_i2c_enable(i2c_base, false);
 
-	writel((IC_CON_SD | IC_CON_SPD_FS | IC_CON_MM), &i2c_base->ic_con);
+	writel(IC_CON_SD | IC_CON_RE | IC_CON_SPD_FS | IC_CON_MM,
+	       &i2c_base->ic_con);
 	writel(IC_RX_TL, &i2c_base->ic_rx_tl);
 	writel(IC_TX_TL, &i2c_base->ic_tx_tl);
 	writel(IC_STOP_DET, &i2c_base->ic_intr_mask);
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 i2c: designware: Allow sending restart conditions

Hello Marek,

Am 07.08.2017 um 20:45 schrieb Marek Vasut:

Quoted 10 lines

Allow sending restart conditions upon direction change as this is required by some chips.

Cc Stefan Roese <[email protected]>
Cc Alexey Brodkin <[email protected]>
Cc Heiko Schocher <[email protected]>
---
  drivers/i2c/designware_i2c.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks!

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#2 lore raw

PATCH 1/1 i2c: designware: Allow sending restart conditions

In reply to Marek Vasut

Hello Marek,

Am 07.08.2017 um 20:45 schrieb Marek Vasut:

Quoted 10 lines

Allow sending restart conditions upon direction change as this is required by some chips.

Cc Stefan Roese <[email protected]>
Cc Alexey Brodkin <[email protected]>
Cc Heiko Schocher <[email protected]>
---
  drivers/i2c/designware_i2c.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

applied to u-boot-i2c.git

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany