Message ID | 20180330072243.19368-3-ssuloev@orpaltech.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9490C60212 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 30 Mar 2018 07:24:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BEE22A3B7 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 30 Mar 2018 07:24:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F8912A49E; Fri, 30 Mar 2018 07:24:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 085F62A3B7 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 30 Mar 2018 07:24:26 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=3uJnxT9rwM718z0+TridzmbAMHjp8rLte6CkU10dqOo=; b=rbVPRGf+fSah8ZDuVaXScAztKP 74L9GgozoNj+eSuNRl3vxrZtZE0kkW4E66JU780Un+ZoG346C/pX45+RG//6o5eIIO6CaWd4xcJ0W +jcI0FfSi9WA+xpVAE5M69c2GLOnJolXglD6jRb954e0Yj/s5RlduuIjR0w+7H1+eNGDnJS25Q6NK WNNNtcrBv2Ij5Uo0fByyRSykG1rPgrPZMZxz/VlYav/zV3J3M2VXX/bmSC3ayva3hMeHKUEUuelrB qFfqSJJi/3KCFDeAcPjMAbQbWhcMrXi0ajGagr6iNCyaqv0CoQixLcHct8e6j1F8C7xQJt6deuaGd 7K2HkZHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1oOZ-0007Y8-02; Fri, 30 Mar 2018 07:24:19 +0000 Received: from smtp57.i.mail.ru ([217.69.128.37]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1oNM-0006tX-FX for linux-arm-kernel@lists.infradead.org; Fri, 30 Mar 2018 07:23:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=orpaltech.com; s=mailru; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=bSHryQu5VKb9W//3uhf5cp0fQV5+Mza8RO11VpMRlk4=; b=ObeVCkMLqNao2h7tyI0Nr+tsp0a6qYEz/YC2Spjdd1lH53x2/vHlrMB3Hc0CRQ+nNKWmUXDWFk9WENPGgkP5W+ghD9F7ToqMppyKx7j2dJAPl8j6zLwAVpq1wALqlfn5wZN4vU3HvQANyTk6QWeDH62sgdMDRoVmOunxVoncceA=; Received: by smtp57.i.mail.ru with esmtpa (envelope-from <ssuloev@orpaltech.com>) id 1f1oNC-0001IV-Pd; Fri, 30 Mar 2018 10:22:55 +0300 From: Sergey Suloev <ssuloev@orpaltech.com> To: Mark Brown <broonie@kernel.org>, Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org> Subject: [PATCH 2/6] spi: sun6i: handle chip select polarity flag Date: Fri, 30 Mar 2018 10:22:39 +0300 Message-Id: <20180330072243.19368-3-ssuloev@orpaltech.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180330072243.19368-1-ssuloev@orpaltech.com> References: <20180330072243.19368-1-ssuloev@orpaltech.com> Authentication-Results: smtp57.i.mail.ru; auth=pass smtp.auth=ssuloev@orpaltech.com smtp.mailfrom=ssuloev@orpaltech.com X-7FA49CB5: 0D63561A33F958A539CCA3AC6E934867BC0A8B6031D50A009606EB66F9EE38A7725E5C173C3A84C39D7D3120FB43BDE33E9F334EFAB29724B17145F0B7815491C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-Mailru-Sender: C5364AD02485212F3ACDC11E67D849176E7C3182A54F3193B3A26EEC0DFD2AE6069BFC61DABEEB110841D3AAAB1726C63DDE9B364B0DF289264D2CD8C2503E8C22A194DADEED8EEDCA01A23BA9CD1BE7ED14614B50AE0675 X-Mras: OK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180330_002304_755623_A1D627CA X-CRM114-Status: UNSURE ( 7.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Sergey Suloev <ssuloev@orpaltech.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index ff790dc..f992a7d 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -193,6 +193,12 @@ static void sun6i_spi_set_cs(struct spi_device *spi, bool enable) else reg &= ~SUN6I_TFR_CTL_CS_LEVEL; + /* Handle chip select "reverse" polarity */ + if (spi->mode & SPI_CS_HIGH) + reg &= ~SUN6I_TFR_CTL_SPOL; + else + reg |= SUN6I_TFR_CTL_SPOL; + /* We want to control the chip select manually */ reg |= SUN6I_TFR_CTL_CS_MANUAL;
The chip select polarity flag is declared as supported but is not handled in the code. Signed-off-by: Sergey Suloev <ssuloev@orpaltech.com> --- drivers/spi/spi-sun6i.c | 6 ++++++ 1 file changed, 6 insertions(+)