Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753902AbbGXKxM (ORCPT ); Fri, 24 Jul 2015 06:53:12 -0400 Received: from sauhun.de ([89.238.76.85]:36611 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753581AbbGXKxI (ORCPT ); Fri, 24 Jul 2015 06:53:08 -0400 Date: Fri, 24 Jul 2015 12:52:51 +0200 From: Wolfram Sang To: Andrey Danin Cc: Stephen Warren , devicetree@vger.kernel.org, devel@linuxdriverproject.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, ac100@lists.launchpad.net, Laxman Dewangan , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Thierry Reding , Alexandre Courbot , Greg Kroah-Hartman , Julian Andres Klode , Marc Dietrich Subject: Re: [PATCH v3 1/4] i2c: tegra: implement slave mode Message-ID: <20150724105251.GA22787@katana> References: <1437424546-30405-1-git-send-email-danindrey@mail.ru> <1437424546-30405-2-git-send-email-danindrey@mail.ru> <20150724092720.GA1597@katana> <55B210F4.6030700@mail.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <55B210F4.6030700@mail.ru> 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: 2273 Lines: 62 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > At the begin of my work on this patchset I even denied clock disable call if > slave is registered (to minimize code that can affect transfer). I hacked something like this, but it seems it was not enough. > If only slave mode is used, then this logic is not needed. This is not sufficent. We shouldn't break being a master only because we also listen to a slave address (as long as the HW supports that of course). > tegra_i2c_init is called on probe and resume. Also it is called in case of > xfer fail. If xfer is ok, then I think slave addr must be kept unchanged. This is fragile. Try scanning the bus with i2cdetect and slave setup will be gone. > As far as I understand it is a loopback mode. Probably it will not work > (Stephen Warren already mentioned this). Just to make clear: I am not saying we should support talking to our own slave address. But it should still be possible to communicate with other remote devices on the bus. Thanks, Wolfram --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVshkDAAoJEBQN5MwUoCm2vmMP/RZUx8/DLXE5UMuaB99DvRhL 1cNi9OIlisLyDHWccWXM2bXnfEaaKwQsCYXeL9q30mM6kcjqvEnjcDwuLYexVNf6 NrSe2XgxfN9b48KmVpxCsRcedpZvG5diSn/EUlyAL8hoi6FJIwRKopCeG2HwEsGN TNgOw3NRxPlgv4rfzMWg/+2b7sYK+CbIcUjh51o36Iz3L4xuWmOFj2M4ic7d9qZi F/mj9NGsgP9Jkwgp+ebOErNuol7oK/64t3jyYdjhhoHZhU71xh8AyvY8EG0jNUBm v/EpCby1pPUTjxgzDAe3t317s5J78qn71S++FHaRU31QhOmyfcZctgbOBEJTfjrf PvKNb07srcZ4KEmSVQTVv1XLxTdnHz6pqIqCoX+41XFxcUMzMUVaLkQpL3gbjCqN wp2OSCfRepKMg8mTo2tNq95Z8iV7/BpWlB/i36gdJEOL7l9QnKq+9YVhpweKMSH+ ylaOBkyT+7hdEsn+R2V8dfGPWnPzWEi2Y8fIBhWZjgL5fE08AxEHmWCc+k5QK6/D fARcLI+rPhV2fR9KjE0tT5oeCI9NTpkd/5TXFXxGHxKrvVp61+WBot2W2076V/Ur h4Vs9xIk99nZbnfRX0P3UXVPOEmZib0KNQyHFMiFtFp7DVe6Qjjf27NLB7dwNfxx RCnffRehdQBjd8yU0cc/ =NVew -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp-- -- 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/