From patchwork Sun Mar 22 18:20:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 11452035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51DC0139A for ; Sun, 22 Mar 2020 18:20:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2BEB120719 for ; Sun, 22 Mar 2020 18:20:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R8EIRA6h"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Gk0AxS+G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BEB120719 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9bf+J3QbRGWxTk8yrj1yeGx49U62UXiUQqPc7LFONeU=; b=R8EIRA6hAhBiJX WtwHonPZ7+137kr+jtWqNkVBOhVCiYBnYi/+bzwQzFH4wi79sVsEHzFmSwEhibtF95zSnLcfWNG2e sybIRVnt770KxIYHs59zWoprh/eTTDHr9RtHMn1XxCW12j+KNcyH677+3HumrfjaYAECS9CxBg//e 3DQaz7QUeq5vFTh42AtId5r0jbbw+LQ7hmKQIbOJeheXER89Q8KRymtjf7Gr7Sgcz3+Io/ml0CQOA 4+3tvO8K6SKgoaNfRWqHyPNeYMYR/r4ocBNfAA0OVLH5ukldCBPoYwaP2KdPUjrO1EaWcqJOfWpUM uBfFTVr/fHnnaYvi2CkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jG5DA-0006jq-MN; Sun, 22 Mar 2020 18:20:36 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jG5D7-0006jU-3h for linux-arm-kernel@lists.infradead.org; Sun, 22 Mar 2020 18:20:34 +0000 Received: by mail-wr1-x441.google.com with SMTP id h15so1777881wrx.9 for ; Sun, 22 Mar 2020 11:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t3apGQx/GqllZ+jV6S8DJb0vx0h2r4kehTlpy1RNFcU=; b=Gk0AxS+Gybm8fEoRxAq3N95E77QJRP0db6HjhqDBM6FK88AdXw6V6XcmZMwRdiL082 zoLzPL95MC67nQWljc0pxZu5mGZxY4iToZCfsEVWXNuNxc7+49IMb8W3IyX0qzeQiPl8 VJ0XYQhI3ROie5f1lQQjT7GmdGvzsYZ+tttc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t3apGQx/GqllZ+jV6S8DJb0vx0h2r4kehTlpy1RNFcU=; b=rcYqGV+F1WGXwdscMq4/cES55EdQm+TflfBNfmdkubvPuSlsfMSHI9mkklvka/Pb4p CoPPaMC06vW7Ezvn3soVlTz9LDAhnZ7gC11u4a1R8eo7lIbhGRDO2xdms5gUCj5rIJ8p buCs6c/3ZNNo4nhwsgeLZaWXu3fJLQGk3LxFIhD1BFXz4vqNKvJAKpHJ5H6ai3jxVdcV jIKHT3LnHYHYKeBk4IXb13o2YY57eHjmQj6jIC2iVSu5fplrR/XEJXTifhdEOfsoxv9n MUtrSyLae5ZxQ//QC4NeQ6//hq9nFh1F/XWCsCi1lSSiWMaA0Gyw4SJfrrccqkLbh8KC ZgdQ== X-Gm-Message-State: ANhLgQ3KamR9jT4NcLbFLLquflSmbJbeFa4AwRG8UgYvkqojV3o4uiEJ aI1ZZiXNLaWip66NhFqZGJhirw== X-Google-Smtp-Source: ADFU+vuN11G7CO1C7OcYmWhFxSNN5VvmFXqPfJtw7+8MCIrtSg2PNhWHSoNKE+R4l3s8tIriIiP3Ew== X-Received: by 2002:adf:a457:: with SMTP id e23mr25054213wra.21.1584901231022; Sun, 22 Mar 2020 11:20:31 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id i67sm20157090wri.50.2020.03.22.11.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Mar 2020 11:20:30 -0700 (PDT) From: Rayagonda Kokatanur To: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Wolfram Sang , Lori Hikichi , Shreesha Rajashekar , Nishka Dasgupta , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/1] i2c: iproc: generate stop event for slave writes Date: Sun, 22 Mar 2020 23:50:19 +0530 Message-Id: <20200322182019.32493-1-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200322_112033_155639_939D6A80 X-CRM114-Status: GOOD ( 10.69 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rayagonda Kokatanur Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org When slave status is I2C_SLAVE_RX_END, generate I2C_SLAVE_STOP event to i2c_client. Fixes: c245d94ed106 ("i2c: iproc: Add multi byte read-write support for slave mode") Signed-off-by: Rayagonda Kokatanur --- drivers/i2c/busses/i2c-bcm-iproc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 30efb7913b2e..b58224b7ba79 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -360,6 +360,9 @@ static bool bcm_iproc_i2c_slave_isr(struct bcm_iproc_i2c_dev *iproc_i2c, value = (u8)((val >> S_RX_DATA_SHIFT) & S_RX_DATA_MASK); i2c_slave_event(iproc_i2c->slave, I2C_SLAVE_WRITE_RECEIVED, &value); + if (rx_status == I2C_SLAVE_RX_END) + i2c_slave_event(iproc_i2c->slave, + I2C_SLAVE_STOP, &value); } } else if (status & BIT(IS_S_TX_UNDERRUN_SHIFT)) { /* Master read other than start */