diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-06-16 06:43:06 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-06-17 12:18:32 -0400 |
commit | 5ca3353bcee929c3b7bbf39f79038842f443f01a (patch) | |
tree | b9ca8539bef9bf05e6a170e25f5b243c49201d96 /include/linux/pinctrl | |
parent | 6abab2d4bec982bcefbe99201ddee5f25227daf4 (diff) |
pinctrl: establish pull-up/pull-down terminology
It is counter-intuitive to have "0" mean disable in a boolean
manner for electronic properties of pins such as pull-up and
pull-down. Therefore, define that a pull-up/pull-down argument
of 0 to such a generic option means that the pin is
short-circuited to VDD or GROUND. Pull disablement shall be
done using PIN_CONFIG_BIAS_DISABLE.
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by Heiko Stuebner <heiko@sntech.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl')
-rw-r--r-- | include/linux/pinctrl/pinconf-generic.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index d414a7729424..10ad996afee4 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
@@ -36,14 +36,15 @@ | |||
36 | * tristate. The argument is ignored. | 36 | * tristate. The argument is ignored. |
37 | * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high | 37 | * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high |
38 | * impedance to VDD). If the argument is != 0 pull-up is enabled, | 38 | * impedance to VDD). If the argument is != 0 pull-up is enabled, |
39 | * if it is 0, pull-up is disabled. | 39 | * if it is 0, pull-up is total, i.e. the pin is connected to VDD. |
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 total, i.e. the pin is connected to GROUND. |
43 | * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based | 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. | 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, | 45 | * If the argument is != 0 pull up/down is enabled, if it is 0, the |
46 | * the pull is disabled. | 46 | * configuration is ignored. The proper way to disable it is to use |
47 | * @PIN_CONFIG_BIAS_DISABLE. | ||
47 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | 48 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and |
48 | * low, this is the most typical case and is typically achieved with two | 49 | * low, this is the most typical case and is typically achieved with two |
49 | * active transistors on the output. Setting this config will enable | 50 | * active transistors on the output. Setting this config will enable |
@@ -72,8 +73,8 @@ | |||
72 | * supplies, the argument to this parameter (on a custom format) tells | 73 | * supplies, the argument to this parameter (on a custom format) tells |
73 | * the driver which alternative power source to use. | 74 | * the driver which alternative power source to use. |
74 | * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to | 75 | * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to |
75 | * this parameter (on a custom format) tells the driver which alternative | 76 | * this parameter (on a custom format) tells the driver which alternative |
76 | * slew rate to use. | 77 | * slew rate to use. |
77 | * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power | 78 | * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power |
78 | * operation, if several modes of operation are supported these can be | 79 | * operation, if several modes of operation are supported these can be |
79 | * passed in the argument on a custom form, else just use argument 1 | 80 | * passed in the argument on a custom form, else just use argument 1 |