diff options
author | Vaibhav Hiremath <vaibhav.hiremath@linaro.org> | 2015-07-14 10:36:41 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-08-10 09:37:29 +0300 |
commit | e087b4272effeacc10629316d47a257c88f82898 (patch) | |
tree | db8a594b1589a2562fdea5c2253d59b7f4b552fa /drivers/i2c/busses/i2c-pxa.c | |
parent | abf8a1fba9a48535595857ed46ad642272eea05c (diff) | |
download | linux-e087b4272effeacc10629316d47a257c88f82898.tar.xz |
i2c: pxa: No need to set slave addr for i2c master mode reset
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.
For example,
On the pxa1928 based platform, where PMIC (88pm860) is present @0x30
address on TWSI0 interface, and if we set 0x30 as a slave address in
pxa1928 TWSI0 module, all the transactions towards PMIC would go for toss.
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-pxa.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index f4ac8c595a45..023e59fda650 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 */ |