Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp780358ybj; Thu, 7 May 2020 07:30:32 -0700 (PDT) X-Google-Smtp-Source: APiQypL3a0ObRoMPYg/wkShyCeIW2pJGcAX/expO718T0mB2ZSw33ZXy6nolcG0PXRXqwpvLmkDB X-Received: by 2002:aa7:c3c2:: with SMTP id l2mr12184297edr.362.1588861832513; Thu, 07 May 2020 07:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588861832; cv=none; d=google.com; s=arc-20160816; b=n7dvblEXfDpppmoE+7ReEnUdMKobNTNk3oc3z+/7CMYUr6srKROV9Up65CgDEKQToK y9HaxdcPAtZBLKaUO/AcheHKqNt10dTn6T9M5fVik+TUrAOOHiYqBqwWd+XIyF8ZmeGg R1TvITlGohfIjFJuOYV5WdkZIlslDjxUi0e6QCTFOacfj6rHDGevAQFVTy1KFZPUttvX XiRwNKRsaQ0R4Ua89ljCuCmLRvRqkSHZBynrP1jGJYMIR0D4LP30c8lpDS+ij6cw0hGy YDQZ28KlBxoNIQgeYYpjCUv5u+cMopMW1hc3SDCL8DRWSRuUq14GlFxi2s0d+GHFzcmM ZRIg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q+yL5eXLLPRJvm+xAbS9Im4IZWyWCl+a8z5F+70Qhvg=; b=brDgH3OAfQRmEcxc/uvT4AsxRDrVCYTNxQ/7AMvwvIIXznjXz6nEb+np3lnC9ywDZD 4YuDEMRNDsc9bu0EqP0pJ3BAjSEomTQ+NdFhj4d9ZoyFQwWMgOspFHU8/yhqYxh6fyvV Izx394kj0fvL/g1bv694F5JMGzTbKp7F1EuDQ+DZOub7gGy3jKNY01mazIBFfeotL5xj TaQHSAfDJdNGZWsGR6km8PMRcvDFu/LotApA6aQT+aInviMTlJdoq3jHu50IJezsrXFs RIMIwb7dk5tVyjQNG+bmvroNy09+BLvCkrzVfJzPrevSHEbo2ekTuV0XMRc9XnV9Q+JS 8LIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="B//tsRXI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si3227138edm.499.2020.05.07.07.30.08; Thu, 07 May 2020 07:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="B//tsRXI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726618AbgEGO2K (ORCPT + 99 others); Thu, 7 May 2020 10:28:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:54194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727933AbgEGO2D (ORCPT ); Thu, 7 May 2020 10:28:03 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DAAD2084D; Thu, 7 May 2020 14:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861683; bh=JpMqNa6KjjZACMc14JpRz2Qlsk+u9kAyVz8DlBvFEG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B//tsRXIep6Gf8/h90s+PRqDFmRSBnsVLvHOXzzIJ6LNnzxPAH+dCX4bAMif71Z1Y fhEs6zcG0t3TyW0Dk4T3R5F6t6BGPAISnT7pW1RGYRsGnxqSNcHqeAa5i8H/LV3NzO skYpq4VxIzqkf3fWF3RuiYeHK6u5iajtjwF+lVTY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rayagonda Kokatanur , Wolfram Sang , Sasha Levin , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.6 29/50] i2c: iproc: generate stop event for slave writes Date: Thu, 7 May 2020 10:27:05 -0400 Message-Id: <20200507142726.25751-29-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rayagonda Kokatanur [ Upstream commit 068143a8195fb0fdeea1f3ca430b3db0f6d04a53 ] 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 Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- 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 30efb7913b2e1..b58224b7ba791 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.20.1