Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753347AbbGJIMJ (ORCPT ); Fri, 10 Jul 2015 04:12:09 -0400 Received: from sauhun.de ([89.238.76.85]:52499 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbbGJILz (ORCPT ); Fri, 10 Jul 2015 04:11:55 -0400 Date: Fri, 10 Jul 2015 10:11:48 +0200 From: Wolfram Sang To: Vaibhav Hiremath Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robert.jarzmik@free.fr, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, "Jett.Zhou" Subject: Re: [PATCH-v3 02/11] i2c: pxa: No need to set slave addr for i2c master mode reset Message-ID: <20150710081148.GB1528@katana> References: <1436210695-19159-1-git-send-email-vaibhav.hiremath@linaro.org> <1436210695-19159-3-git-send-email-vaibhav.hiremath@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: <1436210695-19159-3-git-send-email-vaibhav.hiremath@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2619 Lines: 70 --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 07, 2015 at 12:54:46AM +0530, Vaibhav Hiremath wrote: > 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. Just to make sure: Does it? As I read the code, slave interrupts are enabled later only when slave mode is selected? Is that a HW bug? And if so, can't the code just be moved into this #ifdef block later? >=20 > Signed-off-by: Jett.Zhou > Signed-off-by: Vaibhav Hiremath > Acked-by: Robert Jarzmik > --- > drivers/i2c/busses/i2c-pxa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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)); > =20 > - if (i2c->reg_isar) > + if (i2c->reg_isar && IS_ENABLED(CONFIG_I2C_PXA_SLAVE)) > writel(i2c->slave_addr, _ISAR(i2c)); > =20 > /* set control register values */ > --=20 > 1.9.1 >=20 --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVn35EAAoJEBQN5MwUoCm2+SIP/iTB4Kn8znsxmcO6kKoTAbJ5 anypB5FWWiDKqfXHH2WgmOHSqYq2BA+c5Pr9GXsssOlVIV7exxXpLDLvxwkoIKEq UM3Z5PxrIhStCGwoHvdGiggQLL/eJQerLvTS/EV0U9RappQ3IDQD6Js7Bp9HEGSD 3EXgzMvVN5pn3UT0gvowBG3xhhXfOvvxuJ2Xdd4QvMMZaSYJI/obdZ39CAc29Uqk os2JfTqYS2yZW6oUTXal2b3TA1ovjqXLKPaahA2yRvrB+RfihweIIKcK1FLXGlsY h6VfXKmUlUzXWm+fwV5yUOsFzCkpS97YgjobgvfTUPzP+K87zYI8ymg0bBBxbrbL pDTlaoRsf7bceXgV+bXXTvBm68VWIDDR1jcGAYLd6XJTeZWVJsTcPR5v7rAquYWk JqJpYExZ0YlXRtAngWs84XBmZab6Cxv4TFLLj86W1gydXaJHMiYU7ygUKDMCp6Rm NFgQTiuKqv776lZmwQ19KM7T8D5cDp5VCngSGHNnonOmITePQ3L5N04ujpPncZok ONiHe9GohdJO7HtbpRqIVNudJaTrfdGMt6Rldc63FETohao0WUdlZlbnsjN3sGHn r0YCn2/2yPyb4VLni7NoSlHqMsCpcP4rNM2xFNWtuXqfYVtLdKvXUTeqUVwRvXiB msGo5Rsif5gmmx8ZeMQA =rH6t -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/