summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume La Roque <glaroque@baylibre.com>2019-05-14 04:26:48 -0400
committerLinus Walleij <linus.walleij@linaro.org>2019-05-23 03:24:46 -0400
commitc08e7e4c8a6f04e01d16117eb4a0077059ec2cd4 (patch)
tree3e1219ca8a1d2acd03daaa2b78afe8bb626e63cd
parent3e75b76f0f17194e0e65694ade6e69fc11593190 (diff)
pinctrl: generic: add new 'drive-strength-microamp' property support
Add drive-strength-microamp property support to allow drive strength in uA Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinconf-generic.c2
-rw-r--r--include/linux/pinctrl/pinconf-generic.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index b4f7f8a458ea..d0cbdb1ad76a 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -39,6 +39,7 @@ static const struct pin_config_item conf_items[] = {
39 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL, false), 39 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL, false),
40 PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL, false), 40 PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL, false),
41 PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA", true), 41 PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA", true),
42 PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH_UA, "output drive strength", "uA", true),
42 PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE, "input debounce", "usec", true), 43 PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE, "input debounce", "usec", true),
43 PCONFDUMP(PIN_CONFIG_INPUT_ENABLE, "input enabled", NULL, false), 44 PCONFDUMP(PIN_CONFIG_INPUT_ENABLE, "input enabled", NULL, false),
44 PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT, "input schmitt trigger", NULL, false), 45 PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT, "input schmitt trigger", NULL, false),
@@ -167,6 +168,7 @@ static const struct pinconf_generic_params dt_params[] = {
167 { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 }, 168 { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 },
168 { "drive-push-pull", PIN_CONFIG_DRIVE_PUSH_PULL, 0 }, 169 { "drive-push-pull", PIN_CONFIG_DRIVE_PUSH_PULL, 0 },
169 { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 }, 170 { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
171 { "drive-strength-microamp", PIN_CONFIG_DRIVE_STRENGTH_UA, 0 },
170 { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 }, 172 { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
171 { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 }, 173 { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 },
172 { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 }, 174 { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 },
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index 6c0680641108..72d06d6a3099 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -55,6 +55,8 @@
55 * push-pull mode, the argument is ignored. 55 * push-pull mode, the argument is ignored.
56 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current 56 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
57 * passed as argument. The argument is in mA. 57 * passed as argument. The argument is in mA.
58 * @PIN_CONFIG_DRIVE_STRENGTH_UA: the pin will sink or source at most the current
59 * passed as argument. The argument is in uA.
58 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, 60 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode,
59 * which means it will wait for signals to settle when reading inputs. The 61 * which means it will wait for signals to settle when reading inputs. The
60 * argument gives the debounce time in usecs. Setting the 62 * argument gives the debounce time in usecs. Setting the
@@ -112,6 +114,7 @@ enum pin_config_param {
112 PIN_CONFIG_DRIVE_OPEN_SOURCE, 114 PIN_CONFIG_DRIVE_OPEN_SOURCE,
113 PIN_CONFIG_DRIVE_PUSH_PULL, 115 PIN_CONFIG_DRIVE_PUSH_PULL,
114 PIN_CONFIG_DRIVE_STRENGTH, 116 PIN_CONFIG_DRIVE_STRENGTH,
117 PIN_CONFIG_DRIVE_STRENGTH_UA,
115 PIN_CONFIG_INPUT_DEBOUNCE, 118 PIN_CONFIG_INPUT_DEBOUNCE,
116 PIN_CONFIG_INPUT_ENABLE, 119 PIN_CONFIG_INPUT_ENABLE,
117 PIN_CONFIG_INPUT_SCHMITT, 120 PIN_CONFIG_INPUT_SCHMITT,