Lines Matching +full:pinctrl +full:- +full:pin +full:- +full:array
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Core private header for the pin control subsystem
5 * Copyright (C) 2011 ST-Ericsson SA
6 * Written on behalf of Linaro for ST-Ericsson
14 #include <linux/radix-tree.h>
17 #include <linux/pinctrl/machine.h>
24 struct pinctrl;
30 * struct pinctrl_dev - pin control class device
31 * @node: node to include this pin controller in the global pin controller list
32 * @desc: the pin controller descriptor supplied when initializing this pin
34 * @pin_desc_tree: each pin descriptor for this pin controller is stored in
36 * @pin_group_tree: optionally each pin group can be stored in this radix tree
40 * @gpio_ranges: a list of GPIO ranges that is handled by this pin controller,
42 * @dev: the device entry for this pin controller
43 * @owner: module providing the pin controller, used for refcounting
44 * @driver_data: driver data for drivers registering to the pin controller
49 * @mutex: mutex taken on each pin controller specific action
68 struct pinctrl *p;
78 * struct pinctrl - per-device pin control state holder
80 * @dev: the device using this pin control handle
87 struct pinctrl { struct
97 * struct pinctrl_state - a pinctrl state for a device argument
98 * @node: list node for struct pinctrl's @states field
109 * struct pinctrl_setting_mux - setting data for MAP_TYPE_MUX_GROUP
119 * struct pinctrl_setting_configs - setting data for MAP_TYPE_CONFIGS_*
120 * @group_or_pin: the group selector or pin ID to program
121 * @configs: a pointer to an array of config parameters/values to program into
122 * hardware. Each individual pin controller defines the format and meaning
124 * @num_configs: the number of entries in array @configs
133 * struct pinctrl_setting - an individual mux or config setting
136 * @pctldev: pin control device handling to be programmed. Not used for
153 * struct pin_desc - pin descriptor for each physical pin in the arch
154 * @pctldev: corresponding pin control device
155 * @name: a name for the pin, e.g. the name of the pin/pad/finger on a
157 * @dynamic_name: if the name of this pin was dynamically allocated
158 * @drv_data: driver-defined per-pin data. pinctrl core does not touch this
159 * @mux_usecount: If zero, the pin is not claimed, and @owner should be NULL.
160 * If non-zero, this pin is claimed by @owner. This field is an integer
163 * or pin, and each of these will increment the @usecount.
165 * @mux_setting: The most recent selected mux setting for this pin, if any.
166 * @gpio_owner: If pinctrl_gpio_request() was called for this pin, this is
167 * the name of the GPIO that "owns" this pin.
185 * struct pinctrl_maps - a list item containing part of the mapping table
187 * @maps: array of mapping table entries
198 #include <linux/pinctrl/pinctrl.h>
201 * struct group_desc - generic pin group descriptor
202 * @grp: generic data of the pin group (name and pins)
203 * @data: pin controller driver specific data
210 /* Convenient macro to define a generic pin group descriptor */
241 const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned int pin);
246 unsigned int pin) in pin_desc_get() argument
248 return radix_tree_lookup(&pctldev->pin_desc_tree, pin); in pin_desc_get()
253 unsigned int pin);
264 __i < _maps_node_->num_maps && (_map_ = &_maps_node_->maps[__i]); \