pinconf-generic: add BIAS_BUS_HOLD pinconf
authorJames Hogan <james.hogan@imgtec.com>
Fri, 24 May 2013 16:21:12 +0000 (17:21 +0100)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Nov 2013 04:37:23 +0000 (12:37 +0800)
Add a new PIN_CONFIG_BIAS_BUS_HOLD pin configuration for a bus holder
pin mode (also known as bus keeper, or repeater). This is a weak latch
which drives the last value on a tristate bus. Another device on the bus
can drive the bus high or low before going tristate to change the value
driven by the pin.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinconf-generic.c
include/linux/pinctrl/pinconf-generic.h

index c65291c6aa6bf52fc57f2c92325d3b6c4f33b9f6..c3ce85b0888fb3ab018708a62c6978c252599612 100644 (file)
@@ -38,6 +38,7 @@ struct pin_config_item {
 static struct pin_config_item conf_items[] = {
        PCONFDUMP(PIN_CONFIG_BIAS_DISABLE, "input bias disabled", NULL),
        PCONFDUMP(PIN_CONFIG_BIAS_HIGH_IMPEDANCE, "input bias high impedance", NULL),
+       PCONFDUMP(PIN_CONFIG_BIAS_BUS_HOLD, "input bias bus hold", NULL),
        PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL),
        PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", NULL),
        PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL),
index 6aa238096622441de2125f3a7658fe2777f349a1..ac05b3cfeacc0c0ae7ca4f708385ae01d070616d 100644 (file)
  *     if for example some other pin is going to drive the signal connected
  *     to it for a while. Pins used for input are usually always high
  *     impedance.
+ * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it
+ *     weakly drives the last value on a tristate bus, also known as a "bus
+ *     holder", "bus keeper" or "repeater". This allows another device on the
+ *     bus to change the value by driving the bus high or low and switching to
+ *     tristate. The argument is ignored.
  * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high
  *     impedance to VDD). If the argument is != 0 pull-up is enabled,
  *     if it is 0, pull-up is disabled.
@@ -78,6 +83,7 @@
 enum pin_config_param {
        PIN_CONFIG_BIAS_DISABLE,
        PIN_CONFIG_BIAS_HIGH_IMPEDANCE,
+       PIN_CONFIG_BIAS_BUS_HOLD,
        PIN_CONFIG_BIAS_PULL_UP,
        PIN_CONFIG_BIAS_PULL_DOWN,
        PIN_CONFIG_DRIVE_PUSH_PULL,