Received: by 10.223.185.116 with SMTP id b49csp5476822wrg; Tue, 27 Feb 2018 14:08:42 -0800 (PST) X-Google-Smtp-Source: AH8x2261Z2VBrV8vIxRg3XWu5r/Rqa4VW0IbQRQjDjWaB3W6cNrVAElSwc8v2UTkzt2DO0DXLnN0 X-Received: by 2002:a17:902:7046:: with SMTP id h6-v6mr15007619plt.301.1519769322086; Tue, 27 Feb 2018 14:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519769322; cv=none; d=google.com; s=arc-20160816; b=Uj4d7mRaDR6vgtx0WE8mV+TpiXQ2im0bSHqrmxZBBIUGlJLQSgk/o7AU3Q21zae0J2 slqUOjrNwiHsvflLvMxgCJN1m4U3CsJvHbaWogAWR64PEt6mFnbCGMRZV7kfXJfb6qPT dct5QvOOFqNb8wfyZtWB4tkbyrnfkuwc35+IbAzUL4Yybz3dqLJA+QOPTGOqiE+VTvr5 d2+rU4ysVSB2P/zW95vWFPgMJHsyGIT8Ah6fWdkz1l+RPeiT6pQEIqnkbQicZpeUmbm+ U/1/bRJYxrtlsLaHlXqzmxC0Ebp2ybLM1QTPcYnZ+/XJuPzsAOU5nEM+M8vHzX9M3R/b AyoA== 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=Uc0e+6+F/zR2wsz/YBwTUwu3xNDplDBXO06GJ4yMIU4=; b=bdJ0ou94ZaBy8faxsPzcHi5SHlOFMRYC/YG14sQE+ydLLXdKcacpiicYl8hoWXu4bq q7GmFHXCjEl3ahsztEBaKxzeHjm02Wndc+6hTwWsxMyvMqDknWnEyFnYYc3jVaPTqYuF MkcopEemZh2Xzmqldk8ufAH4cTR/SclKVNE+KAXECeh/HCVflEYkAamK2g0MTmi5MRCD gH910LVExw8uKSGtWEMOfHNuiD4cNeiF6wRgHpCJztpG2ch7uIKR6ju/mxIUoqWWM4xp 4Jqm+tPdWvaXiK3iZ5RPnyZIOIgoiD3N8JPSrWWaKLu6euKfkz6eiApUQ/w+Ymfpje7D aSNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=mhbXvGM9; dkim=pass header.i=@codeaurora.org header.s=default header.b=aYeCUCpM; 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 o11-v6si109094pll.158.2018.02.27.14.08.27; Tue, 27 Feb 2018 14:08:42 -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=mhbXvGM9; dkim=pass header.i=@codeaurora.org header.s=default header.b=aYeCUCpM; 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 S1751953AbeB0WHd (ORCPT + 99 others); Tue, 27 Feb 2018 17:07:33 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:46978 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641AbeB0WHb (ORCPT ); Tue, 27 Feb 2018 17:07:31 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 47C3B601CF; Tue, 27 Feb 2018 22:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519769251; bh=exPyI5whwZzyZukxXiYRvxBbwhPTiC7CuebsDho82Ek=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=mhbXvGM9Tskll8FBsgfBXP7au3knxO/bhDX1TUmkYs4bKZPXKVTS2ukTunNACFaz7 RdWRek4cQRG6u+Ld3j/AJhwwzwMhw2gZqXSfppxMHn17j3vJNzNyesFbR22h8e2XeC j1v8Ys7PtVXvQJn3EG1cAUw1WJkdVgEfjzgDO9jI= 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.226.60.117] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: austinwc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D2BD060117; Tue, 27 Feb 2018 22:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519769250; bh=exPyI5whwZzyZukxXiYRvxBbwhPTiC7CuebsDho82Ek=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=aYeCUCpMMd/ZSyHImV6P7uUbo1+8l2a/sHZsJjKOgoOqA8PUbenwKMM5hGJqi5xl5 q/pn+sp/yCLmN+HdMEItI9BDR3UwAI4tCXaVrX8v16/d76H+zhE1fbuC9l4K+FJeME GzkCbpfj4PZn4biwvvzmsZ7EwhkoJ3XGPxb4g29c= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D2BD060117 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=austinwc@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 , Sricharan R , 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: "Christ, Austin" Message-ID: Date: Tue, 27 Feb 2018 15:07:29 -0700 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; format=flowed 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 Tested on Centriq 2400 Reviewed-by: Austin Christ On 2/3/2018 12:58 AM, 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; > } > -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.