pinctrl: clarify some dt pinconfig options
authorHeiko Stübner <heiko@sntech.de>
Fri, 14 Jun 2013 15:42:49 +0000 (17:42 +0200)
committerMark Brown <broonie@linaro.org>
Fri, 4 Apr 2014 15:20:25 +0000 (16:20 +0100)
The bias-pull-* options use values > 0 to indicate that the pull should
be activated and optionally also indicate the strength of the pull.
Therefore use an default value of 1 for these options.

Split the low-power-mode option into low-power-enable and -disable.

Update the documentation to describe the param arguments better.

Reported-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 9ee1f7d266aa1e2bfeb20cb5d4ac299c8e8ef8c7)
Signed-off-by: Mark Brown <broonie@linaro.org>
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
drivers/pinctrl/pinconf-generic.c

index ef7cd572214c2a7c578dc9fdc22a20e5a846aae5..2d730e3dd496c432d5a3e46bc372be76f26270d2 100644 (file)
@@ -158,9 +158,29 @@ input-schmitt              - run in schmitt-trigger mode with hysteresis X
 input-debounce         - debounce mode with debound time X
 power-source           - select power source X
 slew-rate              - use slew-rate X
-low-power-mode         - low power mode
+low-power-enable       - enable low power mode
+low-power-disable      - disable low power mode
 output-low             - set the pin to output mode with low level
 output-high            - set the pin to output mode with high level
 
+Arguments for parameters:
+
+- bias-pull-up, -down and -pin-default take as optional argument 0 to disable
+  the pull, on hardware supporting it the pull strength in Ohm. bias-disable
+  will also disable any active pull.
+
+- drive-strength takes as argument the target strength in mA.
+
+- input-schmitt takes as argument the adjustable hysteresis in a
+  driver-specific format
+
+- input-debounce takes the debounce time as argument or 0 to disable debouncing
+
+- power-source argument is the custom value describing the source to select
+
+- slew-rate takes as argument the target rate in a driver-specific format
+
+All parameters not listed here, do not take an argument.
+
 More in-depth documentation on these parameters can be found in
 <include/linux/pinctrl/pinconfig-generic.h>
index d3c693c0c25043a2d267fa762703c715085bbeca..dcf03714de90552883cbcdaf2534200d46c0f3ba 100644 (file)
@@ -152,9 +152,9 @@ static struct pinconf_generic_dt_params dt_params[] = {
        { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
        { "bias-high-impedance", PIN_CONFIG_BIAS_HIGH_IMPEDANCE, 0 },
        { "bias-bus-hold", PIN_CONFIG_BIAS_BUS_HOLD, 0 },
-       { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 0 },
-       { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 0 },
-       { "bias-pull-pin-default", PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, 0 },
+       { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
+       { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
+       { "bias-pull-pin-default", PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, 1 },
        { "drive-push-pull", PIN_CONFIG_DRIVE_PUSH_PULL, 0 },
        { "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 },
        { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 },
@@ -165,7 +165,8 @@ static struct pinconf_generic_dt_params dt_params[] = {
        { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
        { "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
        { "slew-rate", PIN_CONFIG_SLEW_RATE, 0 },
-       { "low-power-mode", PIN_CONFIG_LOW_POWER_MODE, 0 },
+       { "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },
+       { "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
        { "output-low", PIN_CONFIG_OUTPUT, 0, },
        { "output-high", PIN_CONFIG_OUTPUT, 1, },
 };