From patchwork Fri Jun 19 09:06:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 11613531 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BF7514DD for ; Fri, 19 Jun 2020 09:07:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 69CF220890 for ; Fri, 19 Jun 2020 09:07:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RJlhY5k3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.b="X1XJo4xQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69CF220890 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=beagleboard.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=JzhjNF5bDWmXqea3Y/c7tHgP+mcZl8+4DZzBkHF/O9I=; b=RJlhY5k3a0z79u mcyHQCUoADVXWcKYM3FhjARS+nT+KEjAGeS7MwT43mvDdqrZRo15Poim1Mkx0OP2u5YX0/zcg4F1g c35gfBgZ0h10DMHWsM16tT8DNZolJw2+9V2sck7qmyjJOJCkM/RWA3KFXCtbNJ7Vaub6NaYq31YYf vS0+IY6RJPVKRx9aRxa7eFm6MD+/JCUtx9b0z4H65KcS+99w6g9R88tmkYRSyMwNZhkVrbkbitWjX bC7LzP4rd3aPeOlbQriZy9/QlA0M1u5UdDV/upn7+dWqJvBhHMWcufqHyxMM89aGrvR7gf4WgeJz9 R9IUdWAqresCIgI6NhWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCzM-0003tN-Tm; Fri, 19 Jun 2020 09:07:08 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCz5-0003id-CZ for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2020 09:06:52 +0000 Received: by mail-ej1-x642.google.com with SMTP id dr13so9405078ejc.3 for ; Fri, 19 Jun 2020 02:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5mEvzhD8ZDNfnKNW5KPSqhD16ebDefQ348OLXK7WNy4=; b=X1XJo4xQqza5Gpmu5TS6+sFT/+90kfsxQwDVnSGPwQaL6hbFdH21IfK5LnIvWKmlTj gaFsYadBj8FbAs0pNrTKRZlA2+66YP2SeubU9X26yVbBRXWPqGIEO4OICu2sRQ+9lY5e EmZukeqFRzEyTIrBogjX7YxfkkdIGPAdOsFtIZG/LitU3ZAAJzNsjJN0pk79wYWA/Pc1 zGxL6jpw6nuzBg6Xo7s8ntORdfcO4qJ71Z2wnBSOYm4n3qiTtJbILegg5sR2/ArWTZpt bBCGfw+hcBzTiosEQbvpF8Jo//TjbtthL0cHnwhvniO8Rva4MAeOcucbi5FK/wEdjmQN sWKA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=5mEvzhD8ZDNfnKNW5KPSqhD16ebDefQ348OLXK7WNy4=; b=gGJYgPtAmL2ToODF3HitYkoarF9PEDAwbcGA7nKQemDOaA9sv2h9r2ahx1YN1jzwdT TBmsv1rY1FQZobNyNYTjLDpHKm1I3t+zPC+ch6Zv4+GuUE4yHtfcyU0d68q+bmSIryoU wV+0h23oYJjzoiv3VoCplJ9B+AdkO2tPsYEJGdLuDgPHbDDf5xjAmYxp6b+Uo+rzZnAt 5PZjZSzLyE43WyoPD0wBEM7YnugYYQX5mhipv+qS+TRmmgVDgDHkHgmErk+50LV4O4RC 4D/sOBvhORdVlU/n/RypywuR/wt4sbCckS4dFr4x9lTVh0iAv0K7IXdciWJuwKls+nLI M1xQ== X-Gm-Message-State: AOAM530SAI25oaTZ+LYrGt4un3Hurqx+XCGrFUEbH/eqtyHwS0cNu7IP 4QlNlh1g3cCy6+lEhfih4jIL+w== X-Google-Smtp-Source: ABdhPJzO4kbHdFvwlDaJ4wJ4m/s3iIdkdw6eY8mxMyd30QFl7MlUDUx58T6KaBdKzzwhRHx6KyznLA== X-Received: by 2002:a17:907:35c2:: with SMTP id ap2mr2547627ejc.530.1592557609833; Fri, 19 Jun 2020 02:06:49 -0700 (PDT) Received: from localhost.localdomain ([2001:16b8:5c68:7901:5c06:6064:338b:4004]) by smtp.gmail.com with ESMTPSA id dm1sm4653650ejc.99.2020.06.19.02.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 02:06:48 -0700 (PDT) From: Drew Fustini To: Tony Lindgren , Rob Herring , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Haojian Zhuang , devicetree@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Cousson?= , Jason Kridner , Robert Nelson Subject: [PATCH v2 1/3] ARM: dts: change AM33XX_PADCONF macro separate conf and mux Date: Fri, 19 Jun 2020 11:06:06 +0200 Message-Id: <20200619090608.94948-2-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200619090608.94948-1-drew@beagleboard.org> References: <20200619090608.94948-1-drew@beagleboard.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200619_020651_422944_0FF52E74 X-CRM114-Status: GOOD ( 13.48 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Drew Fustini Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org AM33XX_PADCONF macro is modified to keep pin conf and pin mux separate. This requires #pinctrl-cells = 2 in am33xx-l4.dtsi pinctrl-single.c but also be changed to support "pinctrl-single,pins" with 3 arguments (offset, conf, mux) Signed-off-by: Drew Fustini --- v2 change: - remove outer parentheses from AM33XX_PADCONF macro as it causes a compile error in dtc. I had added it per suggestion from checkpatch about having parentheses around complex values. include/dt-bindings/pinctrl/omap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dt-bindings/pinctrl/omap.h b/include/dt-bindings/pinctrl/omap.h index 625718042413..2d2a8c737822 100644 --- a/include/dt-bindings/pinctrl/omap.h +++ b/include/dt-bindings/pinctrl/omap.h @@ -65,7 +65,7 @@ #define DM814X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) #define DM816X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) #define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) -#define AM33XX_PADCONF(pa, dir, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) ((dir) | (mux)) +#define AM33XX_PADCONF(pa, conf, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) (conf) (mux) /* * Macros to allow using the offset from the padconf physical address From patchwork Fri Jun 19 09:06:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 11613533 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8478913B1 for ; Fri, 19 Jun 2020 09:07:26 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5B63F20890 for ; Fri, 19 Jun 2020 09:07:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hBCIRTWt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.b="hbsAZmXN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B63F20890 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=beagleboard.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=kJj/15qECILlLsy0mou01qmSY1pTRi/Wp/5nz5FcwWk=; b=hBCIRTWtzdz24A y5ASK5itxpACF0o4doQwKQLMIUw+CPJT/7TBI+XUy0sMbBuw23gGmGfWqkER3M90Wc1fAdnOoQrHU vzQsZy2qmRGGRYKcU1IHwP3BMPy87uMLABEUhfb8XPwkIqrQtAnK0qGDvRUajolQCH4nxINWBGnRM qcqnoRKcKQLca6hqDksDKSd4tBVJ+Eh6XexzLpj+9bECwgNEaYW4SPc2Porw3tIubHMqfCjuT69Dp KZRq8kFtWQz9Fcasl3y1VaXKhfmwSTG+e2/CdrL02pALLO8Z9nK6lSmmT1r5OnsEBbVnmqNRMElIE 72bb/SV4n2tGM3eH4akA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCzd-0004BZ-GY; Fri, 19 Jun 2020 09:07:25 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCz8-0003jQ-I5 for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2020 09:06:55 +0000 Received: by mail-ej1-x644.google.com with SMTP id mb16so9416031ejb.4 for ; Fri, 19 Jun 2020 02:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EF3uQr3RQED1YKYkNKEVE2Xoq5JyRRd7hiTR6pRsTG4=; b=hbsAZmXNE2TaOrADyfhZ4LncxAlKOcWNbKLbDeF2rsahruJQCNzLprdZsGdbsUDjbq qrzTvHV7mlFcoGs5wRL1DmgYNtpfTYJn4yUmv3wLcxZn6ifXoTmBYaKDalxxjprE4H75 OFcrYnlQQb3DyBgekcLt/QElT7wo5S4Fx2JoOrZuAHEe640Rad0m9k1WfJvRz++zkTS7 c4Xc2hdrnjqNTUCgQk4kqi9gGZAT/y0MHgN+y3t734xefMs29v8NjuC/JpsypOd6R2t4 Si6ZesNDYvk6F49qAjkeO/QV73MqqosehLo+mhVjGQDVaAiRozB3VWBJFDg8zbopksMe ClXw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=EF3uQr3RQED1YKYkNKEVE2Xoq5JyRRd7hiTR6pRsTG4=; b=AGN34qJSCD9E2uAFLAO4xH3bpAdbRm5/bPWjGlMdLRIFAcBjNtcP3HGL4kiF2grjDt M3jg764bD1si+RaE2Ter6AAyT1VQqbZDyCdLqSeFOY/PV39L967y8m96m34DMmg1cL5T SVeo3+iGfKEs9aOGUMAOPnWC2Offs+w+q+5u40a3Eovp52Q0Oh99mu5qg4yujaRZB917 zpPQYcxatMsP/7bZTxBGU/yh9qYCWRPFVGguiu2i61mn+3TdGoBUCnKZ+8Vv5me71eMM NztyyIKDvO7d/b9615ljOBKNy3/gb8a7QCNvCP42ILf+xw77PSkJWG/xzX01tPDVTZ+f b7pQ== X-Gm-Message-State: AOAM530h7eXxwiqBKkzUhqHM1bR/9aGYPW+0rhnQTv0x+QrKcKSQS//5 1gBD/7TfbeDzRpsfA/FMwOcQtKmsyhG2qYMv X-Google-Smtp-Source: ABdhPJwcHprUUq00PuchIFIQbAmYwvW8uI0PLiIJTeBXZedE5iHqZtnO5Gza2w34X9TiFWfp14Ftgg== X-Received: by 2002:a17:906:2615:: with SMTP id h21mr2624881ejc.84.1592557612232; Fri, 19 Jun 2020 02:06:52 -0700 (PDT) Received: from localhost.localdomain ([2001:16b8:5c68:7901:5c06:6064:338b:4004]) by smtp.gmail.com with ESMTPSA id dm1sm4653650ejc.99.2020.06.19.02.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 02:06:51 -0700 (PDT) From: Drew Fustini To: Tony Lindgren , Rob Herring , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Haojian Zhuang , devicetree@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Cousson?= , Jason Kridner , Robert Nelson Subject: [PATCH v2 2/3] ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2 Date: Fri, 19 Jun 2020 11:06:07 +0200 Message-Id: <20200619090608.94948-3-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200619090608.94948-1-drew@beagleboard.org> References: <20200619090608.94948-1-drew@beagleboard.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200619_020654_648471_29BA289A X-CRM114-Status: GOOD ( 13.31 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Drew Fustini Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This requires AM33XX_PADCONF macro in omap.h to be modified to keep pin conf and pin mux values separate. pinctrl-single.c must also be changed to support "pinctrl-single,pins" with 3 arguments (offset, conf, mux). Signed-off-by: Drew Fustini --- arch/arm/boot/dts/am33xx-l4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi index 340ea331e54d..f9b99cfa93b6 100644 --- a/arch/arm/boot/dts/am33xx-l4.dtsi +++ b/arch/arm/boot/dts/am33xx-l4.dtsi @@ -290,7 +290,7 @@ scm: scm@0 { am33xx_pinmux: pinmux@800 { compatible = "pinctrl-single"; reg = <0x800 0x238>; - #pinctrl-cells = <1>; + #pinctrl-cells = <2>; pinctrl-single,register-width = <32>; pinctrl-single,function-mask = <0x7f>; }; From patchwork Fri Jun 19 09:06:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 11613537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A353214DD for ; Fri, 19 Jun 2020 09:07:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7819E21532 for ; Fri, 19 Jun 2020 09:07:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="an0E2WR8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.b="UB/REUZq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7819E21532 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=beagleboard.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=X0dm/b+MJIDP7alaxI+p/0TBCv/HalcVomG3+lIr2Ro=; b=an0E2WR87jKSJW S9nTbSQNju8oc6G6tpElvtRieAFSNyEGjgewIQOmCvr+F7BtvyV4MCUdVeAVPVOImPpmPO4EgOKxq tDrWacWNX7ETn7hsC1T1jy+NbymCbQCqUGeP5jxkvm2YLGZUFeKHXxLKDzWQ1YLZiTetnPm/oYdr3 A22Qg6S8gjRcg/aHGwz3j21STWhFEG/YVequqjNLkowhUM5aOgg0Ftp6oHTQEi6/cBSe0U1FZjUCv 1hYHatk/qSwGslVJmYam2Rgu1cxPxz8LkuaLpIqH8JHtlxGJsCcUCZF8wuzh3OEwLl5NpdDAFr9Mc fAVcJohCJ8Vc+z1nwy2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCzq-0004OP-Cd; Fri, 19 Jun 2020 09:07:38 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmCzA-0003kp-K2 for linux-arm-kernel@lists.infradead.org; Fri, 19 Jun 2020 09:06:57 +0000 Received: by mail-ed1-x542.google.com with SMTP id t21so6971707edr.12 for ; Fri, 19 Jun 2020 02:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+0u89dpmgvQy4plYwwslEmSBiru+bR25mmVExT9ZnYw=; b=UB/REUZqGhSab2IhwMetGxClUkd/oH91Eb1YMtnqkqAxIYIsM5YWJ4a17MUa8/08et 0KoPGo9oOwe1emR2wQSQNrT5mDdb5rPGbQPYSjM7oAM0AmVr3nITPyO5xBU0y99uSaYS GceF0JPmFhlA4OqkmdjhyRfE1guxkExlPCp0DWWvNnsOZnKJIUT+xfTjyP1zTVLFmjP2 dMylqWecptZAOuQnxr4pfUQnYY3XKand3fm9DpP1DYG41QiDNvEzeMJVk82vaFfE2K9D qtb13ihfkOU5g1JKWZXaspFlc8GMvyr56s1ipcyGwqqbQPiOZwcx/nYfvYwyMjpAPLcZ I8Jw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=+0u89dpmgvQy4plYwwslEmSBiru+bR25mmVExT9ZnYw=; b=WW9H3PFgOmRjA8Raq6zhbHd0hb5vif5MDfIdhclqsONsgB8k081WMoVE/9TwYg6WA8 5Z0OpANPPErZSFMGkBL55rdWtlS2F31PFfHVBi4+WNPhJmWzpgDSBzuRzY2k7SB20lXM Xm6nnNVoCcT7ZKWuBy70YaK3K/bKwaSdsoUgGEzeZH7dq/KBgjvUyYmZKCvjEUbB7Zea SnybmtNidS0PTqHUSawu4WRAATGEDyQxjAVEGjSmWW22CrLuDDkfbLtbcKJnBkUfLC/g gpa3XaaktoikAZZ+kuSq8zFSj8iGkV6waBZ8PbUc6We8BDm6jKb97YmQ+QvG9aLq+5Jw f0Fg== X-Gm-Message-State: AOAM533csZI0vlba0HocmujxaqqUfGFhQ3t+UKs13OL2i2EOrH8ttjhD Jlc/qiTuQkwcJx76e4GVHwQNUA== X-Google-Smtp-Source: ABdhPJy/3Bg56TEDS6v87nEXxy3icDzdDUs8cujpuQA8aXHR5JzzlkpBgh63TY4ie6qdHZydvU1qVg== X-Received: by 2002:aa7:d7ca:: with SMTP id e10mr2271039eds.45.1592557613971; Fri, 19 Jun 2020 02:06:53 -0700 (PDT) Received: from localhost.localdomain ([2001:16b8:5c68:7901:5c06:6064:338b:4004]) by smtp.gmail.com with ESMTPSA id dm1sm4653650ejc.99.2020.06.19.02.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 02:06:53 -0700 (PDT) From: Drew Fustini To: Tony Lindgren , Rob Herring , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Haojian Zhuang , devicetree@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Cousson?= , Jason Kridner , Robert Nelson Subject: [PATCH v2 3/3] pinctrl: single: parse #pinctrl-cells = 2 Date: Fri, 19 Jun 2020 11:06:08 +0200 Message-Id: <20200619090608.94948-4-drew@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200619090608.94948-1-drew@beagleboard.org> References: <20200619090608.94948-1-drew@beagleboard.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200619_020656_705338_8F0FA328 X-CRM114-Status: GOOD ( 12.30 ) X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Drew Fustini Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If "pinctrl-single,pins" has 3 arguments (offset, conf, mux) then pcs_parse_one_pinctrl_entry() does an OR operation on to get the value to store in the register. Signed-off-by: Drew Fustini --- drivers/pinctrl/pinctrl-single.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 02f677eb1d53..e6d1cf25782c 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1017,10 +1017,17 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs, break; } - /* Index plus one value cell */ offset = pinctrl_spec.args[0]; vals[found].reg = pcs->base + offset; - vals[found].val = pinctrl_spec.args[1]; + + switch (pinctrl_spec.args_count) { + case 2: + vals[found].val = pinctrl_spec.args[1]; + break; + case 3: + vals[found].val = (pinctrl_spec.args[1] | pinctrl_spec.args[2]); + break; + } dev_dbg(pcs->dev, "%pOFn index: 0x%x value: 0x%x\n", pinctrl_spec.np, offset, pinctrl_spec.args[1]);