From patchwork Thu Sep 24 20:54:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Alonso X-Patchwork-Id: 7261021 Return-Path: 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 52E2E9F380 for ; Thu, 24 Sep 2015 20:58:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81A0220AAB for ; Thu, 24 Sep 2015 20:58:44 +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 80A4220AA5 for ; Thu, 24 Sep 2015 20:58:43 +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 1ZfDZi-0001CR-05; Thu, 24 Sep 2015 20:57:06 +0000 Received: from mail-bn1bon0144.outbound.protection.outlook.com ([157.56.111.144] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZfDZJ-0000oA-Gh for linux-arm-kernel@lists.infradead.org; Thu, 24 Sep 2015 20:56:43 +0000 Received: from DM2PR03CA0034.namprd03.prod.outlook.com (10.141.96.33) by BN1PR0301MB0769.namprd03.prod.outlook.com (10.160.78.151) with Microsoft SMTP Server (TLS) id 15.1.280.20; Thu, 24 Sep 2015 20:56:18 +0000 Received: from BY2FFO11OLC014.protection.gbl (2a01:111:f400:7c0c::129) by DM2PR03CA0034.outlook.office365.com (2a01:111:e400:2428::33) with Microsoft SMTP Server (TLS) id 15.1.280.20 via Frontend Transport; Thu, 24 Sep 2015 20:56:17 +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 BY2FFO11OLC014.mail.protection.outlook.com (10.1.15.48) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Thu, 24 Sep 2015 20:56:17 +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 t8OKu0F3030281; Thu, 24 Sep 2015 13:56:16 -0700 From: Adrian Alonso To: , , , , Subject: [PATCH v5 4/7] pinctrl: freescale: imx: allow mux_reg offset zero Date: Thu, 24 Sep 2015 15:54:00 -0500 Message-ID: <1443128043-21063-4-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443128043-21063-1-git-send-email-aalonso@freescale.com> References: <1443128043-21063-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC014; 1:hfzsn/U1uL7tNBOfjMrk/jsUZKsmQPaKyh2z/JdVcvRtJtWs3L0+jmy8IEJWYq8U1wvH46b0g/l399Uh0fD8YZT59IeH3Ad/6BLFV27HOnGp3dVQwC1jjm7YF6i0Ckk5lT/UKvorBNw1pts+AynzOjfIW/x4W+oGN7OxmUxkPdGZYSb9LmkOV6T1s/xpQ5xcsj4nD/wKfQrahQ3glzvh/UhoTsLQ1dVkuVQ5HDMSLnndzLDgfTC9Os9vkK5gy6ON1oAcjkEni7utkWWF1SiGlqTv4Rp8CZum5g9v0oQpKqbctg42DZgwRCmUMDZJqlqVyz0q30GLtVIbgCyipT95kJxeHWqaXuh/AOUV1108FL4xCH7PANO7e+0L/itBTrzy/5yzGanGnM7JrI/YFm0TUA== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(81156007)(4001540100001)(19580405001)(2201001)(19580395003)(50226001)(36756003)(68736005)(107886002)(2950100001)(77096005)(5001960100002)(11100500001)(5007970100001)(33646002)(50986999)(76176999)(87936001)(229853001)(62966003)(77156002)(50466002)(189998001)(46102003)(92566002)(104016004)(6806005)(48376002)(5003940100001)(97736004)(64706001)(5001770100001)(5001860100001)(86362001)(5001830100001)(105606002)(85426001)(106466001)(47776003)(2101003)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR0301MB0769; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0769; 2:QVgbKYyf8U4B5sKwhJYbJH2Xt0MIyuKSZ/K9PVZ8yHdty5wjubfG+mBQqYKqAasRVkHNJzL7xHf2AyoEoOWAwSciYImO/IZQnFxy9ovWYGUWbWYsODmvs//fiEDmtVQAuu4HFvCRtk7bjySvXhxMlbgibpvW4FJHPtoc2e4f7oA=; 3:VNzq/1cgId6HZ9MW2nFOOZE1LUf+EisWSdnT17iR7q06LG0aNFufaqaJW0G6AlOcjFTHiS4oe6FrouKtV64LxMvW3aMVGPD4a3G2xJHza5giwvBGFZfeQ84zlNzGAsNTMqosLqcBL8xik5qrosQqw3RWPxXph9e69WqPXpR7ZzVutqFJbLN99XVF6cBrPS1oBvNCit9w/O3J49o95dduXW3Cql9NBScWpssjOCMderY=; 25:U8E2Cn8GmWtaZat3aiHIdlxcCMygcuSjWBZKv223kesXmn4J+kmZe62/cOJMxbo58jDzHgFl/cM4tMVkKd31vF/OPb+i4QGo1Ovi8f/kcR+jBOQrCY9r7WBkmEBwR4JXYnw4j3Ab/jz0UqQW2W2B5kF7HQKDKkhfmsj8oS3O97t5I2Q0dsRuo+QuCG7VmxeIPFDH0366q9+3Zy5clV6ZUxh/b7CVChkeLkgaDK/xXtn+h5vs1WDuDJ93QxPb4N4gFZ48Thnc5Klsze/bwstfjQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0769; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0769; 20:hlNzfiXb3a5mrn+Nx9TyEA/MNgAHl6FIHKoLR1+RFzWCziXQ3jeJVUKu1D6/OMgSQ+8jO8cUQTXXjYEJ/nWn9ChjgEuUPmC00IhUXlzLc/qkP/YMnzOOvShxahzEBdnixLVcT2f+Kw0U3iSRS8t1xe4SNhQGNasyyOJtn0eXSH86QTai0onHrow/oZ7epD9zV+xaJibt8NDUEhk5jgntuhBug5D7zGikCSqGDovh3D5UVJVwvFcpLV0QS41LjrxJWeTHTYM51T3ZuQSBGkUG/bjpqB7S4CDlzTBKy2hV8n0+BsI9eXluoik0hMyxGvNqUq8rYuyPu8vGffV65nS7lsuBuIS2f0QV0lfodz8rWE8=; 4:lnARpdhNiI7NVrm17KmK3SrbQeY8WVhgnmW6qTQ/CCn/BbVd4toVWOyYf6l0QhwrorSNcMe6P2fXM9snjKS/qX8e+p8GpGISp8XdDfL0qI+52FC+yBfByCZp0FkzF99KvuEx/9tWZOrqfVka5gX7FhKL4HMNaGeXfbY9XtmExSM2enkqGdp+fKl858o4sQtVuMDGp/jMR7/yTar/sjcnBbd7hZ5TRjQuu08VMNOmGC14/OXdTl8Ugd+wbLWiRuQNzALO92zIHzksX25pHq2UIc1EZK5dVWXgnX+4wEoZWPV3SL+xIO1wCc8vV2VeOXKmK8xUsTgEeWXosEiJ3MOwK3qF8JUxu5ASQ3QE6ts2FRQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001); SRVR:BN1PR0301MB0769; BCL:0; PCL:0; RULEID:; SRVR:BN1PR0301MB0769; X-Forefront-PRVS: 070912876F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0769; 23:dm5Yr/z7Sy8otZVcV5Xf23aT0Va+MHQfllHZdXd?= =?us-ascii?Q?cDQnudiEx15yL1exv6PDwB8g6bD3amJ+2NDL5P/GGf57iitthpl+j7/7Pr8V?= =?us-ascii?Q?GeOax2/KbGa3IrFykJ8UG7TBpN/fRkdmXD5Qbyp5RNVthlM2XSQhlnol+J2J?= =?us-ascii?Q?1X4+ERyoXbq3q/xYVxaHVWE9qL6BYm6mUWseDfnMQQZ+ns7p/Ge+vdQrPLum?= =?us-ascii?Q?38BVWtTTD+eQ8nQHSGzEXzmdl9nkquoCXAfYaws647VOJZV3/MNdcB9rNCXI?= =?us-ascii?Q?deHU6D9XrKPGu9ChM5E2HGZfCJcS12/x3q5ZbSLQS3okvWgzD6dTJZDOdMoc?= =?us-ascii?Q?M/eYavM/ir0dGwlV9z63Y2u52BqMRWAJNfhks5DLVVFB4sDcCPjXc/GlV40e?= =?us-ascii?Q?XGqyFL0wb613JRDRfP95/D3I/uKINGoIdsg2wDjLViICDFANhe2Has4sGUPq?= =?us-ascii?Q?+sLN8TajchNB825H0rnpUNgBHYD1rePbINexUObt8onpJQ84QiUM4H5/txCC?= =?us-ascii?Q?4HdKcA70KTmjoTV/mo3cB4cD+3PN/LNj4Ug1sn/YR1SPTkMAu98T608jNaNf?= =?us-ascii?Q?8MKulhzwGBGXLNmnHTjIiErnNEsnDHGrHO5XbNhBaY/E2D49i29QMIX2/jkW?= =?us-ascii?Q?U48SJoHogOK9ib5RxTM2NQ2Xv4NY2G4t3IaGFdpXGNIcs06NOmrxzI+yr0HR?= =?us-ascii?Q?isMeoZMtNYhpz9xidoAVzCdtVLmE9yXNktAp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6+6V+543dPianMC3wPOcrw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2015 20:56:17.4336 (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: BN1PR0301MB0769 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150924_135641_935280_BA22C121 X-CRM114-Status: GOOD ( 15.76 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 Sender: "linux-arm-kernel" 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, 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 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 --- 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 drivers/pinctrl/freescale/pinctrl-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index b9c6deb..23348d8 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -550,7 +550,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;