All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dario Binacchi <dariobin@libero.it>
Cc: linux-kernel@vger.kernel.org,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	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
Date: Tue, 18 May 2021 09:08:16 +0300	[thread overview]
Message-ID: <YKNZ0A7umnk4LwKU@atomide.com> (raw)
In-Reply-To: <20210514163818.12178-1-dariobin@libero.it>

* Dario Binacchi <dariobin@libero.it> [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 <dariobin@libero.it>
> ---
> 
>  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

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Dario Binacchi <dariobin@libero.it>
Cc: linux-kernel@vger.kernel.org,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	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
Date: Tue, 18 May 2021 09:08:16 +0300	[thread overview]
Message-ID: <YKNZ0A7umnk4LwKU@atomide.com> (raw)
In-Reply-To: <20210514163818.12178-1-dariobin@libero.it>

* Dario Binacchi <dariobin@libero.it> [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 <dariobin@libero.it>
> ---
> 
>  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

  reply	other threads:[~2021-05-18  6:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 16:38 [PATCH] pinctrl: single: config: enable the pin's input Dario Binacchi
2021-05-14 16:38 ` Dario Binacchi
2021-05-18  6:08 ` Tony Lindgren [this message]
2021-05-18  6:08   ` Tony Lindgren
2021-05-18  9:01   ` Dario Binacchi
2021-05-18  9:01     ` Dario Binacchi
2021-05-18 20:19   ` Dario Binacchi
2021-05-18 20:19     ` Dario Binacchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKNZ0A7umnk4LwKU@atomide.com \
    --to=tony@atomide.com \
    --cc=dariobin@libero.it \
    --cc=haojian.zhuang@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.