From patchwork Thu Sep 8 01:48:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 9320281 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 7BA36601C0 for ; Thu, 8 Sep 2016 01:53:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6680D294C8 for ; Thu, 8 Sep 2016 01:53:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56B22294CF; Thu, 8 Sep 2016 01:53:12 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id DC368294C8 for ; Thu, 8 Sep 2016 01:53:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhoV1-0007az-Tm; Thu, 08 Sep 2016 01:51:31 +0000 Received: from relay1.mentorg.com ([192.94.38.131]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhoSW-0004GI-MC for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2016 01:49:04 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1bhoSA-0003ze-3f from Vladimir_Zapolskiy@mentor.com ; Wed, 07 Sep 2016 18:48:34 -0700 Received: from eyas.local (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 8 Sep 2016 02:48:32 +0100 From: Vladimir Zapolskiy To: Linus Walleij , Shawn Guo , Sascha Hauer , Fabio Estevam , Philipp Zabel Subject: [PATCH v2 1/3] pinctrl: imx: accept gpio request/free from pinctrl Date: Thu, 8 Sep 2016 04:48:14 +0300 Message-ID: <1473299296-22458-2-git-send-email-vladimir_zapolskiy@mentor.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1473299296-22458-1-git-send-email-vladimir_zapolskiy@mentor.com> References: <1473299296-22458-1-git-send-email-vladimir_zapolskiy@mentor.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.76] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160907_184857_090661_A78A15A0 X-CRM114-Status: GOOD ( 10.24 ) 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: linux-gpio@vger.kernel.org, Deepak Das , 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 While only Freescale Vybrid SoC has settings of GPIO capabilities done by iomux controller, it is only a matter of GPIO controller driver implementation for the rest of Freescale/NXP SoCs from iMX series. As a practical example on GPIO request a pad function should be switched to GPIO, but because this requires updates to all particular iMX pinctrl drivers, for simplicity at the moment add only a proper connection between shared pinctrl-imx and pinctrl/pinmux core, namely .gpio_request_enable/.gpio_disable_free/.gpio_set_direction callbacks should return success to a caller. This change allows to progress by adding request/free callbacks into gpio-mxc.c driver. Signed-off-by: Vladimir Zapolskiy --- Changes from v1 to v2: * none drivers/pinctrl/freescale/pinctrl-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 71391757938b..6e248ca10169 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -315,7 +315,7 @@ static int imx_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, /* Currently implementation only for shared mux/conf register */ if (!(info->flags & SHARE_MUX_CONF_REG)) - return -EINVAL; + return 0; pin_reg = &info->pin_regs[offset]; if (pin_reg->mux_reg == -1) @@ -380,7 +380,7 @@ static int imx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, * They are part of the shared mux/conf register. */ if (!(info->flags & SHARE_MUX_CONF_REG)) - return -EINVAL; + return 0; pin_reg = &info->pin_regs[offset]; if (pin_reg->mux_reg == -1)