Message ID | 1443477401-17238-4-git-send-email-aalonso@freescale.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D697A9F36A for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 28 Sep 2015 22:04:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 123562070F for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 28 Sep 2015 22:04:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40D702070D for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 28 Sep 2015 22:04:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZggVa-00079A-JV; Mon, 28 Sep 2015 22:02:54 +0000 Received: from mail-bn1bon0135.outbound.protection.outlook.com ([157.56.111.135] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZggRt-0004ND-SM for linux-arm-kernel@lists.infradead.org; Mon, 28 Sep 2015 21:59:06 +0000 Received: from BLUPR0301CA0024.namprd03.prod.outlook.com (10.162.113.162) by BLUPR0301MB1633.namprd03.prod.outlook.com (10.162.214.139) with Microsoft SMTP Server (TLS) id 15.1.280.20; Mon, 28 Sep 2015 21:58:43 +0000 Received: from BN1AFFO11FD046.protection.gbl (2a01:111:f400:7c10::142) by BLUPR0301CA0024.outlook.office365.com (2a01:111:e400:5259::34) with Microsoft SMTP Server (TLS) id 15.1.280.20 via Frontend Transport; Mon, 28 Sep 2015 21:58:43 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD046.mail.protection.outlook.com (10.58.53.61) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Mon, 28 Sep 2015 21:58:43 +0000 Received: from bluefly.am.freescale.net (bluefly.am.freescale.net [10.81.17.130]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t8SLwUPw032549; Mon, 28 Sep 2015 14:58:42 -0700 From: Adrian Alonso <aalonso@freescale.com> To: <linux-arm-kernel@lists.infradead.org>, <shawn.guo@linaro.org>, <shawnguo@kernel.org>, <linus.walleij@linaro.org>, <lznuaa@gmail.com> Subject: [PATCH v7 4/7] pinctrl: freescale: imx: allow mux_reg offset zero Date: Mon, 28 Sep 2015 16:56:38 -0500 Message-ID: <1443477401-17238-4-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443477401-17238-1-git-send-email-aalonso@freescale.com> References: <1443477401-17238-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD046; 1:z5gr3arPSmxWM1w2wJJlOWorxY6dWOjz240+gRx9vY9krUSzEpVFE1FsKTpnHHDf7V3E5sfZGRCWyhX3JmsQjsg9/b4NBeQMkuSgST5BK25PjFSViC4ku6OR38dyE7I0YNHSNdJmCO+e/cfE7lHXs2vR/Iak9E1IoIKnVLf9j2+Yhcsv4Apj+8Ll7SiTV7Rczli3mQy3/O8TVtCGfSbD0glY7oiGVOuoirk1Vh0ARWQXcUs4/si2U0lfODges+Z7uEXzUxASZVPRK/0xuYhh240WsP7okoQByve5PwpcmbmdJ768FdhQi+G6GB7aLrzjbd54AMfserPOqWuczuGJ+DVkiMyFX1NBd2oVen+YiKywVgb9AEVk6aND57Wf1mxbNJgazAVL+kqY2o3Bw7UgcA== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(97736004)(105606002)(104016004)(6806005)(64706001)(77096005)(5003940100001)(81156007)(47776003)(5001830100001)(36756003)(4001540100001)(5001860100001)(5001770100001)(11100500001)(76176999)(92566002)(19580395003)(19580405001)(2950100001)(50466002)(86362001)(189998001)(5001960100002)(68736005)(50226001)(87936001)(85426001)(50986999)(229853001)(2201001)(77156002)(62966003)(33646002)(48376002)(5007970100001)(107886002)(46102003)(106466001)(4001430100001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0301MB1633; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1633; 2:q7aKEWNH7F/k87SbSKDVC7VbfnFTFhch4e2fN+F6uos2YG4IIfDDnkvk2RCCaKNmA9Lez09ZcvwrjkEMBjs2RxRqH+jGtM43qhHTyXv2i+VCYj2n++XA9VoepyQAcRUMBdCT2X3SeUtWuvKnvRbvrZGYsuCkKqm+xSS6qdiLnKQ=; 3:IsTeoSA/R6qwG2Jtm151Cc2OJA9JDsT3+v10KEZxUNx+stBVIhqE7jNqDpLp98G/VtUFXpCos6gwSOVUbfw3gMoIoa6DISEWjfwckI/xl3OA03pEAZ9B/27x/Xf7Ok/Ng4YghQLuvdM+fFCqebViAkydZ1iUEeHR5XBwmGqKC/qBXcYMI2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sbt++rfjv4roxoYgXKFh2na1o2de/uLxSyVVN1Qo5mtYXyV4plo/7ksINEry7iPTCZLbwJnvTecg/+CnqwPm1YxNv5I= X-Microsoft-Antispam-PRVS: <BLUPR0301MB1633B1F81EB28E5B038FB989A84F0@BLUPR0301MB1633.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001); SRVR:BLUPR0301MB1633; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1633; X-Forefront-PRVS: 0713BC207F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB1633; 23:RTXCuTLiM9Mp99Po6neGX1oN+VEeTGg/lUaoSbE?= =?us-ascii?Q?OGQn5ZsUKTtiO5GPjHqllhHsGeBvmTONhoCudT5nbZ9+kLOF+PRMGbV+yDD+?= =?us-ascii?Q?PDWvlp6XrfisrUVQf15esGlcSeQkeBWWsN4ATRXjcD+cOXko7cSBFAvRRC7g?= =?us-ascii?Q?TJyQhi90C8/LvReqj+NU6cFT0JyXfHBXXgO7ikNQ29l07vSgzaxQvTO2I70x?= =?us-ascii?Q?uWZa09gdzvWVk8pLwwQSG5SKoQF43bweqkBQPpsdKW1WBwUzBFLwLOi5AvdU?= =?us-ascii?Q?p+OQwY1ECpgsMdDuEvpC3aQsrwj3KmNjV55iwd0ovZD6msoxDLAppZ4Gl8EE?= =?us-ascii?Q?jdoYw7w/n1k6dPneFSNHu+kCrcTGY2ivNV4ZrVfWYWuVifNzh3SmXDoCpAGM?= =?us-ascii?Q?8hUqregbq3I7/kkZ8XGHxNwQENUGCunqyLEvfQz8EBWuY2ZGupuDY23yCbRe?= =?us-ascii?Q?Hl1LyH8/RvykWbsZeu5OfEkwFXeoM6HZHqEIFBZadLb8lAgbAdN+fzGqD2wr?= =?us-ascii?Q?lS2MNHB0hIvMKR0Mq/09LusYNqlST7USxjwzy4M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LTMG7k5R6zs7CDWXCVyUNCbMHh70/HaQhxkCTP8PKA==; 24:oaCWQJfEv8z2P3hzlCsuUC4weP9zmwCXYMYiQQct/FDfj3/l8bI+H6MAtna+nHH6qQ/XPoa+kb/A1inrva5vvaoEqia9BEeOGuum9PiOAuI=; 20:UtUo36Z2xX55iWoAQQrifjjbZA+GOVf57g7Yhht55FzKZTtIxLEz3+e9WqO2TZ5cj3hzjUv1H5Ofi05dtl94ag== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2015 21:58:43.2961 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1633 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150928_145906_154620_8B2D4C15 X-CRM114-Status: GOOD ( 17.61 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 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: devicetree@vger.kernel.org, Frank.Li@freescale.com, nitin.garg@freescale.com, Anson.Huang@freescale.com, linux-gpio@vger.kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, yibin.gong@freescale.com 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index b9c6deb..151d50d 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -542,6 +542,9 @@ static int imx_pinctrl_parse_groups(struct device_node *np, struct imx_pin_reg *pin_reg; struct imx_pin *pin = &grp->pins[i]; + if (!(info->flags & ZERO_OFFSET_VALID) && !mux_reg) + mux_reg = -1; + if (info->flags & SHARE_MUX_CONF_REG) { conf_reg = mux_reg; } else { @@ -550,7 +553,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np, conf_reg = -1; } - pin_id = mux_reg ? mux_reg / 4 : conf_reg / 4; + pin_id = (mux_reg != -1) ? mux_reg / 4 : conf_reg / 4; pin_reg = &info->pin_regs[pin_id]; pin->pin = pin_id; grp->pin_ids[i] = pin_id; diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 2a5fe72..2a592f6 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -85,6 +85,7 @@ struct imx_pinctrl_soc_info { }; #define SHARE_MUX_CONF_REG 0x1 +#define ZERO_OFFSET_VALID 0x2 #define NO_MUX 0x0 #define NO_PAD 0x0
Allow mux_reg offset zero to be a valid pin_id, on imx7d mux_conf reg offset is zero for iomuxc-lspr controller Signed-off-by: Adrian Alonso <aalonso@freescale.com> --- Changes for V2: Resend Changes for V3: Resend Changes for V4: Simplify pin_id assigment when ZERO_OFFSET_VALID is set Changes for V5: - Drop patch pinctrl: freescale: imx: add ZERO_OFFSET_VALID flag - Allow mux_reg ZERO OFFSET as pin_id Changes for V6: Restore ZERO_OFFSET_VALID flag Changes for V7: Resend drivers/pinctrl/freescale/pinctrl-imx.c | 5 ++++- drivers/pinctrl/freescale/pinctrl-imx.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)