From mboxrd@z Thu Jan 1 00:00:00 1970 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, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 92E66C433B4 for ; Tue, 18 May 2021 06:08:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C5CB61059 for ; Tue, 18 May 2021 06:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344580AbhERGJi (ORCPT ); Tue, 18 May 2021 02:09:38 -0400 Received: from muru.com ([72.249.23.125]:56942 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343548AbhERGJi (ORCPT ); Tue, 18 May 2021 02:09:38 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id E2B6C80BA; Tue, 18 May 2021 06:08:23 +0000 (UTC) Date: Tue, 18 May 2021 09:08:16 +0300 From: Tony Lindgren To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, Haojian Zhuang , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] pinctrl: single: config: enable the pin's input Message-ID: References: <20210514163818.12178-1-dariobin@libero.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210514163818.12178-1-dariobin@libero.it> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org * Dario Binacchi [210514 16:38]: > 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, }, > }; Looks OK to me if this works for Linus W. You need another patch to update the binding though: Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml Or if there is such a patch floating around, I was not in Cc :) Regards, Tony From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 02734C433ED for ; Tue, 18 May 2021 06:09:52 +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 BF32461184 for ; Tue, 18 May 2021 06:09:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF32461184 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com 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:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JxOMAteqUFFOcBadafkXyGvThSTW9XUHI5gGtOZsqDk=; b=pLe4gutgT7DonEJzkvm1VBxCd JLRN9T6zB2wcAwqAgG7U8ATnzjb9nMyc0dMUGp4XBeByr/OvirKmyLqekiEI3FP4Tzo/ClY28XkoF rBI7gJpvzr2WtRDaUq/GnFp5hnywmoYm2CjCDRocDNkZEKpOrak6zbsv4DuTXAxd3ZvPmnYxxRmco ySuMw1+rkOEHK6t+itWK6WI2ZrIXwFF1SvX6UQd9y2E3K/t9L+NrgWiAlgjQ2aP4o5uCZ/maoVlJj 48nKSsJEhSC7Z4Uz4XAFtCgyARVzjJQDoe1IXNKTygKlexHmwuO2D+y387N8truQSwkH/SQIAPLu7 xGevun4vg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lisu2-00H8Aq-RG; Tue, 18 May 2021 06:08:27 +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 1listz-00H8AR-Hv for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 06:08:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yxXW1PPVBFVQPslRlat4/Y/P5atWz9r0j2J803gE6q0=; b=djoTaGvtSxqAnA3B1byMhcT8rB RB2t4Ep1ruG3HKl1ByjnmIG6LAftXpRcfyY/W5rDF7vj/RFQ+icp6fSAFuyppgg2gCcIM7wHj+NNt mgoR5zHXlXMms3saSfdhtllr/OiDkkM28YeJOv25CIS6tbBEOlelupDQ5tfrufYgpSpha0xUA+nIk L4Q/UBNc8dL7nBM5Pz61lEEWnpKmDnRy2PPfilF6cp4WKGVvERO1hmaLU1KhlsBYE9MfP7Gas0cXv VuUlMJLqVBCSsfI+MzZawkiRhDuClKeKTm8ZGvl0H2MMFQmeYU57bi9tjDhfjraaUNz8tlnURtnYx 2OjGY4JA==; Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1listw-00ELKK-Q2 for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 06:08:22 +0000 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id E2B6C80BA; Tue, 18 May 2021 06:08:23 +0000 (UTC) Date: Tue, 18 May 2021 09:08:16 +0300 From: Tony Lindgren To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, Haojian Zhuang , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] pinctrl: single: config: enable the pin's input Message-ID: References: <20210514163818.12178-1-dariobin@libero.it> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210514163818.12178-1-dariobin@libero.it> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_230820_905716_729C67E0 X-CRM114-Status: GOOD ( 17.12 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Dario Binacchi [210514 16:38]: > 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, }, > }; Looks OK to me if this works for Linus W. You need another patch to update the binding though: Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml Or if there is such a patch floating around, I was not in Cc :) Regards, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel