Received: by 10.223.185.116 with SMTP id b49csp1055457wrg; Fri, 16 Feb 2018 11:35:47 -0800 (PST) X-Google-Smtp-Source: AH8x224WAMFLCvaqx+dykrkJ40GzWm+rBkIzkZ28ZXfAm9W+2h9vpSGVRIih3nHJjXxGj9RIUg6e X-Received: by 2002:a17:902:5269:: with SMTP id z96-v6mr6902634plh.392.1518809747258; Fri, 16 Feb 2018 11:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518809747; cv=none; d=google.com; s=arc-20160816; b=ix7Ov95i39HoEUgE7hHLB44cVYyqgIScLFWpZln5JUnM0DRBrVMO02ENOpwiD+wiuA AuUyAqLdq0rDW/Au81RMKbkPb3EGANuFZKGvFBAppeOb1JShAnzFZYW+zfCPiW+hIE5G RdK7mBp1KR91asEGHrD/Slts6vLqRl8NNbroXEjrOe1xeGVbu1FG46Lc6M+1mST8/xi4 +UJNJve5EwFV6YJJOOVFjEjyHNsMCiLeRaI5duGnPZfBw3eKz+29TM+Hy2q26RFca/1Y HsFpeQ+kB+CPvGDZGhnunxnexL4coFuAgpHDnhFQkTgnqxEtVIjMta37XA0MYCb97iPG MkcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=R4g5ZYntRKXbi/dRdEivVvhCCNeLuWgh7wLaUF16I4I=; b=PcRprMpFoElNVGvo1giPAAN1yGE4lLorDVVyHQT4RCpoBRZ9W/ux6AztCSVsjWD+zF 72auKEk/tyhAiZzieCpP9pGebQATtYC2oU3Cz+oeTM6y52Q/ZfdpdDbdgNlSJ/28uL3z UUxkngEQmioUvMRsA9iGGzx0tkboScRWKbAtXzHeENhftRUhdD26PCoIL9NslwwgQX/U 268l1aLH2iv78SUK9Gbp4OuQ5blZZo3G1bo9gTHN3W8icZLNrDXftHYKttoDlfzqsRi0 eO91Z0+t7/j7M+Gw3WgSNDqrGSKEGhgZtxwWrJPMZtbGEknuY9m06bKeFK6gc2BwfHs2 +Xaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fuk99ObW; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fuk99ObW; 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 d8-v6si3254289plo.17.2018.02.16.11.35.32; Fri, 16 Feb 2018 11:35:47 -0800 (PST) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fuk99ObW; dkim=pass header.i=@codeaurora.org header.s=default header.b=Fuk99ObW; 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 S1752788AbeBPFkC (ORCPT + 99 others); Fri, 16 Feb 2018 00:40:02 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42188 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760AbeBPFj7 (ORCPT ); Fri, 16 Feb 2018 00:39:59 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B74B6609D1; Fri, 16 Feb 2018 05:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518759598; bh=+4pWATmmytcVZSr2AXODJ8YU0qepsQ19C7t9gk5ryIA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Fuk99ObWGAuD1Ps3yrx4Imq9WpZ7ip0c64L8Vvh2+L7X9NJ8J29ii38eO4UNVSWT+ FrFUwFNfmptKxvUq05M9/bQAtrO0+cqOievjhSedepcXxe00CppwfYgqQj76OYaaTg i5PAzWwtVTcin9g3LjrpkKpPAsVnViyaOgzUHglY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.201.3.39] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sricharan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9BCFD604BE; Fri, 16 Feb 2018 05:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518759598; bh=+4pWATmmytcVZSr2AXODJ8YU0qepsQ19C7t9gk5ryIA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Fuk99ObWGAuD1Ps3yrx4Imq9WpZ7ip0c64L8Vvh2+L7X9NJ8J29ii38eO4UNVSWT+ FrFUwFNfmptKxvUq05M9/bQAtrO0+cqOievjhSedepcXxe00CppwfYgqQj76OYaaTg i5PAzWwtVTcin9g3LjrpkKpPAsVnViyaOgzUHglY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9BCFD604BE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sricharan@codeaurora.org Subject: Re: [PATCH 10/12] i2c: qup: send NACK for last read sub transfers To: Abhishek Sahu , Andy Gross , Wolfram Sang Cc: David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <1517644697-30806-1-git-send-email-absahu@codeaurora.org> <1517644697-30806-11-git-send-email-absahu@codeaurora.org> From: Sricharan R Message-ID: <4cd52f4d-021d-fd62-a2e6-a414d1b94ac9@codeaurora.org> Date: Fri, 16 Feb 2018 11:09:53 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1517644697-30806-11-git-send-email-absahu@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Abhishek, On 2/3/2018 1:28 PM, Abhishek Sahu wrote: > According to I2c specification, “If a master-receiver sends a > repeated START condition, it sends a not-acknowledge (A) just > before the repeated START condition”. QUP v2 supports sending > of NACK without stop with QUP_TAG_V2_DATARD_NACK so added the > same. > > Signed-off-by: Abhishek Sahu > --- > drivers/i2c/busses/i2c-qup.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c > index ba717bb..edea3b9 100644 > --- a/drivers/i2c/busses/i2c-qup.c > +++ b/drivers/i2c/busses/i2c-qup.c > @@ -113,6 +113,7 @@ > #define QUP_TAG_V2_DATAWR 0x82 > #define QUP_TAG_V2_DATAWR_STOP 0x83 > #define QUP_TAG_V2_DATARD 0x85 > +#define QUP_TAG_V2_DATARD_NACK 0x86 > #define QUP_TAG_V2_DATARD_STOP 0x87 > > /* Status, Error flags */ > @@ -609,7 +610,9 @@ static int qup_i2c_set_tags(u8 *tags, struct qup_i2c_dev *qup, > tags[len++] = QUP_TAG_V2_DATAWR_STOP; > } else { > if (msg->flags & I2C_M_RD) > - tags[len++] = QUP_TAG_V2_DATARD; > + tags[len++] = qup->blk.pos == (qup->blk.count - 1) ? > + QUP_TAG_V2_DATARD_NACK : > + QUP_TAG_V2_DATARD; > else > tags[len++] = QUP_TAG_V2_DATAWR; good one. Thanks . Regards, Sricharan -- "QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation