From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8393ECA9EAF for ; Mon, 21 Oct 2019 20:20:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F09220873 for ; Mon, 21 Oct 2019 20:20:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729406AbfJUUUr (ORCPT ); Mon, 21 Oct 2019 16:20:47 -0400 Received: from sauhun.de ([88.99.104.3]:50660 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728914AbfJUUUq (ORCPT ); Mon, 21 Oct 2019 16:20:46 -0400 Received: from localhost (x4dbffd67.dyn.telefonica.de [77.191.253.103]) by pokefinder.org (Postfix) with ESMTPSA id A85552C0076; Mon, 21 Oct 2019 22:20:44 +0200 (CEST) Date: Mon, 21 Oct 2019 22:20:44 +0200 From: Wolfram Sang To: Kamel Bouhara Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Thomas Petazzoni Subject: Re: [PATCH 2/4] i2c: at91: implement i2c bus recovery Message-ID: <20191021202044.GB3607@kunai> References: <20191002144658.7718-1-kamel.bouhara@bootlin.com> <20191002144658.7718-3-kamel.bouhara@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="O5XBE6gyVG5Rl6Rj" Content-Disposition: inline In-Reply-To: <20191002144658.7718-3-kamel.bouhara@bootlin.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 02, 2019 at 04:46:56PM +0200, Kamel Bouhara wrote: > Implement i2c bus recovery when slaves devices might hold SDA low. > In this case re-assign SCL/SDA to gpios and issue 9 dummy clock pulses > until the slave release SDA. >=20 > Signed-off-by: Kamel Bouhara Setting up the bus_recovery looks OK. However, I don't see any call to i2c_recover_bus(), so the bus_recovery is never used. Did you test this and see an effect? Also, I think we should merge this patch "[PATCH v3] i2c: at91: Send bus clear command if SCL or SDA is down" into this series. The crucial thing for both is when to apply the recovery (at the beginning of a transfer!). The rest is "just" that some HW needs a bus_recovery_info for pinctrl/GPIO handling (from this patch), while other HW needs a bus_recovery_info with a custom recover_bus callback. Opinions? --O5XBE6gyVG5Rl6Rj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl2uExwACgkQFA3kzBSg KbYuXQ//eD/q+8apdlyXS/GXAnuUdAWmgKPeAuIOLg3HVjQ9WJ9MRaCMy2l6Luxy c8qEFZH5jKzOlqfppnV8t6ff2psZ9uyd48gQdkSKuIGYJNi0WJacBFwL9/2RJUW5 4Y2LnEBtZ3Y6GdSlipjUsUbxZ0/HJPsbnof5Fx89Qewirua0oSX6m+T13vHlnQnu LFL5Y+0sbXxQLjsGLIM9nMqJcvedb9yrK6tOLHhfUD6p5RPWImi9LThJCo+Zx5vt GbrpYaqqF4sOz2a//K4sqqJky3l/qBlALjGKaFQfgG4f6Fv8GTSkJYchIViV8wM3 v7hurVSrejGx0wQF9tlOKLgYeHlUHaEa1JCT+tCx8/Za6Tznej/dwzRcXNdYuF0M utpronoEy2pP1KRfmBImI+kbKmmmiwYbscFL/ZihCHdFrrKNw1cBSGZmlL3GPjPb RC4ltTteew9D6mQkBmF8jqLvtSM3UFkblqq5vtfKL8Ol/GE2f175tULtpySZiNYQ /yelkPgCalYOAWgGQE3YmR7uO4X37U0kebPz47KUaXQjJib4q7AiX3bLzB8eiyzb l/UQoR0ZTIFrnBXh5EjAe6MV6ZqlyIIzUTwR18wlN39tcU7dk+htQ7l7K3brGDqG iF4Erc1yMFWUMJUTQmgFoV8oSvYE1BxMJVURE5b/Wlv6vk4/U8g= =c7Kn -----END PGP SIGNATURE----- --O5XBE6gyVG5Rl6Rj--