ENUM PIN_CONFIG_PARAM(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… enum pin_config_param โ€” the Kernel API Manual moment โœจ

okay so bestie, welcome to the kernel API manual for enum pin_config_param, aka the actual list of every possible pin configuration parameter ever. this is lowkey the pin control glossary and it ate. ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

enum pin_config_param โ€” all the possible pin configuration parameters, like, literally all of them ๐Ÿ’–


โœจ SYNOPSIS โœจ

enum pin_config_param {
    PIN_CONFIG_BIAS_BUS_HOLD ,
    PIN_CONFIG_BIAS_DISABLE ,
    PIN_CONFIG_BIAS_HIGH_IMPEDANCE ,
    PIN_CONFIG_BIAS_PULL_DOWN ,
    PIN_CONFIG_BIAS_PULL_PIN_DEFAULT ,
    PIN_CONFIG_BIAS_PULL_UP ,
    PIN_CONFIG_DRIVE_OPEN_DRAIN ,
    PIN_CONFIG_DRIVE_OPEN_SOURCE ,
    PIN_CONFIG_DRIVE_PUSH_PULL ,
    PIN_CONFIG_DRIVE_STRENGTH ,
    PIN_CONFIG_DRIVE_STRENGTH_UA ,
    PIN_CONFIG_INPUT_DEBOUNCE ,
    PIN_CONFIG_INPUT_ENABLE ,
    PIN_CONFIG_INPUT_SCHMITT ,
    PIN_CONFIG_INPUT_SCHMITT_ENABLE ,
    PIN_CONFIG_INPUT_SCHMITT_UV ,
    PIN_CONFIG_INPUT_VOLTAGE_UV ,
    PIN_CONFIG_MODE_LOW_POWER ,
    PIN_CONFIG_MODE_PWM ,
    PIN_CONFIG_LEVEL ,
    PIN_CONFIG_OUTPUT_ENABLE ,
    PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS ,
    PIN_CONFIG_PERSIST_STATE ,
    PIN_CONFIG_POWER_SOURCE ,
    PIN_CONFIG_SKEW_DELAY ,
    PIN_CONFIG_SKEW_DELAY_INPUT_PS ,
    PIN_CONFIG_SKEW_DELAY_OUTPUT_PS ,
    PIN_CONFIG_SLEEP_HARDWARE_STATE ,
    PIN_CONFIG_SLEW_RATE ,
    PIN_CONFIG_END ,
    PIN_CONFIG_MAX

};

look at that list. iconic. no notes. ๐Ÿ‘‘


๐Ÿฆ‹ CONSTANTS ๐Ÿฆ‹

  • PIN_CONFIG_BIAS_BUS_HOLD โ€” the pin gets set to weakly latch, so it weakly drives the last value that was on a tristate bus. yes queen, it's also known as a "bus holder", "bus keeper" or "repeater" ๐Ÿ’… what that means is: another device on the bus can still change the value by driving the bus high or low and then switching to tristate. the argument is ignored, she doesn't want it.
  • PIN_CONFIG_BIAS_DISABLE โ€” disables any pin bias on the pin. so like, a transition from say pull-up to pull-down actually implies you disable pull-up along the way โ€” this setting right here disables all biasing. periodt.
  • PIN_CONFIG_BIAS_HIGH_IMPEDANCE โ€” the pin is set to high impedance mode, also known as "third-state" (tristate) or "high-Z" or "floating" ๐Ÿซง on output pins this effectively disconnects the pin, which is genuinely useful if, for example, some other pin is gonna drive the signal connected to it for a while. pins used for input are usually always high impedance anyway, main character energy.
  • PIN_CONFIG_BIAS_PULL_DOWN โ€” the pin gets pulled down (usually with high impedance to GROUND ๐ŸŒ). if the argument is != 0 pull-down is enabled, and the value is interpreted by the driver โ€” so it can be custom or an SI unit such as Ohms.
  • PIN_CONFIG_BIAS_PULL_PIN_DEFAULT โ€” the pin gets pulled up or down based on embedded knowledge of the controller hardware, like the current mux function. the pull direction and possibly strength too will normally be decided completely inside the hardware block and not be readable from the kernel side ๐Ÿ™ˆ if the argument is != 0 pull up/down is enabled; if it is 0, the configuration is ignored. and the proper way to disable it is to use PIN_CONFIG_BIAS_DISABLE. iykyk.
  • PIN_CONFIG_BIAS_PULL_UP โ€” the pin gets pulled up (usually with high impedance to VDD โšก). if the argument is != 0 pull-up is enabled, and the value is interpreted by the driver โ€” custom or an SI unit such as Ohms, dealer's choice.
  • PIN_CONFIG_DRIVE_OPEN_DRAIN โ€” the pin is driven with open drain (open collector), which means it's usually wired with other output ports that are then pulled up with an external resistor. setting this config enables open drain mode, and the argument is ignored ๐Ÿšฎ
  • PIN_CONFIG_DRIVE_OPEN_SOURCE โ€” the pin is driven with open source (open emitter). setting this config enables open source mode, argument ignored, we move.
  • PIN_CONFIG_DRIVE_PUSH_PULL โ€” the pin is 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 enables push-pull mode, and the argument is ignored.
  • PIN_CONFIG_DRIVE_STRENGTH โ€” the pin will sink or source at most the current passed as argument. the argument is in mA.
  • PIN_CONFIG_DRIVE_STRENGTH_UA โ€” the pin will sink or source at most the current passed as argument. the argument is in uA. yes, micro edition ๐Ÿ’…
  • PIN_CONFIG_INPUT_DEBOUNCE โ€” configures the pin into debounce mode, which means it waits for signals to settle when reading inputs. the argument gives the debounce time in usecs. setting the argument to zero turns debouncing off ๐Ÿ›‘ no cap.
  • PIN_CONFIG_INPUT_ENABLE โ€” enables the pin's input. note that this does not affect the pin's ability to drive output โš ๏ธ 1 enables input, 0 disables input.
  • PIN_CONFIG_INPUT_SCHMITT โ€” configures an input pin to run in schmitt-trigger mode. if the schmitt-trigger has adjustable hysteresis, the threshold value is given on a custom format as the argument when setting pins to this mode ๐ŸŽš๏ธ
  • PIN_CONFIG_INPUT_SCHMITT_ENABLE โ€” controls schmitt-trigger mode on the pin. if the argument != 0, schmitt-trigger mode is enabled; if it's 0, schmitt-trigger mode is disabled. simple as.
  • PIN_CONFIG_INPUT_SCHMITT_UV โ€” configures an input pin to run in schmitt-trigger mode. the argument is in uV. tiny units, big vibes ๐Ÿงš
  • PIN_CONFIG_INPUT_VOLTAGE_UV โ€” configures the input voltage level of the pin. the argument is specified in microvolts.
  • PIN_CONFIG_MODE_LOW_POWER โ€” configures the pin for low power operation ๐Ÿ’ค if several modes of operation are supported, these can be passed in the argument on a custom form โ€” otherwise just use argument 1 to indicate low power mode, and argument 0 turns low power mode off.
  • PIN_CONFIG_MODE_PWM โ€” configures the pin for PWM ๐ŸŒˆ
  • PIN_CONFIG_LEVEL โ€” setting this configures the pin as an output and drives a value on the line. use argument 1 to indicate high level, argument 0 to indicate low level. conversely, the value of the line can be read using this parameter โ€” if and only if that value can be represented as a binary 0 or 1, where 0 indicates a low voltage level and 1 indicates a high voltage level. (please see Documentation/driver-api/pin-control.rst, section "GPIO mode pitfalls" for a whole discussion around this parameter ๐Ÿ‘€)
  • PIN_CONFIG_OUTPUT_ENABLE โ€” enables the pin's output mode without driving a value there. for most platforms this reduces to enabling the output buffers and then letting the pin controller current configuration (eg. the currently selected mux function) drive values on the line. use argument 1 to enable output mode, argument 0 to disable it ๐Ÿซถ
  • PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS โ€” configures the output impedance of the pin with the value passed as argument. the argument is in ohms.
  • PIN_CONFIG_PERSIST_STATE โ€” retains pin state across sleep or controller reset ๐Ÿ˜ดโœจ
  • PIN_CONFIG_POWER_SOURCE โ€” if the pin can select between different power supplies, the argument to this parameter (on a custom format) tells the driver which alternative power source to use ๐Ÿ”Œ
  • PIN_CONFIG_SKEW_DELAY โ€” if the pin has a programmable skew rate (on inputs) or latch delay (on outputs), this parameter (in a custom format) specifies the clock skew or latch delay. it typically controls how many double inverters are put in front of the line ๐ŸŒ€
  • PIN_CONFIG_SKEW_DELAY_INPUT_PS โ€” if the pin has independent values for the programmable skew rate (on inputs) and latch delay (on outputs), then this parameter specifies the clock skew only. the argument is in ps.
  • PIN_CONFIG_SKEW_DELAY_OUTPUT_PS โ€” if the pin has independent values for the programmable skew rate (on inputs) and latch delay (on outputs), then this parameter specifies the latch delay only. the argument is in ps.
  • PIN_CONFIG_SLEEP_HARDWARE_STATE โ€” indicates this is sleep related state ๐ŸŒ™
  • 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 ๐ŸŽ๏ธ
  • PIN_CONFIG_END โ€” this is the last enumerator for pin configurations. if you need to pass in custom configurations to the pin controller, use PIN_CONFIG_END+1 as the base offset. noted, bestie ๐Ÿ“
  • PIN_CONFIG_MAX โ€” this is the maximum configuration value that can be presented using the packed format ๐Ÿ’€

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

  • Kernel file ./include/linux/pinctrl/pinconf-generic.h โ€” go read it, she's right there ๐Ÿซถ

ok that's the whole enum, nothing skipped, every single flag accounted for. you're welcome ๐Ÿ’–

and that's a wrap, bestie ๐ŸŽ€ this lil page came from the kernel source tree at ./include/linux/pinctrl, dated October 2026 โ€” you're so welcome, go configure some pins, slay ๐Ÿ’…โœจ๐ŸŒˆ

๐Ÿ“ฆ where this page comes from