Lines Matching +full:pin +full:- +full:function

1 /* SPDX-License-Identifier: GPL-2.0+ */
13 * struct pinconf_param - pin config parameters
27 * struct pinctrl_ops - pin control operations, to be implemented by
28 * pin controller drivers.
38 * @get_pin_name: return the pin name of the pin selector,
39 * called by the core to figure out which pin it shall do
44 * called by the core to figure out which pin group it shall do
47 * in this driver. (necessary for pin-muxing)
48 * @get_function_name: return the function name of the muxing selector,
50 * certain device to. (necessary for pin-muxing)
51 * @pinmux_set: enable a certain muxing function with a certain pin.
52 * The @func_selector selects a certain function whereas @pin_selector
53 * selects a certain pin to be used. On simple controllers one of them
54 * may be ignored. (necessary for pin-muxing against a single pin)
55 * @pinmux_group_set: enable a certain muxing function with a certain pin
56 * group. The @func_selector selects a certain function whereas
59 * (necessary for pin-muxing against a pin group)
60 * @pinconf_num_params: number of driver-specific parameters to be parsed
61 * from device trees (necessary for pin-configuration)
63 * device trees (necessary for pin-configuration)
64 * @pinconf_set: configure an individual pin with a given parameter.
65 * (necessary for pin-configuration against a single pin)
67 * (necessary for pin-configuration against a pin group)
72 * @get_pin_muxing: display the muxing of a given pin.
94 /* for pinctrl-simple */
97 * request() - Request a particular pinctrl function
99 * This activates the selected function.
102 * @func: Function number (driver-specific)
103 * @return 0 if OK, -ve on error
108 * get_periph_id() - get the peripheral ID for a device
117 * @return peripheral ID of @periph, or -ENOENT on error
122 * get_gpio_mux() - get the mux value for a particular GPIO
125 * useful for displaying the function being used by that GPIO, such
126 * as with the 'gpio' command. This function is internal to the GPIO
133 * @return mux value (SoC-specific, e.g. 0 for input, 1 for output)
138 * get_pin_muxing() - show pin muxing
140 * This allows to display the muxing of a given pin. It's useful for
141 * debug purpose to know if a pin is configured as GPIO or as an
142 * alternate function and which one.
147 * @selector: Pin selector
148 * @buf Pin's muxing description
149 * @size Pin's muxing description length
150 * return 0 if OK, -ve on error
156 #define pinctrl_get_ops(dev) ((struct pinctrl_ops *)(dev)->driver->ops)
159 * Generic pin configuration paramters
161 * enum pin_config_param - possible pin configuration parameters
162 * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it
167 * @PIN_CONFIG_BIAS_DISABLE: disable any pin bias on the pin, a
168 * transition from say pull-up to pull-down implies that you disable
169 * pull-up in the process, this setting disables all biasing.
170 * @PIN_CONFIG_BIAS_HIGH_IMPEDANCE: the pin will be set to a high impedance
171 * mode, also know as "third-state" (tristate) or "high-Z" or "floating".
172 * On output pins this effectively disconnects the pin, which is useful
173 * if for example some other pin is going to drive the signal connected
176 * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high
177 * impedance to GROUND). If the argument is != 0 pull-down is enabled,
178 * if it is 0, pull-down is total, i.e. the pin is connected to GROUND.
179 * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based
181 * function. The pull direction and possibly strength too will normally
187 * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high
188 * impedance to VDD). If the argument is != 0 pull-up is enabled,
189 * if it is 0, pull-up is total, i.e. the pin is connected to VDD.
190 * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open
194 * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source
197 * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and
200 * push-pull mode, the argument is ignored.
201 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
203 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode,
207 * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input. Note that this does not
208 * affect the pin's ability to drive output. 1 enables input, 0 disables
210 * @PIN_CONFIG_INPUT_SCHMITT: this will configure an input pin to run in
211 * schmitt-trigger mode. If the schmitt-trigger has adjustable hysteresis,
214 * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin.
215 * If the argument != 0, schmitt-trigger mode is enabled. If it's 0,
216 * schmitt-trigger mode is disabled.
217 * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power
221 * @PIN_CONFIG_OUTPUT_ENABLE: this will enable the pin's output mode
223 * enable the output buffers and then let the pin controller current
224 * configuration (eg. the currently selected mux function) drive values on
227 * @PIN_CONFIG_OUTPUT: this will configure the pin as an output and drive a
229 * indicate low level. (Please see Documentation/driver-api/pinctl.rst,
231 * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power
235 * @PIN_CONFIG_SLEW_RATE: if the pin can select slew rate, the argument to
238 * @PIN_CONFIG_SKEW_DELAY: if the pin has programmable skew rate (on inputs)
242 * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if
243 * you need to pass in custom configurations to the pin controller, use
276 * pinctrl_generic_set_state() - generic set_state operation
278 * such as "pins", "groups", "functions", and pin configuration parameters.
289 return -EINVAL; in pinctrl_generic_set_state()
295 * pinctrl_select_state() - set a device to a given state
306 return -EINVAL; in pinctrl_select_state()
311 * pinctrl_request() - Request a particular pinctrl function
314 * @func: Function number (driver-specific)
315 * @flags: Flags (driver-specific)
316 * @return 0 if OK, -ve on error
321 * pinctrl_request_noflags() - Request a particular pinctrl function
326 * @func: Function number (driver-specific)
327 * @return 0 if OK, -ve on error
332 * pinctrl_get_periph_id() - get the peripheral ID for a device
340 * @return peripheral ID of @periph, or -ENOENT on error
345 * pinctrl_decode_pin_config() - decode pin configuration flags
353 * @return decoded flag value, or -ve on error
358 * pinctrl_decode_pin_config_dm() - decode pin configuration flags
365 * @return decoded flag value, or -ve on error
370 * pinctrl_get_gpio_mux() - get the mux value for a particular GPIO
373 * useful for displaying the function being used by that GPIO, such
374 * as with the 'gpio' command. This function is internal to the GPIO
381 * @return mux value (SoC-specific, e.g. 0 for input, 1 for output)
386 * pinctrl_get_pin_muxing() - Returns the muxing description
388 * This allows to display the muxing description of the given pin for
392 * @selector Pin index within pin-controller
393 * @buf Pin's muxing description
394 * @size Pin's muxing description length
395 * @return 0 if OK, -ve on error
401 * pinctrl_get_pins_count() - display pin-controller pins number
403 * This allows to know the number of pins owned by a given pin-controller
406 * @return pins number if OK, -ve on error
411 * pinctrl_get_pin_name() - Returns the pin's name
413 * This allows to display the pin's name for debug purpose
416 * @selector Pin index within pin-controller
417 * @buf Pin's name
418 * @return 0 if OK, -ve on error