diff mbox series

[RESEND] pinctrl: single: config: enable the pin's input

Message ID 20210602150420.18202-1-dariobin@libero.it
State New
Headers show
Series [RESEND] pinctrl: single: config: enable the pin's input | expand

Commit Message

Dario Binacchi June 2, 2021, 3:04 p.m. UTC
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(+)

Comments

Tony Lindgren June 4, 2021, 8:07 a.m. UTC | #1
* Dario Binacchi <dariobin@libero.it> [210602 15:04]:
> 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.


Looks OK to me:

Acked-by: Tony Lindgren <tony@atomide.com>
Linus Walleij June 7, 2021, 7:02 a.m. UTC | #2
On Wed, Jun 2, 2021 at 5:04 PM Dario Binacchi <dariobin@libero.it> wrote:

> 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>


Patch applied!

Yours,
Linus Walleij
diff mbox series

Patch

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, },
 	};