aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pinctrl
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-23 19:04:39 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-29 13:10:55 -0500
commit806d314325812fb8ffe7059bd84a23d334350c21 (patch)
treece904d5ddab97e25b71b547f7b20844d507b9529 /include/linux/pinctrl
parent1cf94c45ca31c0ad563e72b095782346cba26b6c (diff)
pinctrl: re-order struct pinctrl_map
The lookup key in struct pinctrl_map is (.dev_name, .name). Re-order the struct definition to put the lookup key fields first, and the result values afterwards. To me at least, this slightly better reflects the lookup process. Update the documentation in a similar fashion. Note: PIN_MAP*() macros aren't updated; I plan to update this once later when enhancing the mapping table format to support pin config to reduce churn. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> [Rebased for cherry-picking] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl')
-rw-r--r--include/linux/pinctrl/machine.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
index 400f1926b234..73fbb2745301 100644
--- a/include/linux/pinctrl/machine.h
+++ b/include/linux/pinctrl/machine.h
@@ -14,6 +14,10 @@
14 14
15/** 15/**
16 * struct pinctrl_map - boards/machines shall provide this map for devices 16 * struct pinctrl_map - boards/machines shall provide this map for devices
17 * @dev_name: the name of the device using this specific mapping, the name
18 * must be the same as in your struct device*. If this name is set to the
19 * same name as the pin controllers own dev_name(), the map entry will be
20 * hogged by the driver itself upon registration
17 * @name: the name of this specific map entry for the particular machine. 21 * @name: the name of this specific map entry for the particular machine.
18 * This is the second parameter passed to pinmux_get() when you want 22 * This is the second parameter passed to pinmux_get() when you want
19 * to have several mappings to the same device 23 * to have several mappings to the same device
@@ -25,17 +29,13 @@
25 * @group: sometimes a function can map to different pin groups, so this 29 * @group: sometimes a function can map to different pin groups, so this
26 * selects a certain specific pin group to activate for the function, if 30 * selects a certain specific pin group to activate for the function, if
27 * left as NULL, the first applicable group will be used 31 * left as NULL, the first applicable group will be used
28 * @dev_name: the name of the device using this specific mapping, the name
29 * must be the same as in your struct device*. If this name is set to the
30 * same name as the pin controllers own dev_name(), the map entry will be
31 * hogged by the driver itself upon registration
32 */ 32 */
33struct pinctrl_map { 33struct pinctrl_map {
34 const char *dev_name;
34 const char *name; 35 const char *name;
35 const char *ctrl_dev_name; 36 const char *ctrl_dev_name;
36 const char *function; 37 const char *function;
37 const char *group; 38 const char *group;
38 const char *dev_name;
39}; 39};
40 40
41/* 41/*