aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2012-03-23 12:29:46 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-04-18 07:53:10 -0400
commit57291ce295c0aca738dd284c4a9c591c09ebee71 (patch)
tree6e687f329e7adf08b5d7dcaa3d6616ff1a9b8c27 /drivers/pinctrl/core.h
parentd26bc49fa401be2b71838b6a4b387196cd12a534 (diff)
pinctrl: core device tree mapping table parsing support
During pinctrl_get(), if the client device has a device tree node, look for the common pinctrl properties there. If found, parse the referenced device tree nodes, with the help of the pinctrl drivers, and generate mapping table entries from them. During pinctrl_put(), free any results of device tree parsing. Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.h')
-rw-r--r--drivers/pinctrl/core.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 17ecf651b123..98ae8085e735 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -52,12 +52,15 @@ struct pinctrl_dev {
52 * @dev: the device using this pin control handle 52 * @dev: the device using this pin control handle
53 * @states: a list of states for this device 53 * @states: a list of states for this device
54 * @state: the current state 54 * @state: the current state
55 * @dt_maps: the mapping table chunks dynamically parsed from device tree for
56 * this device, if any
55 */ 57 */
56struct pinctrl { 58struct pinctrl {
57 struct list_head node; 59 struct list_head node;
58 struct device *dev; 60 struct device *dev;
59 struct list_head states; 61 struct list_head states;
60 struct pinctrl_state *state; 62 struct pinctrl_state *state;
63 struct list_head dt_maps;
61}; 64};
62 65
63/** 66/**
@@ -100,7 +103,8 @@ struct pinctrl_setting_configs {
100 * struct pinctrl_setting - an individual mux or config setting 103 * struct pinctrl_setting - an individual mux or config setting
101 * @node: list node for struct pinctrl_settings's @settings field 104 * @node: list node for struct pinctrl_settings's @settings field
102 * @type: the type of setting 105 * @type: the type of setting
103 * @pctldev: pin control device handling to be programmed 106 * @pctldev: pin control device handling to be programmed. Not used for
107 * PIN_MAP_TYPE_DUMMY_STATE.
104 * @data: Data specific to the setting type 108 * @data: Data specific to the setting type
105 */ 109 */
106struct pinctrl_setting { 110struct pinctrl_setting {
@@ -153,4 +157,9 @@ static inline struct pin_desc *pin_desc_get(struct pinctrl_dev *pctldev,
153 return radix_tree_lookup(&pctldev->pin_desc_tree, pin); 157 return radix_tree_lookup(&pctldev->pin_desc_tree, pin);
154} 158}
155 159
160int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
161 bool dup, bool locked);
162void pinctrl_unregister_map(struct pinctrl_map const *map);
163
156extern struct mutex pinctrl_mutex; 164extern struct mutex pinctrl_mutex;
165extern struct list_head pinctrldev_list;