From patchwork Wed Jun 21 11:59:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9801669 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 7A92F600C5 for ; Wed, 21 Jun 2017 12:04:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68A3728591 for ; Wed, 21 Jun 2017 12:04:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CD17285A3; Wed, 21 Jun 2017 12:04:01 +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 4C6DD28591 for ; Wed, 21 Jun 2017 12:04:00 +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=xo7hHr4XVDqflM2ZeG3QZGm6AMyvfWpTwoOWKkpFXn4=; b=ikwWq+zI8eJr7K LRKGzocFnQerU8T+xWzVlXpmx4nk1tretpYaFbukgUH9lLeWzN/TrTFg2QTHDHXQriPxqggmp0AZC u0P+fbSEM6jHIQ2IubLDw9ix+Au1db41LzOFGShLC9UkYfEyT4WEoCNfADr4qanaOj/GjQztTUKlP 1hc1limAhmXggOC+L0N4rDMj4l7EHYBPo+fj570YEGP26LKQgbkutwWzLSiCNHlE2SBDaW9027WgD pgYTeP/mWnnaQHr4uc1zhstodnjN3dOXNsDW/3qUEsGoWnMYCpR6+7V80OuXDpTRtBlympNowV0At 1jxtbCfoan8Jx59HI2xw==; 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 1dNeMZ-00080e-9r; Wed, 21 Jun 2017 12:03:59 +0000 Received: from mail-bn3nam01on0067.outbound.protection.outlook.com ([104.47.33.67] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dNeKu-0006Ja-B6 for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2017 12:02:18 +0000 Received: from CY4PR03CA0075.namprd03.prod.outlook.com (10.171.242.144) by BY2PR0301MB0631.namprd03.prod.outlook.com (10.160.63.11) 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:52 +0000 Received: from BN1BFFO11FD038.protection.gbl (2a01:111:f400:7c10::1:111) by CY4PR03CA0075.outlook.office365.com (2603:10b6:910:4d::16) 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:52 +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 BN1BFFO11FD038.mail.protection.outlook.com (10.58.144.101) 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:51 +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 v5LC1Q1s009655; Wed, 21 Jun 2017 05:01:48 -0700 From: Dong Aisheng To: Subject: [PATCH V4 6/7] pinctrl: imx: make imx_pmx_ops.gpio_set_direction platform specific callbacks Date: Wed, 21 Jun 2017 19:59:54 +0800 Message-ID: <1498046395-30001-7-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: 131425201121287526; (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)(39380400002)(39850400002)(39400400002)(39410400002)(39860400002)(39840400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(54534003)(9170700003)(104016004)(105606002)(106466001)(2351001)(2906002)(498600001)(50986999)(2950100002)(6916009)(6666003)(76176999)(33646002)(77096006)(48376002)(50466002)(7416002)(8656002)(305945005)(5660300001)(53936002)(38730400002)(110136004)(54906002)(47776003)(86362001)(5003940100001)(36756003)(189998001)(50226002)(8936002)(85426001)(356003)(81166006)(8676002)(4326008)(39060400002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0631; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD038; 1:mtTx0hJmEfD6JTEEmxDgkMIr7bzhlmUSl+BcUaVUj1fE2jz9VtbDk8QJLQA1fUd1EjBAB4t3Aadpv0CyPBZafrSbJcvTzmMZvTsW1GwQONYSmcQlGz1efHaa/0KuGQniLKSYk6tka9Y8b9z1QGo1RntllDrMthylwpxsNRRibu0u/RQUrY2Zz2RtodpCTAgXF1PINyNIA1HTnS3eEYS4R5pk+F+5xzNzqsKmDsHpN9dPsrjsuIvO4YThhZ49euhynAloRYs2efH21ZsvKRaFUVxIyxpFUBc7treTODWBCFVm/aLfnnmkv8dAeunGxrjh6AQ+ja9fy0ab9nSubcykCi25QfLXJ/OjqACziC3ORtX3toEeFkl/tcuARJtVXePH9tKypkkEunkAzmWP65eJNtvo0VVKGYo/kL/Ze5gIwkQCRPHMiq6CZWmzk42t0MKcdNyownE2JhmLnHpG58DHsqpjfoLVwKjt7IbW94A2b/OitbO6R4k8kr+KoakVZslOHfI8TQvVdqRU71BkLqNrLSgXIrCIxZV0GAui+427KkSrS0Ce7x0pBD2c7YyMg4IiMYAFBZLrxpCUPWeeyPuSKA== MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 678b33e3-6d2e-4b9c-fc02-08d4b89d4dd2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BY2PR0301MB0631; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0631; 3:tM0ggZ35hMxS0qu2tkBJOu3AY1tI3PWGmMKMOHfGqUvZKWxUmnS0vNaIHsZYhXQK3dV/vTgqR1sSg6+9cQTBddJUTY02aOdKMOVf8PjG0+14mytqQxTmAlyvkka3dsxEC2AUEtqbyqCwYSIdmmMXwCicgiXixjTuKZgEfDWwopHt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4SGGADjFcoLGWw0LK8inDQ+ 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)(5005006)(13016025)(8121501046)(13018025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123565025)(20161123556025)(20161123563025)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0301MB0631; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0301MB0631; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0631; 4:pOqjKFSo9yure3OHDswW/isxpFkSEFJBFYZ5nKhX?= =?us-ascii?Q?dvxbE33b7+yfFrveolCMK96QGuutdUK/0HTDjHXFME7pEgRv0b3cPcP64akN?= =?us-ascii?Q?c73e97bikMsAnSoJr0F761CbsqUsuUdLMyJHQQfFX7rLd0vC9DCTZbgJ4hhc?= =?us-ascii?Q?8lYPUopixrB0iqN0d8kErTt4KxzEgHL7g42jK41/5iJMZwiifhZiIAfiDSTP?= =?us-ascii?Q?tM8lK/MPZLDBTxX6QD6Qcupy679G5TxplT3X+ZwCisVviz+ca2wR8PdsxMHZ?= =?us-ascii?Q?9gvXQ9JhbDgSymKNnfLmM9SmgGLauufN8SX9/j1B/dhjNW+ITuMX0PqvAKz5?= =?us-ascii?Q?laINiO4SgXjJ4wodQpTHGwsKHwrA0A9Kmm9+6/4Tv6I1NLI0TeJ7FQ9gLvju?= =?us-ascii?Q?/8fRwy5NoKHhfwIpbJGkg4S+gTS4n/o9ZcRfAGczIKSubROkb944nyop8frk?= =?us-ascii?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+?= =?us-ascii?Q?KklyQmLpT7iecBY8QaCrQEe5AtMPezP1F7tvrRzyZSIF5srbQQjsMd+CKEyH?= =?us-ascii?Q?jWhfop7+clvunipUaRV78zvedHf3TMsVSB+9oH3KUMPZdMkJQhxtbvSdEuEZ?= =?us-ascii?Q?Xl2vI/W9C9IklWuKJnKmdFgbGjbrXuwbN00NIjeygnFSsJZLrAil5MOPUnVk?= =?us-ascii?Q?6xBj9eqQc+TqPq4OkecG0hTKoEZevcTqstIcRrRlhLf8RdAcCkyUwbEBvaLJ?= =?us-ascii?Q?Bdu3UvVMMN0a5OX6w/OcEEBmRxvVyTDXKcblU2MANFd1RIx9ZnE3QIchNWjI?= =?us-ascii?Q?X3mE1oWdpnRLK4C5xO4Jj5ep32w5H7HoE+s97K5+7KXmVM5vMGMneVVdQ+lE?= =?us-ascii?Q?IwRiZoR9i7jLiJE99LtLM57I5ahdaDS8NKS3wPZCScc13ttzEVveyPIjvxdl?= =?us-ascii?Q?L28iNeKlQMc1u3IJiYGddInhqxeNLESAEaV5PzohcKuHa7qyQme5eHy253qc?= =?us-ascii?Q?61Vw77iHjSxIGeysWZtEDgvW4f5wyVkS3orZxAQwnGdoivLRiZznufNU7SV0?= =?us-ascii?Q?eKFTixCPQAIsZNjTwqPvY8FMuQoHOFXupVbYUtZDMQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0631; 5:lr2W+rKMHZtvn1stdMK4zv6b45V/kre4mdv7Kali72lcPLRJYaiLbvCw5x2/W/9kE8Ov7+UxVz6qvpXMkSAGC4tcnxZOnLQTWEQZPpekoSpcrxMzZSg006QvY7QeyxkT2RNIUfs5Og7LIchodOMl8WeJzwHk0Sy34dOUeso/4bmOU0LrNou30MLLvfeCL43lY/DUsb+9S7NxSNeVRL/zOrj9i21fintUzQP/OK/1YJzoZVXOJa2u9G26PNkThvz9oD6ft1LqA9nIexamr+1XgQsVRuSA3MX/9NVD/mMs5sAmQHg9ldd0m9qpWVXVIpxZ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fKzg26g3Mm1vrWsEv/YaQYuLu2nO3Z7P7EAIOmqVJn4I00389xalYoGaSTHzy6VQgus3yy4PAh12pouLswR/ZaOsbG5z5v+Rw1tWWbBu7S9sqGwOaqYVUwi2q+cb/Z67r5wTZVH0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 12:01:51.9415 (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: BY2PR0301MB0631 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170621_050216_665240_BF13E509 X-CRM114-Status: GOOD ( 14.21 ) 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 Various IMX platforms may have different imx_pmx_ops.gpio_set_direction implementations, so let's make it platform specific callbacks instead of the fixed common one. Currently only VF610 platform implements it. No function level changes. Cc: Stefan Agner Cc: Linus Walleij Cc: Alexandre Courbot Cc: Shawn Guo Signed-off-by: Dong Aisheng Acked-by: Stefan Agner --- ChangeLog: * new patch. --- drivers/pinctrl/freescale/pinctrl-imx.c | 48 +++---------------------------- drivers/pinctrl/freescale/pinctrl-imx.h | 20 +++++++++++++ drivers/pinctrl/freescale/pinctrl-vf610.c | 25 ++++++++++++++++ 3 files changed, 49 insertions(+), 44 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 505fe79..ad23e39 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -35,18 +35,6 @@ #define IMX_NO_PAD_CTL 0x80000000 /* no pin config need */ #define IMX_PAD_SION 0x40000000 /* set SION */ -/** - * @dev: a pointer back to containing device - * @base: the offset to the controller in virtual memory - */ -struct imx_pinctrl { - struct device *dev; - struct pinctrl_dev *pctl; - void __iomem *base; - void __iomem *input_sel_base; - struct imx_pinctrl_soc_info *info; -}; - static inline const struct group_desc *imx_pinctrl_find_group_by_name( struct pinctrl_dev *pctldev, const char *name) @@ -255,42 +243,11 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, return 0; } -static int imx_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; - - /* - * Only Vybrid has the input/output buffer enable flags (IBE/OBE) - * They are part of the shared mux/conf register. - */ - if (!(info->flags & SHARE_MUX_CONF_REG)) - return 0; - - pin_reg = &info->pin_regs[offset]; - if (pin_reg->mux_reg == -1) - return -EINVAL; - - /* IBE always enabled allows us to read the value "on the wire" */ - reg = readl(ipctl->base + pin_reg->mux_reg); - if (input) - reg &= ~0x2; - else - reg |= 0x2; - writel(reg, ipctl->base + pin_reg->mux_reg); - - return 0; -} - -static const struct pinmux_ops imx_pmx_ops = { +struct pinmux_ops imx_pmx_ops = { .get_functions_count = pinmux_generic_get_function_count, .get_function_name = pinmux_generic_get_function_name, .get_function_groups = pinmux_generic_get_function_groups, .set_mux = imx_pmx_set, - .gpio_set_direction = imx_pmx_gpio_set_direction, }; /* decode generic config into raw register values */ @@ -793,6 +750,9 @@ int imx_pinctrl_probe(struct platform_device *pdev, imx_pinctrl_desc->custom_params = info->custom_params; imx_pinctrl_desc->num_custom_params = info->num_custom_params; + /* platform specific callback */ + imx_pmx_ops.gpio_set_direction = info->gpio_set_direction; + mutex_init(&info->mutex); ipctl->info = info; diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 880bba7..5aa22b5 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -16,9 +16,12 @@ #define __DRIVERS_PINCTRL_IMX_H #include +#include struct platform_device; +extern struct pinmux_ops imx_pmx_ops; + /** * struct imx_pin - describes a single i.MX pin * @pin: the pin_id of this pin @@ -76,6 +79,23 @@ struct imx_pinctrl_soc_info { unsigned int num_decodes; void (*fixup)(unsigned long *configs, unsigned int num_configs, u32 *raw_config); + + int (*gpio_set_direction)(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *range, + unsigned offset, + bool input); +}; + +/** + * @dev: a pointer back to containing device + * @base: the offset to the controller in virtual memory + */ +struct imx_pinctrl { + struct device *dev; + struct pinctrl_dev *pctl; + void __iomem *base; + void __iomem *input_sel_base; + struct imx_pinctrl_soc_info *info; }; #define IMX_CFG_PARAMS_DECODE(p, m, o) \ diff --git a/drivers/pinctrl/freescale/pinctrl-vf610.c b/drivers/pinctrl/freescale/pinctrl-vf610.c index 3bd8556..ac18bb6 100644 --- a/drivers/pinctrl/freescale/pinctrl-vf610.c +++ b/drivers/pinctrl/freescale/pinctrl-vf610.c @@ -295,10 +295,35 @@ static const struct pinctrl_pin_desc vf610_pinctrl_pads[] = { IMX_PINCTRL_PIN(VF610_PAD_PTA7), }; +static int vf610_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; + + /* IBE always enabled allows us to read the value "on the wire" */ + reg = readl(ipctl->base + pin_reg->mux_reg); + if (input) + reg &= ~0x2; + else + reg |= 0x2; + writel(reg, ipctl->base + pin_reg->mux_reg); + + return 0; +} + static struct imx_pinctrl_soc_info vf610_pinctrl_info = { .pins = vf610_pinctrl_pads, .npins = ARRAY_SIZE(vf610_pinctrl_pads), .flags = SHARE_MUX_CONF_REG | ZERO_OFFSET_VALID, + .gpio_set_direction = vf610_pmx_gpio_set_direction, .mux_mask = 0x700000, .mux_shift = 20, };