diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2015-09-30 08:07:17 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-02 18:07:27 -0400 |
| commit | 3c4b23dd71ea6f68be9731b68877fbc05f4fb693 (patch) | |
| tree | cb8dad0b58e504b7f0af635b015bb6a93ee915a0 /include/linux/pinctrl | |
| parent | 89092fb0701d3b4070ade6d0aa04640720f52fbd (diff) | |
pinctrl: pinconf-generic: sort pin configuration params alphabetically
Currently, the dt_params array in drivers/pinctrl/pinconf-generic.c
is not sorted in the same order as the enum pin_config_param in
include/linux/pinctrl/pinconf-generic.h.
Sort enum pin_config_param, conf_items, dt_params, alphabetically
for consistency.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.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 | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index fe65962b264f..d921afd5f109 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -20,6 +20,11 @@ | |||
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | * enum pin_config_param - possible pin configuration parameters | 22 | * enum pin_config_param - possible pin configuration parameters |
| 23 | * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it | ||
| 24 | * weakly drives the last value on a tristate bus, also known as a "bus | ||
| 25 | * holder", "bus keeper" or "repeater". This allows another device on the | ||
| 26 | * bus to change the value by driving the bus high or low and switching to | ||
| 27 | * tristate. The argument is ignored. | ||
| 23 | * @PIN_CONFIG_BIAS_DISABLE: disable any pin bias on the pin, a | 28 | * @PIN_CONFIG_BIAS_DISABLE: disable any pin bias on the pin, a |
| 24 | * transition from say pull-up to pull-down implies that you disable | 29 | * transition from say pull-up to pull-down implies that you disable |
| 25 | * pull-up in the process, this setting disables all biasing. | 30 | * pull-up in the process, this setting disables all biasing. |
| @@ -29,14 +34,6 @@ | |||
| 29 | * if for example some other pin is going to drive the signal connected | 34 | * if for example some other pin is going to drive the signal connected |
| 30 | * to it for a while. Pins used for input are usually always high | 35 | * to it for a while. Pins used for input are usually always high |
| 31 | * impedance. | 36 | * impedance. |
| 32 | * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it | ||
| 33 | * weakly drives the last value on a tristate bus, also known as a "bus | ||
| 34 | * holder", "bus keeper" or "repeater". This allows another device on the | ||
| 35 | * bus to change the value by driving the bus high or low and switching to | ||
| 36 | * tristate. The argument is ignored. | ||
| 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, | ||
| 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 | 37 | * @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, | 38 | * impedance to GROUND). If the argument is != 0 pull-down is enabled, |
| 42 | * if it is 0, pull-down is total, i.e. the pin is connected to GROUND. | 39 | * if it is 0, pull-down is total, i.e. the pin is connected to GROUND. |
| @@ -48,10 +45,9 @@ | |||
| 48 | * If the argument is != 0 pull up/down is enabled, if it is 0, the | 45 | * If the argument is != 0 pull up/down is enabled, if it is 0, the |
| 49 | * configuration is ignored. The proper way to disable it is to use | 46 | * configuration is ignored. The proper way to disable it is to use |
| 50 | * @PIN_CONFIG_BIAS_DISABLE. | 47 | * @PIN_CONFIG_BIAS_DISABLE. |
| 51 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | 48 | * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high |
| 52 | * low, this is the most typical case and is typically achieved with two | 49 | * impedance to VDD). If the argument is != 0 pull-up is enabled, |
| 53 | * active transistors on the output. Setting this config will enable | 50 | * if it is 0, pull-up is total, i.e. the pin is connected to VDD. |
| 54 | * push-pull mode, the argument is ignored. | ||
| 55 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open | 51 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open |
| 56 | * collector) which means it is usually wired with other output ports | 52 | * collector) which means it is usually wired with other output ports |
| 57 | * which are then pulled up with an external resistor. Setting this | 53 | * which are then pulled up with an external resistor. Setting this |
| @@ -59,28 +55,26 @@ | |||
| 59 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source | 55 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source |
| 60 | * (open emitter). Setting this config will enable open source mode, the | 56 | * (open emitter). Setting this config will enable open source mode, the |
| 61 | * argument is ignored. | 57 | * argument is ignored. |
| 58 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | ||
| 59 | * low, this is the most typical case and is typically achieved with two | ||
| 60 | * active transistors on the output. Setting this config will enable | ||
| 61 | * push-pull mode, the argument is ignored. | ||
| 62 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current | 62 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current |
| 63 | * passed as argument. The argument is in mA. | 63 | * passed as argument. The argument is in mA. |
| 64 | * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, | ||
| 65 | * which means it will wait for signals to settle when reading inputs. The | ||
| 66 | * argument gives the debounce time in usecs. Setting the | ||
| 67 | * argument to zero turns debouncing off. | ||
| 64 | * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input. Note that this does not | 68 | * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input. Note that this does not |
| 65 | * affect the pin's ability to drive output. 1 enables input, 0 disables | 69 | * affect the pin's ability to drive output. 1 enables input, 0 disables |
| 66 | * input. | 70 | * input. |
| 67 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. | ||
| 68 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, | ||
| 69 | * schmitt-trigger mode is disabled. | ||
| 70 | * @PIN_CONFIG_INPUT_SCHMITT: this will configure an input pin to run in | 71 | * @PIN_CONFIG_INPUT_SCHMITT: this will configure an input pin to run in |
| 71 | * schmitt-trigger mode. If the schmitt-trigger has adjustable hysteresis, | 72 | * schmitt-trigger mode. If the schmitt-trigger has adjustable hysteresis, |
| 72 | * the threshold value is given on a custom format as argument when | 73 | * the threshold value is given on a custom format as argument when |
| 73 | * setting pins to this mode. | 74 | * setting pins to this mode. |
| 74 | * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, | 75 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. |
| 75 | * which means it will wait for signals to settle when reading inputs. The | 76 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, |
| 76 | * argument gives the debounce time in usecs. Setting the | 77 | * schmitt-trigger mode is disabled. |
| 77 | * argument to zero turns debouncing off. | ||
| 78 | * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power | ||
| 79 | * supplies, the argument to this parameter (on a custom format) tells | ||
| 80 | * the driver which alternative power source to use. | ||
| 81 | * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to | ||
| 82 | * this parameter (on a custom format) tells the driver which alternative | ||
| 83 | * slew rate to use. | ||
| 84 | * @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 |
| 85 | * operation, if several modes of operation are supported these can be | 79 | * operation, if several modes of operation are supported these can be |
| 86 | * 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 |
| @@ -89,29 +83,35 @@ | |||
| 89 | * 1 to indicate high level, argument 0 to indicate low level. (Please | 83 | * 1 to indicate high level, argument 0 to indicate low level. (Please |
| 90 | * see Documentation/pinctrl.txt, section "GPIO mode pitfalls" for a | 84 | * see Documentation/pinctrl.txt, section "GPIO mode pitfalls" for a |
| 91 | * discussion around this parameter.) | 85 | * discussion around this parameter.) |
| 86 | * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power | ||
| 87 | * supplies, the argument to this parameter (on a custom format) tells | ||
| 88 | * the driver which alternative power source to use. | ||
| 89 | * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to | ||
| 90 | * this parameter (on a custom format) tells the driver which alternative | ||
| 91 | * slew rate to use. | ||
| 92 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if | 92 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if |
| 93 | * you need to pass in custom configurations to the pin controller, use | 93 | * you need to pass in custom configurations to the pin controller, use |
| 94 | * PIN_CONFIG_END+1 as the base offset. | 94 | * PIN_CONFIG_END+1 as the base offset. |
| 95 | */ | 95 | */ |
| 96 | enum pin_config_param { | 96 | enum pin_config_param { |
| 97 | PIN_CONFIG_BIAS_BUS_HOLD, | ||
| 97 | PIN_CONFIG_BIAS_DISABLE, | 98 | PIN_CONFIG_BIAS_DISABLE, |
| 98 | PIN_CONFIG_BIAS_HIGH_IMPEDANCE, | 99 | PIN_CONFIG_BIAS_HIGH_IMPEDANCE, |
| 99 | PIN_CONFIG_BIAS_BUS_HOLD, | ||
| 100 | PIN_CONFIG_BIAS_PULL_UP, | ||
| 101 | PIN_CONFIG_BIAS_PULL_DOWN, | 100 | PIN_CONFIG_BIAS_PULL_DOWN, |
| 102 | PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, | 101 | PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, |
| 103 | PIN_CONFIG_DRIVE_PUSH_PULL, | 102 | PIN_CONFIG_BIAS_PULL_UP, |
| 104 | PIN_CONFIG_DRIVE_OPEN_DRAIN, | 103 | PIN_CONFIG_DRIVE_OPEN_DRAIN, |
| 105 | PIN_CONFIG_DRIVE_OPEN_SOURCE, | 104 | PIN_CONFIG_DRIVE_OPEN_SOURCE, |
| 105 | PIN_CONFIG_DRIVE_PUSH_PULL, | ||
| 106 | PIN_CONFIG_DRIVE_STRENGTH, | 106 | PIN_CONFIG_DRIVE_STRENGTH, |
| 107 | PIN_CONFIG_INPUT_DEBOUNCE, | ||
| 107 | PIN_CONFIG_INPUT_ENABLE, | 108 | PIN_CONFIG_INPUT_ENABLE, |
| 108 | PIN_CONFIG_INPUT_SCHMITT_ENABLE, | ||
| 109 | PIN_CONFIG_INPUT_SCHMITT, | 109 | PIN_CONFIG_INPUT_SCHMITT, |
| 110 | PIN_CONFIG_INPUT_DEBOUNCE, | 110 | PIN_CONFIG_INPUT_SCHMITT_ENABLE, |
| 111 | PIN_CONFIG_POWER_SOURCE, | ||
| 112 | PIN_CONFIG_SLEW_RATE, | ||
| 113 | PIN_CONFIG_LOW_POWER_MODE, | 111 | PIN_CONFIG_LOW_POWER_MODE, |
| 114 | PIN_CONFIG_OUTPUT, | 112 | PIN_CONFIG_OUTPUT, |
| 113 | PIN_CONFIG_POWER_SOURCE, | ||
| 114 | PIN_CONFIG_SLEW_RATE, | ||
| 115 | PIN_CONFIG_END = 0x7FFF, | 115 | PIN_CONFIG_END = 0x7FFF, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
