Commit 48516804 authored by Shawn Guo's avatar Shawn Guo Committed by Linus Walleij

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: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 3b7ac941
...@@ -393,6 +393,7 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, ...@@ -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 *np = pdev->dev.of_node;
struct device_node *child; struct device_node *child;
struct mxs_function *f; struct mxs_function *f;
const char *gpio_compat = "fsl,mxs-gpio";
const char *fn, *fnull = ""; const char *fn, *fnull = "";
int i = 0, idxf = 0, idxg = 0; int i = 0, idxf = 0, idxg = 0;
int ret; int ret;
...@@ -407,6 +408,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, ...@@ -407,6 +408,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev,
/* Count total functions and groups */ /* Count total functions and groups */
fn = fnull; fn = fnull;
for_each_child_of_node(np, child) { for_each_child_of_node(np, child) {
if (of_device_is_compatible(child, gpio_compat))
continue;
soc->ngroups++; soc->ngroups++;
/* Skip pure pinconf node */ /* Skip pure pinconf node */
if (of_property_read_u32(child, "reg", &val)) if (of_property_read_u32(child, "reg", &val))
...@@ -431,6 +434,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, ...@@ -431,6 +434,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev,
fn = fnull; fn = fnull;
f = &soc->functions[idxf]; f = &soc->functions[idxf];
for_each_child_of_node(np, child) { for_each_child_of_node(np, child) {
if (of_device_is_compatible(child, gpio_compat))
continue;
if (of_property_read_u32(child, "reg", &val)) if (of_property_read_u32(child, "reg", &val))
continue; continue;
if (strcmp(fn, child->name)) { if (strcmp(fn, child->name)) {
...@@ -444,6 +449,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, ...@@ -444,6 +449,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev,
idxf = 0; idxf = 0;
fn = fnull; fn = fnull;
for_each_child_of_node(np, child) { for_each_child_of_node(np, child) {
if (of_device_is_compatible(child, gpio_compat))
continue;
if (of_property_read_u32(child, "reg", &val)) { if (of_property_read_u32(child, "reg", &val)) {
ret = mxs_pinctrl_parse_group(pdev, child, ret = mxs_pinctrl_parse_group(pdev, child,
idxg++, NULL); idxg++, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment