summaryrefslogtreecommitdiff
path: root/drivers/i2c/mxc_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/mxc_i2c.c')
-rw-r--r--drivers/i2c/mxc_i2c.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index e328220..2bf4e01 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -246,6 +246,17 @@ static void i2c_imx_stop(struct mxc_i2c_regs *i2c_regs)
}
/*
+ * Stub implementations for outer i2c slave operations
+ * Any board has special requirement (i.mx6slevk) can
+ * overwrite the function
+ */
+void __i2c_force_reset_slave(void)
+{
+}
+void i2c_force_reset_slave(void)
+ __attribute__((weak, alias("__i2c_force_reset_slave")));
+
+/*
* Send start signal, chip address and
* write register address
*/
@@ -255,6 +266,9 @@ static int i2c_init_transfer_(struct mxc_i2c_regs *i2c_regs,
unsigned int temp;
int ret;
+ /* Reset i2c slave */
+ i2c_force_reset_slave();
+
/* Enable I2C controller */
#ifdef I2C_QUIRK_REG
if (readb(&i2c_regs->i2cr) & I2CR_IDIS) {