From patchwork Fri Nov 2 09:13:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10665205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0476815E9 for ; Fri, 2 Nov 2018 09:28:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBDCC2B13D for ; Fri, 2 Nov 2018 09:28:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDF722B23E; Fri, 2 Nov 2018 09:28:29 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 70D822B13D for ; Fri, 2 Nov 2018 09:28:29 +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:In-Reply-To:References: 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=RydqIJ7n4c5RfH+dH94ShpMXN+UTVP4/VX7mV7Obn3k=; b=I6QBBCxC6piO3q qRVLCn6CozF3dvpfNWEg3pQn/avXT75aaEAxgb7gnot5YT75Se/iu4vUmtBReHBHZsuBSa8wR2fKj 9bIIMDPdH8LXu4QnkQyQhHPFKuIW9IG2kSLD/4cZkW5YWSaHwKCLJ+Ukcy9ncc/e6S4hVu8dgaU59 sTadZOwMQi4yh5gOR7eb+JHWztiD5c4Mar8gbn00cmluPi6dxqJjpec2roMCYrE81vfW8qYtcP/Fk 2orPWMg584rBWMbFK72R/anwq3Q12JKQki8mS0fXNMd6FTlThkr1zbMgafmfIq2inGEjBgTygEuOl Z/GNt110+ZRolIjnvgRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIVkh-0004lD-S2; Fri, 02 Nov 2018 09:28:27 +0000 Received: from mail-db5eur03on0618.outbound.protection.outlook.com ([2a01:111:f400:fe0a::618] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIVVu-0005Uz-JE for linux-arm-kernel@lists.infradead.org; Fri, 02 Nov 2018 09:13:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9X6/X03Ex3BQZ42X04EnOUypDBGiD3iMPgyT/ZtVm18=; b=Dpdv6PhhcJX++9pn0qY/rVKmlRwwoJNSQetYjAVziy+zjfCXiapruYrPdeVoSJlDqPT0DxJ0yWd1L0Eu/Ab9m4VMBFVPw1IW6542QSBGzAzbiEbS4X3aWGiP9js/xTF+s0YweyIkOT1WtRMl0aReoRSk9pqk8UktC/zIlZDeYEE= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB4113.eurprd04.prod.outlook.com (52.134.125.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 2 Nov 2018 09:13:03 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::797a:f972:9281:6d10]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::797a:f972:9281:6d10%2]) with mapi id 15.20.1294.024; Fri, 2 Nov 2018 09:13:03 +0000 From: "A.s. Dong" To: "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V4 06/10] pinctrl: fsl: imx7ulp: change to use imx legacy binding Thread-Topic: [PATCH V4 06/10] pinctrl: fsl: imx7ulp: change to use imx legacy binding Thread-Index: AQHUcoxCtT3HMSMu70a5tkE8AtPEAg== Date: Fri, 2 Nov 2018 09:13:03 +0000 Message-ID: <1541149669-10857-7-git-send-email-aisheng.dong@nxp.com> References: <1541149669-10857-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1541149669-10857-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0024.apcprd04.prod.outlook.com (2603:1096:203:36::36) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:66::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR04MB4113; 6:W4pi12YwzS1Z75IL8lSuXkEubotvx0qNaZL7ZaB2CEZ9ZVUHQsxNWibXmMDKItYbIv2iThtlgG3OVMZOlU12Q0wU0dgd+2R36ap/6fce46yx06A3LKY9L/s8kXOn8YBqJGOmLnatpq6M5ibaVfLuyPpRwYmv2M3f5110TD5AqZsuPI9mYRVpo3f7ReAn5u7kZaXK7DQCBFEpmrkkk2xqKCRTuVw9xmk3eViU9EhrI7GuTTvLz51wvGiHMiwYBPYUnWF9zo8xZqSZPcVv1apFcbIDF6tJS+ginlGAbiZBtU/zKsMq4+BXoz44y8n1Tf8VJYt3C5jVsasBxRb1PM43DaCd2me4247/BJxzPFGYju5e+WKxW4xnW0HUl74gvTlyvjsJ+riEHCENBrI9CusJmpGAoiApkiUftJD/uqwbzJdltWnZBX8Hwf88q2CMWfgsrJs89Jj88BaNCb6crCw/kQ==; 5:PA2QemPzjXNmmt/g3n4KHLchYRSUmskLz0zlmzC47fXIx4LSad2i8aCuYGmp0FlCKggYej424HZNIwZ14YrSTB7zh1sRaYnAGKXgAMIeEqQYTMR3O+2+WYImQk4KrEh/apJ9SD7L37ta/JVke7X38Didlq7vdUyBxz7aFO8Jbag=; 7:4ubtghIRPxSeonQe6EFgtmFczb29lSbTKRLO+0D/fg6AtIdpBW1M+LlZ49QiojjIGIGhSfWfhBiU+9+C/7+DCYfNZPwvOasfIJmguza+s8SSqW2t5p6LQbEvmtmBtNlihXeDc6cbgGxJtJL1rRYbHA== x-ms-office365-filtering-correlation-id: d2248e20-dcaa-4872-39bc-08d640a36480 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4113; x-ms-traffictypediagnostic: AM0PR04MB4113: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:AM0PR04MB4113; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4113; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(366004)(376002)(396003)(189003)(199004)(54534003)(8676002)(53936002)(11346002)(446003)(68736007)(86362001)(575784001)(14444005)(99286004)(81156014)(256004)(81166006)(6436002)(106356001)(2351001)(186003)(5640700003)(2906002)(7736002)(386003)(6506007)(6116002)(102836004)(478600001)(3846002)(305945005)(6486002)(76176011)(52116002)(6512007)(4326008)(6916009)(66066001)(105586002)(2900100001)(36756003)(26005)(25786009)(71190400001)(50226002)(5660300001)(316002)(97736004)(54906003)(2501003)(14454004)(8936002)(486006)(71200400001)(39060400002)(2616005)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4113; H:AM0PR04MB4211.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: cCnv9zU+8eImBDoD/CAsr6znwAx/kQigzDdVAqAqfuXxCcT1Nq3kQZI00oEE9IdqNeSEWDGQzqvYf9l23LmTk5CUkorN+7jupk7XBk3BOAKcr6p43TIGtqwsp/q0CoKnA+FhaRhnKc63HDbtUJX8jUmwtcw83tMdgKMQEI1/1loShDxmsqUvhJ1S7Bp32+ZONoIlYRoQWVuBeBCPhbZHwJhkAd7RsNDp/LBhqzmNkYnA4/vqSbKvmNX/pkNANWrnCacdBqduY9H4W1jaHL2V6bq5G+w2FR/+55NEw9eAL1UeN9LAedSsPpLJVjN1QOpqjh+LoQyK1KmO9TJkusDcd1eTISD6dFTTk/81KupbDbo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2248e20-dcaa-4872-39bc-08d640a36480 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 09:13:03.2267 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4113 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181102_021311_103021_E8C53CF7 X-CRM114-Status: GOOD ( 14.08 ) 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: "A.s. Dong" , "dongas86@gmail.com" , Linus Walleij , "linux@armlinux.org.uk" , Stefan Agner , "linux-gpio@vger.kernel.org" , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , Fabio Estevam , "shawnguo@kernel.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 We already had an earlier conclusion that all new i.MX Socs will keep using the legacy i.MX Pinctrl bindings instead of generic pin config. However, MX7ULP generic pin config binding support has already been in tree before that time. Per SoC maintainers' suggestions, in order to get a better consistency for all i.MX devices, we'd like to go back to imx legacy binding for MX7ULP as well. Cc: Linus Walleij Cc: Shawn Guo Cc: Stefan Agner Cc: Sascha Hauer Cc: Fabio Estevam Cc: linux-gpio@vger.kernel.org Signed-off-by: Dong Aisheng --- ChangeLog: v3: new patch --- drivers/pinctrl/freescale/pinctrl-imx7ulp.c | 42 ----------------------------- 1 file changed, 42 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx7ulp.c b/drivers/pinctrl/freescale/pinctrl-imx7ulp.c index f521bdb..922ff73 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx7ulp.c +++ b/drivers/pinctrl/freescale/pinctrl-imx7ulp.c @@ -256,46 +256,8 @@ static const struct pinctrl_pin_desc imx7ulp_pinctrl_pads[] = { #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 -#define BM_PULL_ENABLED BIT(1) - -static const struct imx_cfg_params_decode imx7ulp_cfg_decodes[] = { - IMX_CFG_PARAMS_DECODE(PIN_CONFIG_DRIVE_STRENGTH, BIT(6), 6), - IMX_CFG_PARAMS_DECODE(PIN_CONFIG_DRIVE_PUSH_PULL, BIT(5), 5), - IMX_CFG_PARAMS_DECODE(PIN_CONFIG_SLEW_RATE, BIT(2), 2), - IMX_CFG_PARAMS_DECODE(PIN_CONFIG_BIAS_DISABLE, BIT(1), 1), - IMX_CFG_PARAMS_DECODE(PIN_CONFIG_BIAS_PULL_UP, BIT(0), 0), - - IMX_CFG_PARAMS_DECODE_INVERT(PIN_CONFIG_DRIVE_OPEN_DRAIN, BIT(5), 5), - IMX_CFG_PARAMS_DECODE_INVERT(PIN_CONFIG_BIAS_PULL_DOWN, BIT(0), 0), -}; - -static void imx7ulp_cfg_params_fixup(unsigned long *configs, - unsigned int num_configs, - u32 *raw_config) -{ - enum pin_config_param param; - u32 param_val; - int i; - - /* lock field disabled */ - *raw_config &= ~BM_LK_ENABLED; - - for (i = 0; i < num_configs; i++) { - param = pinconf_to_config_param(configs[i]); - param_val = pinconf_to_config_argument(configs[i]); - - if ((param == PIN_CONFIG_BIAS_PULL_UP) || - (param == PIN_CONFIG_BIAS_PULL_DOWN)) { - /* pull enabled */ - *raw_config |= BM_PULL_ENABLED; - - return; - } - } -} static int imx7ulp_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, @@ -326,10 +288,6 @@ static const struct imx_pinctrl_soc_info imx7ulp_pinctrl_info = { .gpio_set_direction = imx7ulp_pmx_gpio_set_direction, .mux_mask = BM_MUX_MODE, .mux_shift = BP_MUX_MODE, - .generic_pinconf = true, - .decodes = imx7ulp_cfg_decodes, - .num_decodes = ARRAY_SIZE(imx7ulp_cfg_decodes), - .fixup = imx7ulp_cfg_params_fixup, }; static const struct of_device_id imx7ulp_pinctrl_of_match[] = {