From patchwork Mon Apr 11 18:45:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 12809488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BE383C433F5 for ; Mon, 11 Apr 2022 18:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RLHaeAAfLATNkbJnQPy2DdlV+nRNzFakyOg1rwvZqyw=; b=G96Sohbx3ecawq kHDFtNof5scetFTiRap0yk2T/RTqUOI6NR3bdKCy+MvGnUl/1/refEm8fVVDkyHxFGku+r7LvyUHO Gft8Gls9li6U6b9yGRlVVYwn+kfjiYFAquEbhiEqvilCsKhtQqzJeSFLQfnIqDSpsqh+6UWKOVUio jQtWJ3Kn1LTEIIQg6B+Xo5S9u3oeIQ5DxfLTBHXMjhko51HAaoTT/6yucrFOIF7Gn6mXuQKLnjBoR jzb2AB5UKhbONfGZXUF356SIrs/jpdUXEeGQ4JXOR4INpBPxCHfvuXFqTWxKJCMwVfQe99RSnPY2B 3tzhYNbUPVI7xux61ccQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndz3P-00AEQD-EZ; Mon, 11 Apr 2022 18:46:23 +0000 Received: from golan.tkos.co.il ([84.110.109.230] helo=mail.tkos.co.il) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndz3L-00AEOW-8n for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 18:46:21 +0000 Received: from tarshish.tkos.co.il (unknown [10.0.8.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.tkos.co.il (Postfix) with ESMTPS id E4910440871; Mon, 11 Apr 2022 21:45:39 +0300 (IDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tkos.co.il; s=default; t=1649702740; bh=MEOSG85g2flAtn4jfkWx1n0E434b5qbnpSikVvx4Ey4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ggKBNpTY8yeIEbIjwa0+Jgv0UwqtpzgIutbvnQN6S/BpPIOzXmxCHiFr/1DjlILYc 58x4oCKI1VAq3T75FehJN+rslpGWdzV4u4QOWyA10vQ9iQN52K3ROtoyb3NA+GmNka aHasahmVS7h/7waE9Dwc1rGkd27MFQVwdmzmjRoq4I/1divqCsRpIIXlEndueoIuGI KiRG0J6AaEb9a8HeXsDtiPzhqO7H+COVQMTb3gLH9gIV/Svr9O547ejS78oIXuTzwt RIZ20lKd7yZk7m+20Bp4cit5dN3ZtFk7XxzgKCZQ0526J5zvrpYfj3V90nuvE2JR/E b2vLDO+QIxS5w== From: Baruch Siach To: Mark Brown Cc: Baruch Siach , linux-spi@vger.kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] spi: spidev: add SPI_RX_CPHA_FLIP Date: Mon, 11 Apr 2022 21:45:28 +0300 Message-Id: <6ae31ad24f8252418878b21a8759a04b78726dac.1649702729.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_114619_879225_6C7D270F X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Baruch Siach Allow userspace to set SPI_RX_CPHA_FLIP mode bit using the SPI_IOC_WR_MODE32 ioctl. Signed-off-by: Baruch Siach --- drivers/spi/spidev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 968dab2f5e3d..ff1a959fb30f 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -63,7 +63,8 @@ static DECLARE_BITMAP(minors, N_SPI_MINORS); | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP \ | SPI_NO_CS | SPI_READY | SPI_TX_DUAL \ | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL \ - | SPI_RX_QUAD | SPI_RX_OCTAL) + | SPI_RX_QUAD | SPI_RX_OCTAL \ + | SPI_RX_CPHA_FLIP) struct spidev_data { dev_t devt;