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 72910C433F5 for ; Tue, 30 Nov 2021 09:01:44 +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-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ooFv4Etnv/X5+3Tj4RQW4hTDBw7shAgdptUvjr3MQQ8=; b=kPazlIk9Zpusn/ TCW8IBo4K2nH24vFniksFu50uCa7M6ySq0U4t3YMecWAgLUlaFvFjKj0iSwQvhHwCOf8GNTqdOJnv B4LQJqmvt9Vaq3l6x9GL2/nDiy+ox6d6ZrW72KhFPRYXvRsiZFixXaf4/NH+0delEVTtezszLqIPh fHOmHUdjRglH/aSGxxZVSPqlOZWsdO4+V3i+YY6/O9NOVYinhdEvbgy6rNFmhHPgNWqOP1f4Kfa/b Q0eE1n4gaA4QGDKMjMo9RkinRtiVGe+jrEYe04oRZEUe2oS1+eJo1L4COE+HD/TgG36TyhHccZWU4 3YoEgHmvQcjre/wgp5gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mryzX-004Ec2-4b; Tue, 30 Nov 2021 08:59:59 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrywF-004DM6-Ks for linux-arm-kernel@lists.infradead.org; Tue, 30 Nov 2021 08:56:37 +0000 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AU6eth0000494; Tue, 30 Nov 2021 09:56:25 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=date : from : to : subject : message-id : references : mime-version : content-type : in-reply-to; s=selector1; bh=6a8nITZiU0Po48YLbpF42GkCXHu+wbzPhZFof3AiSYU=; b=btzVLl/RvuNBsF5pqT6k7kIv2qoxy171PcgHBvHWjZtsXbnId2CuEdGV/B16ANPp2SBf syBUiHmXKWU6fpUcYnLkvlxDw1upKKQOGSMSq3vYqoNDFRY5zwsZYeSKOOOa1eGkoxAG SyD/OK+LwDRTFWGONh/gDV+HzJmcWAecBRoGCr5sYSGw87b1QmRB/Q7WK1bAUDxz+aHc RajPAVOzbq+pPVKLpIPzWJbu0ArvwfBLjx8UR2Y5N7sxEzvxuJ6cHZV37OzYru/Mn/xs ypjlTcu2abfglgsZnctwnca7/+s/LBwPZY671TtPd+7xbUdXHcthVEDINNJ1H0Uo8mjK FQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3cnewbgse7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Nov 2021 09:56:25 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0CBAF10002A; Tue, 30 Nov 2021 09:56:25 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0075721E674; Tue, 30 Nov 2021 09:56:25 +0100 (CET) Received: from gnbcxd0016.gnb.st.com (10.75.127.47) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 30 Nov 2021 09:56:24 +0100 Date: Tue, 30 Nov 2021 09:56:18 +0100 From: Alain Volmat To: Wolfram Sang , , , , , , , , Subject: Re: [PATCH 2/4] i2c: stm32f7: recover the bus on access timeout Message-ID: <20211130085618.GA668426@gnbcxd0016.gnb.st.com> 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 Content-Disposition: inline In-Reply-To: X-Disclaimer: ce message est personnel / this message is private X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-30_06,2021-11-28_01,2020-04-07_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_005636_516090_01A71D31 X-CRM114-Status: GOOD ( 22.82 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Alain, On Mon, Nov 29, 2021 at 01:52:30PM +0100, Wolfram Sang wrote: > Hi Alain, > > > > > + stm32f7_i2c_wait_free_bus(i2c_dev); > > > > > > This does only a controller reset, not a bus recovery with 9 toggling > > > pulses, or? > > > > 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 doo you think? I just checked again. Indeed, this patch is here to handle cases when communication went bad with a device leading to controller being left in a confused state. This is done to put it back in a working state. I agree with you on the fact to decouple this with the 9 pulses bus recovery and first apply this one first. Thanks. Alain > > All the best, > > Wolfram > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel