return 0;
 }
 
+static bool is_mxs_gpio(struct device_node *child)
+{
+       return of_device_is_compatible(child, "fsl,imx23-gpio") ||
+              of_device_is_compatible(child, "fsl,imx28-gpio");
+}
+
 static int mxs_pinctrl_probe_dt(struct platform_device *pdev,
                                struct mxs_pinctrl_data *d)
 {
        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;
        /* Count total functions and groups */
        fn = fnull;
        for_each_child_of_node(np, child) {
-               if (of_device_is_compatible(child, gpio_compat))
+               if (is_mxs_gpio(child))
                        continue;
                soc->ngroups++;
                /* Skip pure pinconf node */
        fn = fnull;
        f = &soc->functions[idxf];
        for_each_child_of_node(np, child) {
-               if (of_device_is_compatible(child, gpio_compat))
+               if (is_mxs_gpio(child))
                        continue;
                if (of_property_read_u32(child, "reg", &val))
                        continue;
        idxf = 0;
        fn = fnull;
        for_each_child_of_node(np, child) {
-               if (of_device_is_compatible(child, gpio_compat))
+               if (is_mxs_gpio(child))
                        continue;
                if (of_property_read_u32(child, "reg", &val)) {
                        ret = mxs_pinctrl_parse_group(pdev, child,