diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-13 23:19:01 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-05-14 10:43:35 +0200 |
commit | 4851680491f3629cd53b3a1283841deadd6db88c (patch) | |
tree | 4012cb0b559e3e532f95b9c1d5ce07e9eafe6000 /drivers/pinctrl/pinctrl-mxs.c | |
parent | 3b7ac941e06477a76538038f7e8b70395897a215 (diff) |
pinctrl: mxs: skip gpio nodes for group creation
The recent added mxs gpio device tree bindings require gpio nodes
defined under pinctrl node too. The pinctrl-mxs driver should skip
these node for group parsing and creating.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-mxs.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-mxs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c index 787ae7bb7dc..ab63d3851f2 100644 --- a/drivers/pinctrl/pinctrl-mxs.c +++ b/drivers/pinctrl/pinctrl-mxs.c @@ -393,6 +393,7 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, struct device_node *np = pdev->dev.of_node; struct device_node *child; struct mxs_function *f; + const char *gpio_compat = "fsl,mxs-gpio"; const char *fn, *fnull = ""; int i = 0, idxf = 0, idxg = 0; int ret; @@ -407,6 +408,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, /* Count total functions and groups */ fn = fnull; for_each_child_of_node(np, child) { + if (of_device_is_compatible(child, gpio_compat)) + continue; soc->ngroups++; /* Skip pure pinconf node */ if (of_property_read_u32(child, "reg", &val)) @@ -431,6 +434,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, fn = fnull; f = &soc->functions[idxf]; for_each_child_of_node(np, child) { + if (of_device_is_compatible(child, gpio_compat)) + continue; if (of_property_read_u32(child, "reg", &val)) continue; if (strcmp(fn, child->name)) { @@ -444,6 +449,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, idxf = 0; fn = fnull; for_each_child_of_node(np, child) { + if (of_device_is_compatible(child, gpio_compat)) + continue; if (of_property_read_u32(child, "reg", &val)) { ret = mxs_pinctrl_parse_group(pdev, child, idxg++, NULL); |