From patchwork Mon May 10 13:12:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98018C433ED for ; Mon, 10 May 2021 13:15:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 087F361628 for ; Mon, 10 May 2021 13:15:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 087F361628 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=wTdC69+9SvGwY8D28DFbQTdZljxTrtk5XZhe3qU2VCE=; b=Z0C+IVVhTaNNga22uPCPVri/tI 8859D3bIy/VMGivw8zD7L9Q5DSN8+fb4jIRBAHiNcAMmhiWS9l1C5shGBwecDk5fC4s5DjdhTp+Vp qFJhjTL2GUPT6LceUJ/xG/ithYnXAknP7IxGyEq0Va3sTEJQpV/ZXjLmQdl9Wr5vojnsavmecMmBD sizIcQlrPfd3X3kg0TpmJoJarpIcV7RMvMShOwv3olrkUmUGBxQlLH2J66eh61Wzl5cqpKNGD2yWa EO5E6rjaurk5QdYkzoi/aVERxmByoIDiStoV2nh4iCIsSE751okVGcOuvLr7+xoYQ6sYgT0s0+mgO uL/V6Ywg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5j8-00EPTC-Sn; Mon, 10 May 2021 13:13:39 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5iB-00EPAj-Tm for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=g1adLC7p69bwjWD8EvTQBeqT/ox1ujOMLiicPP2yNs4=; b=jtxfcHuc5SzH2zvujrJD/2QxNH CxZyBLEElKGtSKjZLyrK1SEm6AvwEudJYrsm93PBMf2rH2fgajH6LwvGMgO5hHXJL7hFRDzqw50OW QtZOnnQBKaxOakxzOoiwLVm4BNpjQ8B6xvBEJ2+VPEomO/3blzbdd4NLDlmKiqstWSSpfQc50Su7K ogTE4XqEBX3gUvkOVNFxks2ZHXM6kQ2xXNtBNbBsOypsYroSZ9HHyrc/Tx2TUH3VmCJt9xUsOJdVn PcpJYsDgoxcZAzGYJmxqL6lMuuPlYl3+osUJPf+8XvC7qJYqPYVvgPciFDXP/0+2DxMPG9XMwd4bT DtUCGYVQ==; Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5i9-008jhj-Ge for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:38 +0000 IronPort-SDR: B/sYZ/xcXH8AWAZBkuh9LaKBCBKmmBijc3mfrMT87Z/pfzfk2Md49avWXvkk3gXuaP6IBVCANX U1bhukqInzVg== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199243595" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="199243595" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:12 -0700 IronPort-SDR: cvIFTPk3l/qMviQ4zOXZz5u7wXujsGpD2xZDy2UCJMkhSlGTsvEsp9+QKCPPxNo9eoDxDcd1+a 1YhLpxzqJB/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="461292622" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 10 May 2021 06:12:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E13F7D7; Mon, 10 May 2021 16:12:27 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 1/7] spi: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:11 +0300 Message-Id: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061237_621522_D4ADF6B4 X-CRM114-Status: GOOD ( 10.61 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. While at it, fix format specifier and drop explicit casting. Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 407420977a73..956dce3aafca 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3441,8 +3441,8 @@ int spi_setup(struct spi_device *spi) spi_set_thread_rt(spi->controller); } - dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s%u bits/w, %u Hz max --> %d\n", - (int) (spi->mode & (SPI_CPOL | SPI_CPHA)), + dev_dbg(&spi->dev, "setup mode %lu, %s%s%s%s%u bits/w, %u Hz max --> %d\n", + spi->mode & SPI_MODE_X_MASK, (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "", (spi->mode & SPI_LSB_FIRST) ? "lsb, " : "", (spi->mode & SPI_3WIRE) ? "3wire, " : "", From patchwork Mon May 10 13:12:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3519C433ED for ; Mon, 10 May 2021 13:14:29 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 47C5B611C2 for ; Mon, 10 May 2021 13:14:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47C5B611C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=eQWG9gDkXTtbkzWd231RjCRyHYnmJbCNJXTmGzW6Nt4=; b=UKK9iXvSz0ahnzt3Hv0PDUaeO v/2oY2fvtsgGjtAzSbW89xTFC1GPlLFskeKD27PN1BHYmQ8tOpR8nCYh3sRthlqIQBl7yeeEJb9Nw +W3U4q2RA73k7Cyvk0Uk9sOjdwGZN5lidaBrHqfRCkucYa5KKLoWp/5nFnK4xfcdykVMpSsSRPdY/ q6pzBPCV1Xex28+SOjWIa+XkwVVABlUXsLcysCKL3bmYIosssd9JF3+/tSMULxtO/z9adN9QFln1g Mvz2uetrDZSbd92NlCkh5mHpm1lSGyCG5id5pnoolnqRiaJtK8eQkzm2liNX7P100vK+6y5RpKKdI ITNc27KTw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5iY-00EPGu-HB; Mon, 10 May 2021 13:13:02 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5i1-00EP8L-4t for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=hQiP0/TzLYs8VJCcm//y7jgf0y8QGRYxZY/p7C0udD0=; b=J8rCyYQEUfoAwzx5021agzVhal WMouu1GGQAvAVwAdpU/Gr/U9x2R96t3f9cp6S0OIjAX2qNCJiubTHij1NCK8ejTn+3TskCRl7MNCc svGOk3Y8hdg0ggURH4rJLhou4S7W/o5/pdXZHAc/Am+k++mwIMv6y94EtxbzFe+fiHm+p2Bjl1x0M Xn7p15H1sn8loDverakX0twYgwLvhT/DhceoUa8LdH/j8W+IOqWBb/YqbMOgYzp1J/8ik7wh6G8ZM Wr+ViLsBrvDSwjpUirYybE+CyEEzNneLWj3AKbdJh9xj5fIKW/0XCKKw0y1VYF1NNdo73Q3knAdHK /lItDOdQ==; Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hy-008jg1-RL for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:27 +0000 IronPort-SDR: 5koRmqU1xPmxYa0OktnqPJA5IXSXMLoESuqH5Qd2O2gz6o/sXMBK/EzcCZlnXR+L+QXIfqIcK1 Xoc3qrC04tmg== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="179455494" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="179455494" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:11 -0700 IronPort-SDR: 1dK34HlXywKWlK8OUBdgS4JFa5nJQ8xwpk922IMg7i3LR1jhohThkirVKwBBhcIUgx8hCkmyHI ZqugYUwZYGAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="391916757" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 10 May 2021 06:12:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EDA5812A; Mon, 10 May 2021 16:12:27 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 2/7] spi: spidev: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:12 +0300 Message-Id: <20210510131217.49357-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> References: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061226_918402_D5DC3146 X-CRM114-Status: GOOD ( 10.74 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index f56e0e975a46..24e9469ea35b 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -59,7 +59,7 @@ static DECLARE_BITMAP(minors, N_SPI_MINORS); * * REVISIT should changing those flags be privileged? */ -#define SPI_MODE_MASK (SPI_CPHA | SPI_CPOL | SPI_CS_HIGH \ +#define SPI_MODE_MASK (SPI_MODE_X_MASK | SPI_CS_HIGH \ | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP \ | SPI_NO_CS | SPI_READY | SPI_TX_DUAL \ | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL \ From patchwork Mon May 10 13:12:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1E9DC433ED for ; Mon, 10 May 2021 13:14:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 4C52D613B6 for ; Mon, 10 May 2021 13:14:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C52D613B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=dewudNDywyJDY1kV2QwC/Yb4+VuEl9Owb/zXDsPjTDc=; b=KwXuYNgft8m66qRsiEg4ssZOq 1kHcnQw5DNJIsW9bvxLNGeaie3HFfS9YbgP+cN8INYmh9ttqZflsYHw9+O4G+fOcJVJf/q7L+AoTm p1MHN0bPg1QCUyAcCfN1/ZV5jEqVp8zfzgF8pMBlNNHIfygmo7QsQJyV0TihCuWfxw3sgHQuttxkb 1JVjkYQnEQ+O5uGsJMgGt+qxIqlxZjEr3knQ7au67hnufXMmCtii/QO7koYfejhscwxxH97UsW4G8 pHU0d0DMaP6rCWHKMBNHQVIzR6HOCTDj1hulviXeRY2jzID0MxkDDCVx1xjX2DhBDIly7Q8RAqIAZ mcDFIx/Kw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5iM-00EPDd-HR; Mon, 10 May 2021 13:12:50 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5i0-00EP83-2z for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ABj5L+pnNgnkYVsXMImnEWr39uLX5P75jUx173NJ0UU=; b=S9xnVRL5AzwtVaMTMyyyrYDdrA MCwpBIwuZW6eNh62Sho2g4HDR2yKsMMY5Lzj7if6rpYNIrKUH3E4Neqj99ucfSThqvGUQL3CzzkwW nbJ46FP6Zri8MCzdjM4VmAkXGinJ+EyLBcpdH4ACxr+uViTcxC8hqtG+KtjBTBJqGs3138EX3ocwv OC+Jbk7J7wDMYTSCwnEhTfRRBrGKQA8oH+V1G0IA9UnBkC2jgVLE2bFn2FC4lO6FGubEBINj1hFhZ gq+3CFr9JI/INPbwHVndLYLOP6jNU/pp1a3xxS6Lhx8MAbCI5FLOkLSm8+FeXThO/kfP5MzdhFXvT im+y58Rw==; Received: from mga06.intel.com ([134.134.136.31]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hx-008jfm-Kq for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:26 +0000 IronPort-SDR: DO/O6TOceGimQ5sD5H9T6k57dXv+YQdRUqBxIqgY54+mk4llJW3vvaEI9mGBcd4dPF2bL9u3nV ld5YHx/8ufTg== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="260455804" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="260455804" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:25 -0700 IronPort-SDR: sIr9jWrurMg6PCum7v4YEo45Ps8OCp/+M2IwXM+YdUseDNtgvfm3TEpVvP4KqrsfGQ0m5TpSfQ WGXaXftYpy7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="470793108" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 10 May 2021 06:12:08 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 05E33142; Mon, 10 May 2021 16:12:27 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 3/7] spi: npcm-pspi: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:13 +0300 Message-Id: <20210510131217.49357-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> References: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061225_737714_CCBD2FF1 X-CRM114-Status: GOOD ( 12.85 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-npcm-pspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-npcm-pspi.c b/drivers/spi/spi-npcm-pspi.c index 56d10c4511db..1668a347e003 100644 --- a/drivers/spi/spi-npcm-pspi.c +++ b/drivers/spi/spi-npcm-pspi.c @@ -105,7 +105,7 @@ static void npcm_pspi_set_mode(struct spi_device *spi) u16 regtemp; u16 mode_val; - switch (spi->mode & (SPI_CPOL | SPI_CPHA)) { + switch (spi->mode & SPI_MODE_X_MASK) { case SPI_MODE_0: mode_val = 0; break; From patchwork Mon May 10 13:12:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247983 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12B5FC433B4 for ; Mon, 10 May 2021 13:13:58 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 B697F611C2 for ; Mon, 10 May 2021 13:13:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B697F611C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=9yGVYya4uOjRZI5A7Sm267zxfwKCtJKPIg+X/Jj4Sus=; b=oMYt6/83geGy8Njw2ZNRmBcb6 U3gfvGM/0uE2qX/nmf88YlyGwC9kP4HkCPQNv5KPKVTl4X3W0X3ymgPRcVigUgoXyZ1ZY83GMBa/m EdZ9niwYgRdkSwSTA6bf7TC9w35xnITxfo37x2oyNmE0iUxtio4VvgcvsLJdlUYC5l4IdvXDwM7ej IVF8CanqHKuHowjsew/EPUMbHPZoGAw3EQuaHN2WcpYukqNlfVYB4PIoULr0+WHyjZrSFuKDfxix1 lD2l+9InxjCc3pb+DTWaSKJWHe6YcjmyE8G/2UljL2TfrWpHk4rkj6YEpVoYbrnuVH5Gq4MoWGLAV U9MkvpheQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5ho-00EP5n-J1; Mon, 10 May 2021 13:12:16 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hm-00EP5G-H1 for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Jer3OKHNLozO6haHKkGPp+VuurNAet2ccJz0EedDtDw=; b=QM+S27szrKrmkNMfEUcTcJeBE2 rx4aTFjtNYMW7RZK/VyJVds2M0uOZy7pUA9ILqO2w4+WSDgvXgJUpjp+o8RySq+4Yz5ROYLPftXUz qbSu8Uzbys72ZvxHlC1bb2HanpGCbqTX/5fgiez/7Hm6rfWrq7PcKXNaOGQ4VrlmjrWZ7uBgCP//Y 4ggDeVkJ0awQCqf0BINE8kJ1riYfy6ttQ7ceeFYb5c2P1Wpr0Z05E4BC7eBeopSjgK5KuXpLMQYJA iaLTX7WHTRnc3CnqBnWHuQdbuduAECzN12rvv8Tk+AXFnScMQ+C9MF532SdAM4Xxl9WJ2VxgC13Ro BMR9+Dbw==; Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hk-008jeD-4m for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:13 +0000 IronPort-SDR: gDOy8eWmkgNiMrpcb3RN4WVVLHETNZ8F3r/CqeTfehFceEdIiZ5PbSYxGSpkB1fRv0ILrlZ80l niftI4XfRabA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="284676248" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="284676248" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:11 -0700 IronPort-SDR: cdfWr8A2AqccBATyGw3BVMyWmpt2JQ+K0F3lVLPuHtOtqNEguqvlmt+ZXmhI3myDhFKSLE2Upf HJX+9qMCT0KQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="624279386" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 10 May 2021 06:12:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 11E22147; Mon, 10 May 2021 16:12:28 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 4/7] spi: oc-tiny: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:14 +0300 Message-Id: <20210510131217.49357-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> References: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061212_211706_AADD1797 X-CRM114-Status: GOOD ( 11.53 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-oc-tiny.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index f3843f0ff260..38c14c4e4e21 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c @@ -86,7 +86,7 @@ static int tiny_spi_setup(struct spi_device *spi) hw->speed_hz = spi->max_speed_hz; hw->baud = tiny_spi_baud(spi, hw->speed_hz); } - hw->mode = spi->mode & (SPI_CPOL | SPI_CPHA); + hw->mode = spi->mode & SPI_MODE_X_MASK; return 0; } From patchwork Mon May 10 13:12:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26654C433B4 for ; Mon, 10 May 2021 13:14:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 BFE72611CA for ; Mon, 10 May 2021 13:14:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFE72611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=8oHreblLNlLvVV0f+OxV80i0c0bdNRrcGIeHnEaq5DU=; b=m8rStXT91PDbuTtyIAPNnZNqW 5VXENQblQARNqwt3vba2i4rjRT3pp3/igcRhitEdZbuVOMLbqgwMb1VpOge3kmSfhjrI+50hi7ruj /lQsxVvmHWz6gWVhiJiDftMibAz1Yxvgoo8N3tkgorRA/s1ZbHhSjeRbbeP7+sFlbcmbMNUWxxaHb eS5Em0aANA0/Z/4t42QJn3EX1MBuhem+WjbCScbTRUF3AP6DGfWEjtedbN99By1iJdv2m2+CUt6VQ +05WyayxzWvJzpXkdXFEzo5LcXf6tKofvMkEsiZCE/gASfG6bCf5X+0HckCugo65CN/Wn3wpAvUPP 1GdJKS5AA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hz-00EP7x-JS; Mon, 10 May 2021 13:12:27 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hn-00EP5a-Mt for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=XckMsKD8gVIKmSRXdABfjWD82y9GBThCAoFUU6fS+RI=; b=EuZZ3MICTILe/yivHDxiLmB27k s56P0sxrEJUS4Y1vxpvw3gmyiXxc+uo6RzG6WXllZwZkPciI1+O+X8XDJViLpM0F3G8YvV0XWDaTS nDI1RfXxRVKvoSX6Gjk4jcUJIk0+IS7jqjseFCrBKXOKWZFDd0Fg67jbYfoUqTE5L4v5cJmWs4AjJ dWv5HXG3yGAX35xL792S0H7TbcZmu2PgTwYSdT425H0xH2WSWd78HRl1EPqQVT0ChkvyulReQHrBW jzNDRE2gbsxR1CsHi4Oi1sIQnahuXUnM3Y07fJaWA+AdCZyYIhs3Vdf1K6rqkuW0/sH0avXKHZsdr 5aaF8FNg==; Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hl-008jeD-Ac for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:14 +0000 IronPort-SDR: dSDaiXqx1VvX/2SVVzOGC9dibMWnzN0Nb2suRT0vMv7acskQQJLnI95zk3Tufz56nJkJZMY0Fl ElwwT4F0r01g== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="284676247" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="284676247" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:11 -0700 IronPort-SDR: 8cq4xdeItGeJtjcaNXc/GLgNpMLgVbQgOorFy/ktICqTUna/9qzT4szFJTTALAuqPSM/5np71L kJAgbte4tPNg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="624279388" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 10 May 2021 06:12:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1E1CB1D2; Mon, 10 May 2021 16:12:28 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 5/7] spi: omap-uwire: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:15 +0300 Message-Id: <20210510131217.49357-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> References: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061213_393778_EA057184 X-CRM114-Status: GOOD ( 11.44 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-omap-uwire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 71402f71ddd8..ceb479f5c88f 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -330,7 +330,7 @@ static int uwire_setup_transfer(struct spi_device *spi, struct spi_transfer *t) if (spi->mode & SPI_CPOL) flags |= UWIRE_CLK_INVERTED; - switch (spi->mode & (SPI_CPOL | SPI_CPHA)) { + switch (spi->mode & SPI_MODE_X_MASK) { case SPI_MODE_0: case SPI_MODE_3: flags |= UWIRE_WRITE_FALLING_EDGE | UWIRE_READ_RISING_EDGE; From patchwork Mon May 10 13:12:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E4A9C433B4 for ; Mon, 10 May 2021 13:15:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 D0233611C2 for ; Mon, 10 May 2021 13:15:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0233611C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=Ssfet4EiUqChioX2ep4Clp1ekqNR1edfTqGrDG2cF+I=; b=dNiQNQPv2I746ut7nIayRE4LT eU4RfbbJI4UTxRazorjRfGL1e3XGvrFW923TaEnO+2FJ0glB4ETCifwTCTh74A0cmFizpvMo5Kpwt KsdJ3EaPOuALOLiUuHniipCHYpuIhyReaWx7KgdagqGa8Ne7NfbSMy5zUlU8Rm35d6Rpskp3nqBkw OA6+kcKk5RFtsE3HNAdVRyeaI5jTM4K4h9E+wrvFseN40F2ZMERKYXTqKXC1RQJkBbnyWCqbJjewf doBer5nH/F0XMt5M6AJOs+gRDK74gRd2BSbqH42hf5zVWs+TAQXl2aaLlgSULsTYX3enUzes13wJA p1zGKsPaQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5il-00EPKr-Oo; Mon, 10 May 2021 13:13:15 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5i4-00EP90-Df for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=a0RDJ1+reTCkMb5aW6jMpSC1zPv4dV0kn3ICMqp/UjM=; b=MoXviEpzD+sanzml42SPqQ0ngO pFzRP32P+18SUX6zWQaq/jfvViwR7fxoIiBcBkdujNC5ttnPYTzTwIHdMbKukH5aVrx6JZW6QLThm 7ZYFnFGxSgYgd6Qwet4JT4XfLvzD+4YJnK+2/DT5v8YFmVZitfse4bxe5VWuBzQsl/5BAA0RcOMFI DlVxJ5dahd7sgdV03d4a19W4s1iJy4YZpPLX7z9meMTssiCBbNbD0N7I1XMQzI2d5lyA1iZkmnkW3 Fgoz7Igwy4UCR9pKsqL8hVpEFZ+5gNZh+gUlj+59ofcGZ4LhvyXC0aRN7i2KOEVNix8alvWcqe6GP muOvFWHA==; Received: from mga06.intel.com ([134.134.136.31]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5i1-008jfm-Vq for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:31 +0000 IronPort-SDR: WSz1+SGlHngYaA7UqCzHRqwL35h4Qk8YNbhYnFE6bcBfI+crD1+6dCDkh7SmL+KuELV+KcO/rr FrNnICGUcTNw== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="260455815" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="260455815" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:29 -0700 IronPort-SDR: SEBoGOsd7HXGOK7sM3x2GPA4qSj8lyD5tn9LcErORMjswRKOZx6rTJNkTWPONTmR8JmYPkViGo u8daIbcG3TWQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="470793122" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 10 May 2021 06:12:12 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2A2AA202; Mon, 10 May 2021 16:12:28 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 6/7] spi: ppc4xx: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:16 +0300 Message-Id: <20210510131217.49357-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> References: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061230_077777_51DE44E4 X-CRM114-Status: GOOD ( 12.56 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-ppc4xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c index d8ee363fb714..cb6aaad73f63 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c @@ -235,7 +235,7 @@ static int spi_ppc4xx_setup(struct spi_device *spi) */ cs->mode = SPI_PPC4XX_MODE_SPE; - switch (spi->mode & (SPI_CPHA | SPI_CPOL)) { + switch (spi->mode & SPI_MODE_X_MASK) { case SPI_MODE_0: cs->mode |= SPI_CLK_MODE0; break; From patchwork Mon May 10 13:12:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12247989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3A4BC43460 for ; Mon, 10 May 2021 13:14:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 AA17A61359 for ; Mon, 10 May 2021 13:14:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA17A61359 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=DtiBOZIKsdqPLoYFMyPnzAgQ5BgGpsk1fIX2xV/QEqs=; b=IsQ1pM6ZfuNEEsqgEFRM/90XR RtIJCiJ5HQLJQVa3tWTS25Rze0nCtS3XmSUnO8Nf5nsAV4mLAeXWQ042oBmHhe8A6aSw87KImqHz8 Ogo5X7gcuTpuOW3ziJ8/ntzLFQqWVyI4TxT4l7/4O1KoROxRN13O/XB4wNbRILASBTHbPWpQP1Glv /dORLdcxESLYGkPZLjwDYh3esKl7WZ2WF2xSPd36IWCg2pI36zvpm0ujrvJuLfv7ayYW0t30RpVpR Wsyo+u/9RTaOh4W9gSrm+1oEkZvB1PFEqYmOQXSo1VLRK1VQd3t7vWyp8ePDftfYo/FU+1csDy9g5 SejBoTl7w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5iA-00EPAP-M8; Mon, 10 May 2021 13:12:38 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5hq-00EP6P-N5 for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:12:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=sdPac8OXjM0TZnWV0n84gZaQIStYeGSvN0HjOBrrVwk=; b=p4kcz80bQn3g9nqyd5qAP6i0zH OKOeSCYFVoZMIbarryYF0SlQ6KqQ8ksE2MTE+BSP+c55iu1NnwUz9BXGGXCNlCq5MhaHLemKUuiAz x6YqSjUHS/iREhzIH/vZvCtQFpuS9UqYrJsK5tcojPoIW3Lso2gA47jU8Jigo2yVqqMZPWavvwOsu LTiXh6C+44qgTf0DzHWQ8Yw9EgaTTEaN0DBhJZzxMQEN1bKtFg+WuEPHlQymqHWyShCedbfPIewv+ A56IczLnsmwrmf2GRAbI3wLJX2hh17lgZlMPAcy73gPky5zPXv2iXLDjjNDpSvLq6aajplgoiZpi3 rBpdeBAg==; Received: from mga06.intel.com ([134.134.136.31]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5ho-008jej-BP for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:12:17 +0000 IronPort-SDR: 5b/l3uvQ8NZqwGL7BXtn0M7sOBBlkPsb6zBUhwa/IPVEd1vO4VfcL8QoMmK/ISQmjZRt9/J4Pt Yj/2ol6lmtZA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="260455783" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="260455783" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 06:12:15 -0700 IronPort-SDR: crr0PTD/wqg0xrIajIR5THwsMYJDeciaOCujFPoUOsxt9UYSNWFPAGgXObKqV02E0UiuaaaKih uCtpejFevx/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="436139440" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 10 May 2021 06:12:12 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 3665B501; Mon, 10 May 2021 16:12:28 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Mark Brown , openbmc@lists.ozlabs.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 7/7] spi: uniphier: Use SPI_MODE_X_MASK Date: Mon, 10 May 2021 16:12:17 +0300 Message-Id: <20210510131217.49357-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> References: <20210510131217.49357-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_061216_445849_2D9CA3A5 X-CRM114-Status: GOOD ( 12.16 ) 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 Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-uniphier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index 6a9ef8ee3cc9..8900e51e1a1c 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -142,7 +142,7 @@ static void uniphier_spi_set_mode(struct spi_device *spi) * FSTRT start frame timing * 0: rising edge of clock, 1: falling edge of clock */ - switch (spi->mode & (SPI_CPOL | SPI_CPHA)) { + switch (spi->mode & SPI_MODE_X_MASK) { case SPI_MODE_0: /* CKPHS=1, CKINIT=0, CKDLY=1, FSTRT=0 */ val1 = SSI_CKS_CKPHS | SSI_CKS_CKDLY;