OSDN Git Service

pinctrl: establish pull-up/pull-down terminology
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 16 Jun 2013 10:43:06 +0000 (12:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 17 Jun 2013 16:18:32 +0000 (18:18 +0200)
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>
include/linux/pinctrl/pinconf-generic.h

index d414a77..10ad996 100644 (file)
  *     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.
+ *     if it is 0, pull-up is total, i.e. the pin is connected to VDD.
  * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high
  *     impedance to GROUND). If the argument is != 0 pull-down is enabled,
- *     if it is 0, pull-down is disabled.
+ *     if it is 0, pull-down is total, i.e. the pin is connected to GROUND.
  * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based
  *     on embedded knowledge of the controller, like current mux function.
- *     If the argument is != 0 pull up/down is enabled, if it is 0,
- *     the pull is disabled.
+ *     If the argument is != 0 pull up/down is enabled, if it is 0, the
+ *     configuration is ignored. The proper way to disable it is to use
+ *     @PIN_CONFIG_BIAS_DISABLE.
  * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and
  *     low, this is the most typical case and is typically achieved with two
  *     active transistors on the output. Setting this config will enable
@@ -72,8 +73,8 @@
  *     supplies, the argument to this parameter (on a custom format) tells
  *     the driver which alternative power source to use.
  * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to
- *     this parameter (on a custom format) tells the driver which alternative
- *     slew rate to use.
+ *     this parameter (on a custom format) tells the driver which alternative
+ *     slew rate to use.
  * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power
  *     operation, if several modes of operation are supported these can be
  *     passed in the argument on a custom form, else just use argument 1