diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-05-13 11:19:01 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-05-14 04:43:35 -0400 |
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 787ae7bb7dc3..ab63d3851f27 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, | |||
393 | struct device_node *np = pdev->dev.of_node; | 393 | struct device_node *np = pdev->dev.of_node; |
394 | struct device_node *child; | 394 | struct device_node *child; |
395 | struct mxs_function *f; | 395 | struct mxs_function *f; |
396 | const char *gpio_compat = "fsl,mxs-gpio"; | ||
396 | const char *fn, *fnull = ""; | 397 | const char *fn, *fnull = ""; |
397 | int i = 0, idxf = 0, idxg = 0; | 398 | int i = 0, idxf = 0, idxg = 0; |
398 | int ret; | 399 | int ret; |
@@ -407,6 +408,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, | |||
407 | /* Count total functions and groups */ | 408 | /* Count total functions and groups */ |
408 | fn = fnull; | 409 | fn = fnull; |
409 | for_each_child_of_node(np, child) { | 410 | for_each_child_of_node(np, child) { |
411 | if (of_device_is_compatible(child, gpio_compat)) | ||
412 | continue; | ||
410 | soc->ngroups++; | 413 | soc->ngroups++; |
411 | /* Skip pure pinconf node */ | 414 | /* Skip pure pinconf node */ |
412 | if (of_property_read_u32(child, "reg", &val)) | 415 | if (of_property_read_u32(child, "reg", &val)) |
@@ -431,6 +434,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, | |||
431 | fn = fnull; | 434 | fn = fnull; |
432 | f = &soc->functions[idxf]; | 435 | f = &soc->functions[idxf]; |
433 | for_each_child_of_node(np, child) { | 436 | for_each_child_of_node(np, child) { |
437 | if (of_device_is_compatible(child, gpio_compat)) | ||
438 | continue; | ||
434 | if (of_property_read_u32(child, "reg", &val)) | 439 | if (of_property_read_u32(child, "reg", &val)) |
435 | continue; | 440 | continue; |
436 | if (strcmp(fn, child->name)) { | 441 | if (strcmp(fn, child->name)) { |
@@ -444,6 +449,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, | |||
444 | idxf = 0; | 449 | idxf = 0; |
445 | fn = fnull; | 450 | fn = fnull; |
446 | for_each_child_of_node(np, child) { | 451 | for_each_child_of_node(np, child) { |
452 | if (of_device_is_compatible(child, gpio_compat)) | ||
453 | continue; | ||
447 | if (of_property_read_u32(child, "reg", &val)) { | 454 | if (of_property_read_u32(child, "reg", &val)) { |
448 | ret = mxs_pinctrl_parse_group(pdev, child, | 455 | ret = mxs_pinctrl_parse_group(pdev, child, |
449 | idxg++, NULL); | 456 | idxg++, NULL); |