Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2149613rwb; Thu, 27 Jul 2023 02:56:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdOzskI4fle60qig7iOO2CWBHOp7K/G2UiIQuu6rl72nE8NLO/8t5VP1Qe5vVZAUPtAktz X-Received: by 2002:a05:6808:1186:b0:3a3:613b:2787 with SMTP id j6-20020a056808118600b003a3613b2787mr3065959oil.32.1690451799797; Thu, 27 Jul 2023 02:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690451799; cv=none; d=google.com; s=arc-20160816; b=IzHiVZjgVpDnM0hiTF2wKox7pMqP1mq+VQDrLsM3LKHDBzCfCwTjv196pHCiU2p1To WtTmJumCXFU1e6XItSB2W7p2VhPKXb+Jc2f+haZDHzW6CHM4YG3q/h10aQh6DclC9KWE Ql0jhThzyJG96jfYZNisMShdkdcvg0RLxYvognZP04XvkKlIz6fwB9lz3FBC/Jo+KnGP vls2cqXuDe0DcvReeN9fmOshZwyWL79QAe/4uFgVsj9MpI6xOCHVHHme6tOYbtk8mGUZ wy6UswWqm3ew0ZkIizaUD2KIIvnsT3ufp5Uhlpx6PHTZwWM7i7/eq6VNL6LH4MERugac 9NKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=le0ujuQt0MLurM4aeNo7lDkhA4mA1gKSuK8vvsubWtc=; fh=oHDq6HeANobeUeJVnZCPcL/u54La4fz1gb6fm126Zn0=; b=rqDgVvX9tFxmleYCifKjq1RCZC5QUX+ICPVlmClBqt/cuRm5/YLEN+3odKovwkXNnS ydYr/R37VwilbUSTtOmcFAFo+X6nqHLcDEt3fWkiMH/pT9YiqvKAZdEDR6FTBBZRHr8P LcwxwN51xRIOPDaJv8Frta8fud23u6Op46UHN6niKCazEsuHJqPzQb7KSPOEx2jB0Bbp MLJxqOWr21k5WCXw6SEHfEpubjABJjruRdp/6AUbvFEQMmIig5UfIRGhhnSzngxYMAJM 4LuN6FHUKBfwqFjQPZKjeuNBhWXebUASkPaRZm15Y7I/G7x4QiNwv8OD/qVH1y1wA666 n3Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmQUMygF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b005533e84b286si987499pgq.328.2023.07.27.02.56.27; Thu, 27 Jul 2023 02:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmQUMygF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234011AbjG0I7i (ORCPT + 99 others); Thu, 27 Jul 2023 04:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234087AbjG0I7K (ORCPT ); Thu, 27 Jul 2023 04:59:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B062C3A92; Thu, 27 Jul 2023 01:39:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 66BE161DA3; Thu, 27 Jul 2023 08:38:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21134C433C7; Thu, 27 Jul 2023 08:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690447132; bh=YVvOjlN4QplbkTfUU8STJw6R9WuXHmqKUY5GkeuIEdk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmQUMygFjMhCHkEk7yNzMmMF6abTQoBE2kpsz8puTVGsKxh+A8yAAolQbhGOvnKFn PX400gUHtC/md1+4FBlUB3OYXsMjOYgkKwM+ZIxh1gxpI6ayza3MPoQmdeTkzAItdC M0CP3Qlru2Qin1PNkXBUmOJerKsiyGL//2j76TVcheZxpbXYzYKryaiwychlQTvuth efNcp05P1eooNxVwWENa8dx/DKi9SqdqyHy4qIUGkbBTlUoulOi6WsP9svaovm6ZND qfy7gEwkAu2t6z9ECQ6tWo5JHKeH+hOVMO5q4VYuQpy6wCWuScZ9KLJXDWVf9DVMWN LPx+ZGdwdQ+IQ== Date: Thu, 27 Jul 2023 10:38:49 +0200 From: Andi Shyti To: carlos.song@nxp.com Cc: aisheng.dong@nxp.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, xiaoning.wang@nxp.com, haibo.chen@nxp.com, linux-imx@nxp.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] i2c: imx-lpi2c: directly return ISR when detect a NACK Message-ID: <20230727083849.qcsmgqds3wyre72t@intel.intel> References: <20230727030347.3552992-1-carlos.song@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727030347.3552992-1-carlos.song@nxp.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Carlos, On Thu, Jul 27, 2023 at 11:03:47AM +0800, carlos.song@nxp.com wrote: > From: Carlos Song > > A NACK flag in ISR means i2c bus error. In such condition, > there is no need to do read/write operation. > > In this patch, i2c will check MSR_NDF, MSR_RDF and MSR_TDF > flag in turn, it's making mutually exclusive NACK/read/write. > So when a NACK is received(MSR_NDF), i2c will return ISR > directly and then stop i2c transfer. > > Signed-off-by: Carlos Song thanks! Reviewed-by: Andi Shyti Andi