aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2013-06-06 10:44:25 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-06-16 05:56:51 -0400
commit7970cb770dffa23cb20a36f46602e688e075f5d9 (patch)
tree4a375606b2664a493719a636d06b1ca13dc4328e
parent78bafc66180d42f972b443b0b573a1b6ff9aa522 (diff)
pinctrl: add pinconf-generic define for a pin-default pull
There exist controllers that don't support to set the pull to up or down separately but instead automatically set the pull direction based on embedded knowledge inside the controller, for example depending on the selected mux function of the pin. Therefore this patch adds another config option to use this default pull-state for a pin where it is not possible to know or decide if the pin will be pulled up or down. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Stephen Warren <swarren@nvidia.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.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index ba465b3e85ef..9a6812b50a32 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -40,6 +40,8 @@ static struct pin_config_item conf_items[] = {
40 PCONFDUMP(PIN_CONFIG_BIAS_BUS_HOLD, "input bias bus hold", NULL), 40 PCONFDUMP(PIN_CONFIG_BIAS_BUS_HOLD, "input bias bus hold", NULL),
41 PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL), 41 PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL),
42 PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", NULL), 42 PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", NULL),
43 PCONFDUMP(PIN_CONFIG_BIAS_PULL_PIN_DEFAULT,
44 "input bias pull to pin specific state", NULL),
43 PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL), 45 PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL),
44 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL), 46 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL),
45 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL), 47 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL),
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index ac05b3cfeacc..d414a7729424 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -40,6 +40,10 @@
40 * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high 40 * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high
41 * impedance to GROUND). If the argument is != 0 pull-down is enabled, 41 * impedance to GROUND). If the argument is != 0 pull-down is enabled,
42 * if it is 0, pull-down is disabled. 42 * if it is 0, pull-down is disabled.
43 * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based
44 * on embedded knowledge of the controller, like current mux function.
45 * If the argument is != 0 pull up/down is enabled, if it is 0,
46 * the pull is disabled.
43 * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and 47 * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and
44 * low, this is the most typical case and is typically achieved with two 48 * low, this is the most typical case and is typically achieved with two
45 * active transistors on the output. Setting this config will enable 49 * active transistors on the output. Setting this config will enable
@@ -86,6 +90,7 @@ enum pin_config_param {
86 PIN_CONFIG_BIAS_BUS_HOLD, 90 PIN_CONFIG_BIAS_BUS_HOLD,
87 PIN_CONFIG_BIAS_PULL_UP, 91 PIN_CONFIG_BIAS_PULL_UP,
88 PIN_CONFIG_BIAS_PULL_DOWN, 92 PIN_CONFIG_BIAS_PULL_DOWN,
93 PIN_CONFIG_BIAS_PULL_PIN_DEFAULT,
89 PIN_CONFIG_DRIVE_PUSH_PULL, 94 PIN_CONFIG_DRIVE_PUSH_PULL,
90 PIN_CONFIG_DRIVE_OPEN_DRAIN, 95 PIN_CONFIG_DRIVE_OPEN_DRAIN,
91 PIN_CONFIG_DRIVE_OPEN_SOURCE, 96 PIN_CONFIG_DRIVE_OPEN_SOURCE,