From patchwork Fri May 14 16:38:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12258367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59954C433B4 for ; Fri, 14 May 2021 16:40:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDE1661354 for ; Fri, 14 May 2021 16:40:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDE1661354 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=libero.it Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=grGQ5L7E+qCakwdtKpGMFVQiUtpu1lI6X/ZdVCmYUf8=; b=lx9HQtxU90gmR+BEAnz3I8GiRt mZjZioF9YjG8RRRKt9bdXWfwWoH3WZ5EAortwps1o0lnvBEhiRnAyichOfFVEwf2gkpGEjsS+3SpS bagV6cOCABWsqSoPo/VIrAI6PoF53bUwLUsAhDOiY07SRlaLP7mXYGa+6aW3ibNA6THho+8oK3S4d VF7ntzBJE5fpfQNCHatrzDlhcOuXimxjUfO2yn2NizYpFXXNImR5Wfwvu+IJ/+tP0OWO71DBsClhj +c2st4gEc+d+kcKuImfm1fZkQRkMgykVw7GtP71RI8kn+DzgYjrmSpMF7Z7oEOe9sGGSuEIPNXxk4 092scChQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhapj-008WVr-7S; Fri, 14 May 2021 16:38:39 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhaph-008WVP-F5 for linux-arm-kernel@desiato.infradead.org; Fri, 14 May 2021 16:38:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=8nQDG6vC1szipD11G21qDci50418cKRMFqznBJX7giw=; b=DzYMS1HBEgGjZkc6kCD9cxdckX LbmMmHXi4Snxtpu1rNPsADgwN9iEJUsaZ3fwFy6FLiL8BVbmPPWWcbo9o7W4dDCfoBlSVjpOZQO/9 RzNt7E131kTrvbIamSoL1v4O8GGx4GimVTs2y30BboExIgkTU2ps2bhrqqPFaXaVMdQsje0iAcrdT 9FqU4Y9bgQEw/ly/G9UVTahuyrCl6l+w55pePJL5+yEpqDXv8VAHY0odkXeCmDGs2RE24xUjXi50j rENab/aa/bEWWD8lh8/vjfxDi6Wh9mnYbnIclKfO47jADCELNxUrbP9GpTsyJR1rvQpuf2uNFZT6l iA08X2xA==; Received: from smtp-35.italiaonline.it ([213.209.10.35] helo=libero.it) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhape-00C7kz-PJ for linux-arm-kernel@lists.infradead.org; Fri, 14 May 2021 16:38:36 +0000 Received: from passgat-Modern-14-A10M.homenet.telecomitalia.it ([95.244.94.151]) by smtp-35.iol.local with ESMTPA id hapRlnFGlpK9whapVlGQyv; Fri, 14 May 2021 18:38:28 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1621010308; bh=8nQDG6vC1szipD11G21qDci50418cKRMFqznBJX7giw=; h=From; b=ykxeE09f2pnfajedVkeEknAh+2ERHKba9xIcIYS09mHLPCrYNstMnRz/AXrKg98iZ 6/6y3djlwQ17+0A5xbtNznFYdx/oUQX991f1IPH2suI7aU88khKIBOPmXTIMWRKJLm 9uqjyIGHLwo+eVwFR6bWQ0fZUn9PtYjj4y3Hm1a/yORjb1xN9e3N+hP8oTgjOzAQ0Y qHswCPwpGQPQ2QLeFaRL0dr5QJ0l5vAnxmKc5WmU7JpTIyUigZZ1+bUdEXRGMK50eU 4ExODJgYZ9ghVsxS49GB34IK95gSbXxMpqP4xPmIAchRKJ/b/6sikU4ZCL5XQVk9tA UUe7bmiFhHMlw== X-CNFS-Analysis: v=2.4 cv=A9ipg4aG c=1 sm=1 tr=0 ts=609ea784 cx=a_exe a=ugxisoNCKEotYwafST++Mw==:117 a=ugxisoNCKEotYwafST++Mw==:17 a=KfjgPZeWCF2tvFJtEhQA:9 From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Dario Binacchi , Haojian Zhuang , Linus Walleij , Tony Lindgren , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH] pinctrl: single: config: enable the pin's input Date: Fri, 14 May 2021 18:38:18 +0200 Message-Id: <20210514163818.12178-1-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4xfJOb6TVjy4+GHqUGueOCUInhWSrMa1UIYRCaQkM6RJIgqh0evmhrQiliElV71tOev98m2PJgBz7IJ2r+fPWZ3yLh2Q0eUZP1Rbeu3MRw1ZyOuO1XfXGi LFEt4kryXhnVWVxrq8Ykh52Xd2zIoTGrhNpgcr/TYbVP58SbV7weAefcv5O/e3ZJVQg2wF4wfkdL1JxvwlJYQLJAtrFC0cXeqfZ+YhW0CsOB7Xv+NVb6w3RV fGm5LgDCd/sP13goFzGVSLcV8ZPoQF3EfRr33LDEeanALIuJNEHwfUc5ftC+3we0uWFfEPZSWwGnDTK5FiF7nRp7R/amNyC+uw+r11w1+ZUMnr22LHluzIvl wAKXzUfwxEUlP2Gl1Nv9kXvjR1XgQGhu9iga8syZni7VJfcPfZzqnZfU1fJk02zLIBuTBT23x9x3eI+Z1Fe+G0dcZwu6ZZN8cQzr9Ab4CefbUJE6o3jxCsmm 3zM8Dyd9R4eexHMJJnMT9MJKJ0KG5jEXatCtrg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_093834_991435_85256AFB X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It enables / disables the input buffer. As explained in the description of 'enum pin_config_param' this does not affect the pin's ability to drive output. Signed-off-by: Dario Binacchi --- drivers/pinctrl/pinctrl-single.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 2c9c9835f375..4e7cdb9ee855 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -534,6 +534,7 @@ static int pcs_pinconf_get(struct pinctrl_dev *pctldev, case PIN_CONFIG_DRIVE_STRENGTH: case PIN_CONFIG_SLEW_RATE: case PIN_CONFIG_MODE_LOW_POWER: + case PIN_CONFIG_INPUT_ENABLE: default: *config = data; break; @@ -572,6 +573,7 @@ static int pcs_pinconf_set(struct pinctrl_dev *pctldev, case PIN_CONFIG_DRIVE_STRENGTH: case PIN_CONFIG_SLEW_RATE: case PIN_CONFIG_MODE_LOW_POWER: + case PIN_CONFIG_INPUT_ENABLE: shift = ffs(func->conf[i].mask) - 1; data &= ~func->conf[i].mask; data |= (arg << shift) & func->conf[i].mask; @@ -918,6 +920,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np, static const struct pcs_conf_type prop2[] = { { "pinctrl-single,drive-strength", PIN_CONFIG_DRIVE_STRENGTH, }, { "pinctrl-single,slew-rate", PIN_CONFIG_SLEW_RATE, }, + { "pinctrl-single,input-enable", PIN_CONFIG_INPUT_ENABLE, }, { "pinctrl-single,input-schmitt", PIN_CONFIG_INPUT_SCHMITT, }, { "pinctrl-single,low-power-mode", PIN_CONFIG_MODE_LOW_POWER, }, };