From patchwork Wed Oct 31 14:43:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10662821 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 67DA213BF for ; Wed, 31 Oct 2018 14:44:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D2AC294EA for ; Wed, 31 Oct 2018 14:44:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41281295EB; Wed, 31 Oct 2018 14:44:24 +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 B486E294EA for ; Wed, 31 Oct 2018 14:44:23 +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=NnS5cmavCM7i9i JmCH65J5eXBVY4K3gndic1fApWTCGrRGNZjIfpnzsjeCim0Zz58Oru4Pl6cdQF//kbybm2OYY4X9m Gx0P8xHUWJAoHfvVqIpYT9WfmotQxJimuzPHFKHUXfw5zJ0JkbGHWP+lRZVvzQ0RxRXBF9LWgSf5U GYclFhyFo9nakqF+ZgQy1Qzfnd8C/6S0FjIHZsmNDk3ra2a/YaETg87QWpUqQ1AfLJjP8oUnrPaqq D+wCbGxZmZ5P3MhFl8klCyGpmj6eKWDR8UnJu6XJUZd9b6bdrn10HMrqlAUg2SfGvUMc7KA0wHsqL vdlO50rZJqnU9Q8fQEdQ==; 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 1gHrjK-0007aN-2l; Wed, 31 Oct 2018 14:44:22 +0000 Received: from mail-db5eur01on0080.outbound.protection.outlook.com ([104.47.2.80] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHriV-0006MB-VW for linux-arm-kernel@lists.infradead.org; Wed, 31 Oct 2018 14:43:52 +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=SitIk8iOf4e9cf2+dp49uk/5vg4MnXH+7Mgbmhcaha29PJMwzz/BQhbHOzluqhNL7aLgKEXLft5YykWW/ivKT09zoDUfxKL+lTtSlPzPpJcFGPCi0lPaYTVygS9DgFQLZUNlzwJBOfb2QnUrdWAUvKofMQtbBDKxtcraoVd6YNA= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB4514.eurprd04.prod.outlook.com (52.135.148.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.26; Wed, 31 Oct 2018 14:43:18 +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.1273.028; Wed, 31 Oct 2018 14:43:18 +0000 From: "A.s. Dong" To: "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V3 06/10] pinctrl: fsl: imx7ulp: change to use imx legacy binding Thread-Topic: [PATCH V3 06/10] pinctrl: fsl: imx7ulp: change to use imx legacy binding Thread-Index: AQHUcSgQ1qnZvTfx9Eu4wKe/BaSwqg== Date: Wed, 31 Oct 2018 14:43:18 +0000 Message-ID: <1540996688-23681-7-git-send-email-aisheng.dong@nxp.com> References: <1540996688-23681-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1540996688-23681-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: HK0PR03CA0016.apcprd03.prod.outlook.com (2603:1096:203:2e::28) 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; AM0PR04MB4514; 6:uZWX8PWytSR/wlxiYBuDSBlSYa9tfifG5pY0vWg/dGHmru9qp2+y7/rzgtAFVbFIs2HbhVAu1jlQJZRVuw2LXWLgyG254GGpdpo5T1rQ40xdFFe7BHy2p0cCg+Xeqdly6NRaFjE3lekKxKL1NKDrLSkIz1ScJbEG4NrVj7fxPlBkOQ3960Ehv7VU7Ywyk1XbpM427oie8dZ8PPSkTEffpXpur+Ztz+WVdy+1LpgihezuKj1JvvRGJ9qgrnlUm2TPayHPT4schMdBLykxb6qxgnPQkzdKP9QmnwdvYC+fFsfPpGUcnrxaLsSipqZQ7LEzZuA7vz2wJLJJCBBrABvcVA5yheHzF5O6ELUQejgM8hxYjCXHBdTrSJX7sBEZP3egRz3J/lVjAUTol2zH4MUaxQExxzhQvkeAXimLTVujF9S/Wx/CLpy4pGRHjETIvdRKv2ZSFpE3DicTRD8xfjfT3Q==; 5:5sdoxIrQPEN92ZnIJfOEmSfuZU7jW2R3KBQFhYVfb6kS/rAMt6KQduaYQnz7hKR1JSPoTVhJ67JxHBD2Df3LmvB5CX6g4UYsJUOM8UR9hYNZ8lvhUmAwhWHkTR6xxFwn56TkH0Z/JMU/II0xW9DFrrV2S4IbPyqG4l8i0oKgQZo=; 7:X8rKPbkJeAOU6CfQ2YQzjDcOFk9b9gVb6sErrPBAoMVgMHk9dMV3X1jtz3on5Tvzvn61XkpOrwHnjAXNAtJyLIqOQIrrJtcBNzr+0bKbwxXsXkUnn2ZBav1Ciq3sew9+M14jFS5/C3lBdZ15S+s+Pw== x-ms-office365-filtering-correlation-id: 7d50c6b7-e159-4248-2ca9-08d63f3f325d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4514; x-ms-traffictypediagnostic: AM0PR04MB4514: 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)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:AM0PR04MB4514; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4514; x-forefront-prvs: 084285FC5C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(366004)(346002)(396003)(376002)(54534003)(189003)(199004)(11346002)(14444005)(446003)(14454004)(2351001)(476003)(2616005)(305945005)(7736002)(6916009)(486006)(105586002)(106356001)(2900100001)(6486002)(6436002)(256004)(2501003)(97736004)(53936002)(5640700003)(186003)(316002)(6506007)(6512007)(4326008)(54906003)(5250100002)(71190400001)(71200400001)(52116002)(575784001)(86362001)(478600001)(66066001)(99286004)(76176011)(39060400002)(36756003)(3846002)(6116002)(68736007)(25786009)(102836004)(50226002)(2906002)(81166006)(8676002)(5660300001)(386003)(8936002)(26005)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4514; 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: YWKY1pNRQKFAKFrJ74pbz7AFvehO6c/fflXERbxQQ5PowMZxg7gfT3C4Wm3CjMmeaHzWN5ZEhu8GGzjkM49cKC1Ikq8n6dSYXmLzcByEhSOD5uHVmt3wzYXJfpMArnkeR1YGP9+aqzYOWrFRhPTSWS73Xf9LMiD2HXAqjAPbzdI/qsx1/X+ptt+4cb/oEApMtWFDeaP6en97+aU6XSR0bwQn8bB0wdVNpHgaBJyX69X2UdQDy7jDGigDgk/0WmCkLQCraz4qhaXlupEThMbwTR/3kKWxipNcjV2xE7jfYec1B85xWNxVC+9lw5wXZfF7J6S9A40oHy+A3f1+g23xWub7Z3BiaIt8lRtrOd6pj6Y= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d50c6b7-e159-4248-2ca9-08d63f3f325d X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2018 14:43:18.3452 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4514 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181031_074332_599675_EB49D54B X-CRM114-Status: GOOD ( 13.70 ) 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[] = {