From: "Jett.Zhou" <jtz...@marvell.com>

Normally i2c controller works as master, slave addr is not needed, or it
will impact some slave device(eg. ST NFC chip) i2c access, because it has
the same i2c address with controller.

Change-Id: Iaf6e16cf2e211d242b21086e491b751ea311a000
Signed-off-by: Jett.Zhou <jtz...@marvell.com>

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 3346fef..2dc3af3 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -490,8 +490,10 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
        writel(I2C_ISR_INIT, _ISR(i2c));
        writel(readl(_ICR(i2c)) & ~ICR_UR, _ICR(i2c));
 
+#ifdef CONFIG_I2C_PXA_SLAVE
        if (i2c->reg_isar)
                writel(i2c->slave_addr, _ISAR(i2c));
+#endif
 
        /* set control register values */
        writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to