Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4592046imm; Mon, 25 Jun 2018 19:41:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5xdAF+syu+T8tk2sRxeCOiKOAGYQx2P3+kteIDRljCmmQPxrMKt1+sbjYiLmdVIrCspqd X-Received: by 2002:a63:3dcc:: with SMTP id k195-v6mr12769650pga.254.1529980860111; Mon, 25 Jun 2018 19:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529980860; cv=none; d=google.com; s=arc-20160816; b=HovLV+xCnE8bPfaAgFeLILYwM36DqcVxPU4o73nyPV/F0zE3dEDV2pmsUi3Qrn0rgN wQdYTmIs0Yhe4cap6X24gArZNzUqnJM1a8a9ir5vh+6YnGiE/qKUFsCNk6pCP92Zz0Gj ygj5G4YRlerI6+PGfACdyxtMlHm147v31f7Nfnye88/HD7vEdMx0RQyZH836jtvGRbKn YdMdKWiZFgs0IQYR7tZjFHqkZdFWuFPDSOuUaUOr+FlkvNBtrqJXwR79Crtx8y3YsP1x d6LDGV2JXOWRFcwcTahosNOckn55bANO9W9Ln/uYuRaoCHDyM2fD7ttDS5jM0B8VcElW 2y0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=i6+0AHfqfZqaQ6+8EzOpW2puBMDOKooBqIK3g8SZN0c=; b=M9EzD+VQEOAqAdwMB3rVI+MbDNmtJbsczWu0euEWEMocB22JAxKinKY6EDKtnvV6wA DAoeLheSjjt/X/2RNTo6tylxfRWjjvw8IJY+CdWRi9GcoW7taNZJYhlQAz+bZhgs0XwY Q9CYeiSKe7k6XlgSg6cImIA57pj3cn+DaCW9sCrRay6cqRRodqA4C6SnX4MBmLN7r0SK jIqbg9VwPjhC0aX7CZoQ3gMebyQAEPvv3Wjt6t3TEOnucfKzfn18wgy6iJ8VS5jAsPSx LHwon1XshLjA8GeoM52303Yd7Yua3153UimdH92fBrLNGqqQb9cLnb0yLPmX/cvwGWbv CnxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si508822plu.160.2018.06.25.19.40.46; Mon, 25 Jun 2018 19:41:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965298AbeFZCiz (ORCPT + 99 others); Mon, 25 Jun 2018 22:38:55 -0400 Received: from sauhun.de ([88.99.104.3]:48946 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965281AbeFZCix (ORCPT ); Mon, 25 Jun 2018 22:38:53 -0400 Received: from localhost (unknown [91.73.131.157]) by pokefinder.org (Postfix) with ESMTPSA id 948EC5751AA; Tue, 26 Jun 2018 04:38:51 +0200 (CEST) Date: Tue, 26 Jun 2018 11:38:49 +0900 From: Wolfram Sang To: Eddie James Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, benh@kernel.crashing.org, joel@jms.id.au, mark.rutland@arm.com, gregkh@linuxfoundation.org, rdunlap@infradead.org, andy.shevchenko@gmail.com, peda@axentia.se Subject: Re: [PATCH v10 4/7] i2c: fsi: Add abort and hardware reset procedures Message-ID: <20180626023849.op4rimmsnlv4rgwg@ninjato> References: <1528918579-27602-1-git-send-email-eajames@linux.vnet.ibm.com> <1528918579-27602-5-git-send-email-eajames@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528918579-27602-5-git-send-email-eajames@linux.vnet.ibm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 13, 2018 at 02:36:16PM -0500, Eddie James wrote: > Add abort procedure for failed transfers. Add engine and bus reset > procedures to recover from as many faults as possible. I think this is a way too aggressive recovery. Your are doing the 9 pulse toggles basically on any error while this is only when the device keeps SDA low and you want to recover from that. If SDA is not stuck low, sending a STOP should do. Or do you have a known case where this is not going to work? Also, you implement the pulse toggling manually. Can't you just populate {get|set}_{scl|sda} and use the generic routine we have in the core?