Message ID | 1434383399-2370-3-git-send-email-vaibhav.hiremath@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Vaibhav Hiremath <vaibhav.hiremath@linaro.org> writes: > Normally i2c controller works as master, so slave addr is not needed, or it > will impact some slave device (eg. ST NFC chip) i2c accesses, because it has > the same i2c address with controller. > > Signed-off-by: Jett.Zhou <jtzhou@marvell.com> > Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> > Cc: Wolfram Sang <wsa@the-dreams.de> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cheers.
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index f4ac8c5..023e59f 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -459,7 +459,7 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c) writel(I2C_ISR_INIT, _ISR(i2c)); writel(readl(_ICR(i2c)) & ~ICR_UR, _ICR(i2c)); - if (i2c->reg_isar) + if (i2c->reg_isar && IS_ENABLED(CONFIG_I2C_PXA_SLAVE)) writel(i2c->slave_addr, _ISAR(i2c)); /* set control register values */