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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93CC1C433F5 for ; Mon, 29 Nov 2021 12:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TER28EW1IB02jakl8l6BGgZhLImTUEuZDE6LKQh+YEk=; b=n324r3oySiWzAvnAGxbJgdEkYj aiJDq/aDSTEw/2x7cEKl5ZeeOveClq5fVzcy+rdljvQ8+xVIN1jQMKFjSkvmcd/npk+p19zwINzSf X2eTsElu+IuTf5ZhIsL63ci2NnFPdLro+suTrh8OwluYm/d/5KjW6nM8MV+zpIavHyEUn4pbgRkbx m6UeGE3cigHQGM1gA1F7PQr+OFPwliiyLiOdjp3cLaVW4tSXQzDt5eCeHMOBUoFdoYRzyF2iEaXl3 LGpYL6/DHGYh7kT81Yi2h6hWPKmN1crcb6KH55nxbCyFWQOyolcX9iwgt+M3/UL2AMd0ISsbSnxDY jAcnQlyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrg98-000kbs-MF; Mon, 29 Nov 2021 12:52:38 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrg94-000kb8-RD for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 12:52:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 572D461450; Mon, 29 Nov 2021 12:52:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 194F3C53FCB; Mon, 29 Nov 2021 12:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638190353; bh=c+hJCgT7nD8Aff6H/94yNwkxSoHUS9aZu/eXKfvl8y0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=F+SCY/Ud+cOzAn4K76jOmIJ0tCSY55bJL7O4fAog9ys9SIBlonxACgxm5vDQ3XXN6 e2fRvqkSzdDXJSD2wnfit8fnIM1qWgrOwDiTXPImFCDnzqD65aU2yhJe19L3f1xGn9 Ogh4KPSftMKimbA7s3ZA6lJZHlEDTCPZo+v1XoI6W6rQkTzo0bBVtTbm+nDXx3L16a KDkpec0wwLbf3MxniLust3ItZ13aNPoB8/QvfdEgAJ9riOp0rp8EIeQ266G3yLX+Hy M8Y9Gjz/Hc1i1/DTfGikjl0g8HO2P8RcQMyx9erNHwyfWHKws6YWJSbxs7ZJXE9swy nv1Xi07lDd7dA== Date: Mon, 29 Nov 2021 13:52:30 +0100 From: Wolfram Sang To: pierre-yves.mordret@foss.st.com, alexandre.torgue@foss.st.com, linux-i2c@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@foss.st.com, amelie.delaunay@foss.st.com Subject: Re: [PATCH 2/4] i2c: stm32f7: recover the bus on access timeout Message-ID: Mail-Followup-To: Wolfram Sang , pierre-yves.mordret@foss.st.com, alexandre.torgue@foss.st.com, linux-i2c@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@foss.st.com, amelie.delaunay@foss.st.com References: <1632151292-18503-1-git-send-email-alain.volmat@foss.st.com> <1632151292-18503-3-git-send-email-alain.volmat@foss.st.com> <20211129123302.GB486850@gnbcxd0016.gnb.st.com> MIME-Version: 1.0 In-Reply-To: <20211129123302.GB486850@gnbcxd0016.gnb.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_045234_944037_0AAF9CFB X-CRM114-Status: GOOD ( 16.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6354223400045237361==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6354223400045237361== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5hCTBkD/yBfPADtw" Content-Disposition: inline --5hCTBkD/yBfPADtw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Alain, > > > + stm32f7_i2c_wait_free_bus(i2c_dev); > >=20 > > This does only a controller reset, not a bus recovery with 9 toggling > > pulses, or? >=20 > indeed. I might better rework this and at the same time introduce the > bus recovery mechanism via the bus recovery callback in this driver. > Please don't merge this patch and I will rework that. Wait a sec. Resetting a controller at the end of a failed transfer might make sense if the controller is otherwise in an confused state. Full bus recovery (9 pulses) should be done at the beginning of a transfer when SDA is low, though. So, I'd actually suggest to apply this patch and add full bus recovery based on SDA low at the beginning of a transfer seperately. What do you think? All the best, Wolfram --5hCTBkD/yBfPADtw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmGkzQ4ACgkQFA3kzBSg Kbb09RAApgWh5w47oO8V4rNkg78h6Cf6iocL3kiEtiG6Gxgcl/INGRIw02rb0eUb iMfzC1fBQsdhA49WMXjKTaQ3Y/wcp2ecs7j5IF82NuI5S/zYIuuY2OIMcipfh690 UyDdz/5Vkm9dVak14Joaqm/zPhZuyJiIjq/4ncRerM+lfJ2ebS6yVFyAPwd8/No4 M1Vdtz4HG0gL6GIqO4nYOpk7rVBWGxIQaE0FEU9xCB7T8lUbolSdRKPrnhh7E1qx NfzvvI1+ANmBaPjOD3ITCqW54wWKPhJJmU+0ymuho0qFHwzqRJvJwS/AvPwNxIRZ /nsgxX2IVT+eL1D8YtxupdIB5o7JhvsuWQ1TlCGmnNpGTKxdNhwtwVMxqPzu+rS+ F14IZTvcQz0eiYu5s+7TGB5l13RlYsI6RT2cw9J0vniY09uFePDxd4xoe4T2l6ca 994KrTvxgJbJM6Up/A9DDbLUJerAbI1TV+rp6VTGH3fOHEpthkw6g+WZwHQgN18p eW4RrkfKOyhrkMOD66msHgsnc6wcCMatzdWq5oaLkimFAloAtv2Lv6+m7UG+6A6d X4WPLE4f6OB/RnrC3ntAJGq7mNygj4CACoMJTSSGuDFrmYOeSAaR3lmLFVd+7Mzo LMdaovdObwqsZgvVyGHQTF7nGRbIlb5zbrP0MgpT9y5fadY8QLc= =DxgC -----END PGP SIGNATURE----- --5hCTBkD/yBfPADtw-- --===============6354223400045237361== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6354223400045237361==--