[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1436859410-28878-3-git-send-email-vaibhav.hiremath@linaro.org>
Date: Tue, 14 Jul 2015 13:06:41 +0530
From: Vaibhav Hiremath <vaibhav.hiremath@...aro.org>
To: linux-i2c@...r.kernel.org
Cc: wsa@...-dreams.de, robh+dt@...nel.org, robert.jarzmik@...e.fr,
yizhang@...vell.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Vaibhav Hiremath <vaibhav.hiremath@...aro.org>,
"Jett.Zhou" <jtzhou@...vell.com>
Subject: [PATCH-v4 02/11] 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@...vell.com>
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@...aro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@...e.fr>
---
drivers/i2c/busses/i2c-pxa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists