From patchwork Wed Jun 21 11:59:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9801671 Return-Path: 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 312BB600C5 for ; Wed, 21 Jun 2017 12:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F8CC285A3 for ; Wed, 21 Jun 2017 12:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 139AA285B1; Wed, 21 Jun 2017 12:04:14 +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=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 EA618285A3 for ; Wed, 21 Jun 2017 12:04:12 +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: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=EHc/+OAoygx1euJe4D5NCkvovXHrxhUAAMXT3fn8euA=; b=ndGwuBn1iZDSPh JjFgnuZHG+EGXrFmaUm87FXVpoMhA6MVN9ETxDQAP0PzJtuDCAuUVnHT9M3xUYAHUtkRYc6Hz2UlE OjOtYHXxSKIZZRq79g5xR84Zegj+77IMWIoxgXBbs3+kjkWVHvGujfRhEwVRapXwfPxi84tGoxfEf XJwQ2aU7tMOfN0WriovL8HGcW9Osj61AMwO+twkoMl7COmsynvQ0LC/XPu6rPwtkGdiH8Jtmvs5K9 bmfvVp4dJPJ2k1lZov/6ttHQdLov52H0wNv/gx9LuEIeyp6V9OJSFT4oLF9GB4Mc9uWOkDsXyecxr Ady/03VkqZvOWDJFriAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dNeMk-0008D2-KO; Wed, 21 Jun 2017 12:04:10 +0000 Received: from mail-co1nam03on0077.outbound.protection.outlook.com ([104.47.40.77] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dNeKw-0006K6-CY for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2017 12:02:21 +0000 Received: from BN6PR03CA0074.namprd03.prod.outlook.com (10.164.122.140) by SN1PR0301MB2014.namprd03.prod.outlook.com (10.163.225.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Wed, 21 Jun 2017 12:01:55 +0000 Received: from BN1BFFO11FD042.protection.gbl (2a01:111:f400:7c10::1:118) by BN6PR03CA0074.outlook.office365.com (2603:10b6:405:6f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15 via Frontend Transport; Wed, 21 Jun 2017 12:01:55 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.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 BN1BFFO11FD042.mail.protection.outlook.com (10.58.144.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1178.14 via Frontend Transport; Wed, 21 Jun 2017 12:01:55 +0000 Received: from b29396-OptiPlex-7040.ap.freescale.net (b29396-OptiPlex-7040.ap.freescale.net [10.192.242.182]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v5LC1Q1t009655; Wed, 21 Jun 2017 05:01:52 -0700 From: Dong Aisheng To: Subject: [PATCH V4 7/7] pinctrl: pinctrl-imx7ulp: add gpio_set_direction support Date: Wed, 21 Jun 2017 19:59:55 +0800 Message-ID: <1498046395-30001-8-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498046395-30001-1-git-send-email-aisheng.dong@nxp.com> References: <1498046395-30001-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131425201154725739; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39840400002)(39850400002)(39380400002)(39400400002)(39860400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(54534003)(189002)(199003)(9170700003)(105606002)(356003)(8656002)(54906002)(39060400002)(53936002)(4326008)(76176999)(77096006)(110136004)(38730400002)(50986999)(8676002)(50226002)(81166006)(7416002)(8936002)(36756003)(189998001)(2351001)(33646002)(106466001)(305945005)(50466002)(5660300001)(2906002)(48376002)(5003940100001)(86362001)(104016004)(498600001)(2950100002)(6916009)(85426001)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB2014; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD042; 1:QuYKDMgVIGbWU1pq+mj23W0CzKwOsyLHS/usNmcnm+Yp7Ln0qkoM6/PyEb/C3r8e/iU+G2wsxVASTDWkJE2fhQ1O1oUJHpe2HkcM715SLP4fqqzuvZk6UkfBlqti47xhE76lJZxD8g71taYt1fo9XgU3gqOmQS8DFvgzDfgkA9UzFn5afgceQiI4mkV5tI59ZVUY8C+UVr2PRh+q3uwXICvdbHIJjjJzLZLrYq3N/F6+/Ncdhs5WNJ31bwWKiHUydbtjbICZHuZ4aG6dndM/SWWiACFTnLXrX3vL0v9gnW+YGxOlE24HIPfajXMmZFciz4xEZXb/ij2lQ5oXybFIXGOMkOpSd1NPWbsenyTn3bFdGPKzsN1qeZl/X2CmOeKROJlkkefk18loQmDI/xKWK3SCI9SM3cn/vtiNwpVi5VDo5AGV7/y2eFQ58P3p0FiNrfCx9eE0WICgFQjoRbSIQe+eAq4KQzakqe5a+7sldPfiq6MBQMD3dMBQKf263jfaamfXVgORKUP4MZJxUxEhIgHcr06aKGgYedUeq4rKPdl/vMOF/e6mHnOAxxAZ5hAXxh4gwnj5UygfRU/kpQsLPaTUKmtkUhWJ9IVO78ySadwuZqPu0FwbGPmxfxYDmPfEUi0fF4oRMmKKHdBPWVrAoIlLp+jW4QDSc5BR98b8EOhGi/DxlLRDQzXbuXdRISRKqqKEIq+5P5yTp39P+SSys+UL98XazLKDanINoZM1+BflO6zF1uIddE5QeyPmrTEB MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b02d519c-143a-4876-976b-08d4b89d4fd3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:SN1PR0301MB2014; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2014; 3:a3dwatVE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gQTDxh7X69Prxhpv9AnXqDSx5JR8I6Nrfv7HUFVYCRS9sqXScx3ULPQOss7LrnBhkSrP9Sk9ipDMqCRj87Jj+OgbPDglRsw7EKBibRMr949/WEZgzwvDK7t1cGt5E4s/0xxAxxdAIMvIfTUJEmyUj2XDRIL4p1Tgj1XGXKpO+MZOeSEoM91auPYq65OrlrX8Um6bZw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(20161123565025)(20161123559100)(20161123561025)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR0301MB2014; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR0301MB2014; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB2014; 4:JwyOiwM7nJcxW3Afx9/rZSFmdpWM5RQTDHE58xcF?= =?us-ascii?Q?RT+WQ85O+6KXowPdYwwjz6GKaMV5XwT29FTcPkIfUAz/KLcnReEjnzEMPVX1?= =?us-ascii?Q?xi7jsomAY/mmbAGhhTXhxfJdgfeHB4zHIjw0tpr6p/bwNAtVvcRg7cTCmbnC?= =?us-ascii?Q?Uiu6QHQIF0KfkdR8mPbYmDyI+npySidsvyOeTUPm4nNlWMZtBc7QN/+9ixb9?= =?us-ascii?Q?g/e1Ed/Jwk95J8VlZ4ZcfrwVCezpb0QRTqAnTJnOYHslKve/ZreAhiXqzCGX?= =?us-ascii?Q?HbGInH+MCccxzwOnPnTzF/uwS2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89USAYR47nlpkhfx9/Gf4LhMJhFk3GaDMYaRIBa4HgvKEg6mMmM2Xu?= =?us-ascii?Q?VYN4KtddZJ6MuhiKeqXRepXWHQftbXQew4ziDRsKS/DE9F/ukWctbow3WfiK?= =?us-ascii?Q?hL1+qJo+zoJSoub9m/16MOMa4o0+W4gxQV9sKE40/XypeWRZdbcE591Vd+BP?= =?us-ascii?Q?j51qWrWb2n/feNoEiaU4gQU3UZNW/xzUSEfXecaNFCQdAELhceu5iyr8/8/H?= =?us-ascii?Q?LWqdYQ0QoarC0y/t1ZKb8d5rL9uB76ctQ6MbLoRkohnnAnVjHJl373eR/YFQ?= =?us-ascii?Q?KhNZeF3XVC2E57CSfWygKNwLDGrjMBr4UIWtFzJe7h3Y6MbzfmQosEZN27XA?= =?us-ascii?Q?MpbjR1dtUF4qdZBPqtVdw4Nyoqy84hCGtOClSpGTQeIq1UE3B0coqeWyubUp?= =?us-ascii?Q?YIYI4JecsES6XJw1PMDYai/Qk26dZUfxnb+oGpVbQQauui87gwwxAl0G89a/?= =?us-ascii?Q?kbJw20dGYP1p//W0RZS8sm3hwURaPIWbokdD8j2nn+tCN8hLlATgCA4r8Fnh?= =?us-ascii?Q?pgfcVysZBgJx3mcNc5uoDT2QQXyhDm7iLedXpCyXUP/7oCvGkgE/ti32ggmn?= =?us-ascii?Q?F+YLHXnvS2BA619y3QvkeZuwW5WAdtYIlP2cHw0QVWzg5GS4XLG0Dli+PetL?= =?us-ascii?Q?H8pgv2QTSAtMcMBhfxebAjHdYethGmIMVd3sxoPntfVtwpJl+HzA9pvbDlHc?= =?us-ascii?Q?9ozHcxhy2oEDlFdc9nqRyl/SiSpemjjGVy1KnUWIQA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2014; 5:J/yXsWKQIPbM/y1GuQTkq+0A4giMWdB7zd4WUXSazJctanVejA57MncBWWPF5ikGnHVhbZYlcsiyv3fm0YtJA3AfnBHr/MCXNxh2Rj9421FKCmBddiVlgbH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zvIHUd/bd0kkZpf3GVQKzYzU30gX4DvEKwt5CwThUdiJtdNvBDBRZWACcewTh7MjhZAvMpVhNt0ki6k8H91M3J02I/x0txLN59HjOr5jzhN+zBacp7rwIwyoVEff8peEUg8bvX0FWKrD1PlyCAZ3KB1lsLyBlbVIKDP1fliy/heFy+vkrQs13lFTCTMHDU139XbDWF4l59br1S+C8Qv0bHvM1ZE7DCfIZSrJwHuP7exUKpF+OAuTil/YFysHqApDI+aQNZNitkq6zk++aapVPDflAWrnIPdMK7b+PvPK5FFIUNXGJkSPRkJo3X3m1AU6A/P43Ek9kqEaCrV5tKRaOKdj5BCeuFSk= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 12:01:55.2697 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB2014 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170621_050218_749632_679A51FB X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dong Aisheng , Alexandre Courbot , fugang.duan@nxp.com, ping.bai@nxp.com, linus.walleij@linaro.org, stefan@agner.ch, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add gpio_set_direction support. This makes the driver support GPIO input/output dynamically change from userspace. Cc: Linus Walleij Cc: Alexandre Courbot Cc: Shawn Guo Cc: Stefan Agner Cc: Fugang Duan Cc: Bai Ping Signed-off-by: Dong Aisheng Acked-by: Shawn Guo --- ChangeLog: * New patch. Derived from the original: [PATCH 1/2] pinctrl: pinctrl-imx: add IBE and OBE SoC property --- drivers/pinctrl/freescale/pinctrl-imx7ulp.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/pinctrl/freescale/pinctrl-imx7ulp.c b/drivers/pinctrl/freescale/pinctrl-imx7ulp.c index 96127dc..b7bebb2 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx7ulp.c +++ b/drivers/pinctrl/freescale/pinctrl-imx7ulp.c @@ -259,6 +259,8 @@ static const struct pinctrl_pin_desc imx7ulp_pinctrl_pads[] = { IMX_PINCTRL_PIN(IMX7ULP_PAD_PTF19), }; +#define BM_OBE_ENABLED BIT(17) +#define BM_IBE_ENABLED BIT(16) #define BM_LK_ENABLED BIT(15) #define BM_MUX_MODE 0xf00 #define BP_MUX_MODE 8 @@ -300,10 +302,34 @@ static void imx7ulp_cfg_params_fixup(unsigned long *configs, } } +static int imx7ulp_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *range, + unsigned offset, bool input) +{ + struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); + struct imx_pinctrl_soc_info *info = ipctl->info; + const struct imx_pin_reg *pin_reg; + u32 reg; + + pin_reg = &info->pin_regs[offset]; + if (pin_reg->mux_reg == -1) + return -EINVAL; + + reg = readl(ipctl->base + pin_reg->mux_reg); + if (input) + reg = (reg & ~BM_OBE_ENABLED) | BM_IBE_ENABLED; + else + reg = (reg & ~BM_IBE_ENABLED) | BM_OBE_ENABLED; + writel(reg, ipctl->base + pin_reg->mux_reg); + + return 0; +} + static struct imx_pinctrl_soc_info imx7ulp_pinctrl_info = { .pins = imx7ulp_pinctrl_pads, .npins = ARRAY_SIZE(imx7ulp_pinctrl_pads), .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG, + .gpio_set_direction = imx7ulp_pmx_gpio_set_direction, .mux_mask = BM_MUX_MODE, .mux_shift = BP_MUX_MODE, .generic_pinconf = true,