summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Binacchi <dariobin@libero.it>2021-06-02 17:04:20 +0200
committerLinus Walleij <linus.walleij@linaro.org>2021-06-07 09:02:27 +0200
commit8c987eb15aa6e397e2dba63246c4d8785f5c9f41 (patch)
tree745516e9af9f26d3ef693ed10458783e794ce398
parentpinctrl: mtk: Fix mt8365 Kconfig dependency (diff)
downloadlinux-8c987eb15aa6e397e2dba63246c4d8785f5c9f41.tar.xz
linux-8c987eb15aa6e397e2dba63246c4d8785f5c9f41.zip
pinctrl: single: config: enable the pin's input
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> Acked-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210602150420.18202-1-dariobin@libero.it Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-single.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 7834d5d23224..e3aa64798f7d 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, },
};