Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2942903ybb; Sun, 22 Mar 2020 11:22:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsjGLfL8qXV1rp+KhwavTet7Fw6j1am3ns0PgkeIytDyH/u5SHNaJlk6ZkA7WsyOH6iOtNU X-Received: by 2002:aca:c4d3:: with SMTP id u202mr333239oif.20.1584901322585; Sun, 22 Mar 2020 11:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584901322; cv=none; d=google.com; s=arc-20160816; b=rGK7xdnRGQSuy91No3VFcMWnshwmmEdsoEzf9Je/PJ/bbf97/ICUFfAhHS98f/7r9A 5wQCdcE/0986ZMoFHf9G4P/9wUt+rsX99cjmbuGxB98pHXOSwrmk19e5TXLz6IYIvDlR EV3JrXU0oxO+iwyZMWT9H91Wy8n1etPhDG/4bCUtMlKX+5zvz2FgLAKhD5cR6oRniWDL 2CSmY7fQ8x8GjxvVOvSkuqHuNh4KVsUXggSq9+Om75uHT26er0vaS8w6VkBXWf6D6MOc 2pdqbAWyo9ygnNpIN8/q4JNvxjQv5gzZCh8miG/evUQf7ElUeZBUX3jGeA61TgIQgflm AbZQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=t3apGQx/GqllZ+jV6S8DJb0vx0h2r4kehTlpy1RNFcU=; b=omNN5r4plgRwvvwHIvqfU65L1tATW8JRaHG6UkBCQgF/W6vRlF4IAWHLOn+SWb3XM6 xNzKu/2QYQ8v11gIFlRPRIt3pAVvgQ/VodxcwG4TaLjGGpx4N2gorVzWPlxVLLAgFAWt RRia8pwdeLOFQXmFtMhW6Bfk/bUnaGrq2qiFJLk39hXQfAfuHJGVZF7178pxXdKXomIm SQSCdlU/Wd8BWQoYA5kpLtGINsvEV1vavuA6IK5Ae8Ki0rS7dIlC7AY0NSZUxn1tvzGT x7GUjSyH/TypOWQ3FC0eO5KDn0r/fKBeuK39QjIol96LSavJTcuWa+gr6d2SwAao+6Vw hM1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Gk0AxS+G; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e193si6631224oib.276.2020.03.22.11.21.23; Sun, 22 Mar 2020 11:22:02 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=Gk0AxS+G; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbgCVSUd (ORCPT + 99 others); Sun, 22 Mar 2020 14:20:33 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37063 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbgCVSUd (ORCPT ); Sun, 22 Mar 2020 14:20:33 -0400 Received: by mail-wr1-f67.google.com with SMTP id w10so14012375wrm.4 for ; Sun, 22 Mar 2020 11:20:31 -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=timVN9viiF/JiZebFkHPujx312uXhTqplY1OR+HTqPFRTUSWQ4cVSUa0CAmrp5ibOP VlGgXZ1hktudkhTq17l+GDuzyBmmYVrqMOPsTtY8dVjumqqlIKgbarmQwVsEzBzl/74k owkZiiP0icc3Rlb3t952udl/w9CViYhG8gxbaLJRoIfqSnawVuRkeHmeQGbthX4ylk6b qQ3R9O2+Mbw+uMA6HaisERBNc5QgN2jfGHe14746HyzJpCD1bU/E5UQ8kUjsycQGC6hC R0OE6rQzldKizp8aGOdZMhgVpY8YflIBaTGp1pQ3X+PsmbmV1uv0K2GjYXC8bMByrPJ0 AiZQ== X-Gm-Message-State: ANhLgQ32XBbt9yINFwuBMF3ALy78Ocj9D9ZBuTSz+ITggpJ3Erd7BJlv 2ovuLJs8fzg5NSsO1X0OrjlgPw== 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 Cc: Rayagonda Kokatanur 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 */ -- 2.17.1