aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-tegra.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-03-07 14:22:16 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-03-12 10:23:41 -0400
commitce4362546612c00a059c255f5c55373d6ee1022a (patch)
tree88d22d243ae5e6b467caaeb7ab07af6f20f57632 /drivers/pinctrl/pinctrl-tegra.h
parentedfab368c8087ae574d6fa49fdc85068a116b79b (diff)
pinctrl: tegra: dynamically calculate function list of groups
The per-SoC data structures for Tegra pinctrl stored some information in a redundant way. Specifically, the list of groups that each function could be muxed onto was stored once explicitly, and also as part of the definition of each group. Eliminate this redundancy, and calculate each function's list of valid groups at pinctrl probe time. This removes thousands of lines of code from the pinctrl driver and ~16K from the vmlinux binary size, and adds only about 500uS to the boot process (on Tegra30; newer SoCs will likely be faster still). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-tegra.h')
-rw-r--r--drivers/pinctrl/pinctrl-tegra.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra.h b/drivers/pinctrl/pinctrl-tegra.h
index 817f7061dc4c..6053832d433e 100644
--- a/drivers/pinctrl/pinctrl-tegra.h
+++ b/drivers/pinctrl/pinctrl-tegra.h
@@ -72,7 +72,7 @@ enum tegra_pinconf_tristate {
72 */ 72 */
73struct tegra_function { 73struct tegra_function {
74 const char *name; 74 const char *name;
75 const char * const *groups; 75 const char **groups;
76 unsigned ngroups; 76 unsigned ngroups;
77}; 77};
78 78
@@ -193,7 +193,7 @@ struct tegra_pinctrl_soc_data {
193 unsigned ngpios; 193 unsigned ngpios;
194 const struct pinctrl_pin_desc *pins; 194 const struct pinctrl_pin_desc *pins;
195 unsigned npins; 195 unsigned npins;
196 const struct tegra_function *functions; 196 struct tegra_function *functions;
197 unsigned nfunctions; 197 unsigned nfunctions;
198 const struct tegra_pingroup *groups; 198 const struct tegra_pingroup *groups;
199 unsigned ngroups; 199 unsigned ngroups;