Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[cascardo/linux.git] / drivers / pinctrl / nomadik / pinctrl-abx500.c
index 90a2c19..23db4c9 100644 (file)
@@ -891,14 +891,13 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
        const char *function = NULL;
        unsigned long *configs;
        unsigned int nconfigs = 0;
-       bool has_config = 0;
        struct property *prop;
-       const char *group, *gpio_name;
-       struct device_node *np_config;
 
-       ret = of_property_read_string(np, "ste,function", &function);
+       ret = of_property_read_string(np, "function", &function);
        if (ret >= 0) {
-               ret = of_property_count_strings(np, "ste,pins");
+               const char *group;
+
+               ret = of_property_count_strings(np, "groups");
                if (ret < 0)
                        goto exit;
 
@@ -907,7 +906,7 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
                if (ret < 0)
                        goto exit;
 
-               of_property_for_each_string(np, "ste,pins", prop, group) {
+               of_property_for_each_string(np, "groups", prop, group) {
                        ret = abx500_dt_add_map_mux(map, reserved_maps,
                                        num_maps, group, function);
                        if (ret < 0)
@@ -915,19 +914,12 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
                }
        }
 
-       ret = pinconf_generic_parse_dt_config(np, &configs, &nconfigs);
-       if (nconfigs)
-               has_config = 1;
-       np_config = of_parse_phandle(np, "ste,config", 0);
-       if (np_config) {
-               ret = pinconf_generic_parse_dt_config(np_config, &configs,
-                               &nconfigs);
-               if (ret)
-                       goto exit;
-               has_config |= nconfigs;
-       }
-       if (has_config) {
-               ret = of_property_count_strings(np, "ste,pins");
+       ret = pinconf_generic_parse_dt_config(np, pctldev, &configs, &nconfigs);
+       if (nconfigs) {
+               const char *gpio_name;
+               const char *pin;
+
+               ret = of_property_count_strings(np, "pins");
                if (ret < 0)
                        goto exit;
 
@@ -937,8 +929,8 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
                if (ret < 0)
                        goto exit;
 
-               of_property_for_each_string(np, "ste,pins", prop, group) {
-                       gpio_name = abx500_find_pin_name(pctldev, group);
+               of_property_for_each_string(np, "pins", prop, pin) {
+                       gpio_name = abx500_find_pin_name(pctldev, pin);
 
                        ret = abx500_dt_add_map_configs(map, reserved_maps,
                                        num_maps, gpio_name, configs, 1);
@@ -1112,6 +1104,7 @@ out:
 static const struct pinconf_ops abx500_pinconf_ops = {
        .pin_config_get = abx500_pin_config_get,
        .pin_config_set = abx500_pin_config_set,
+       .is_generic = true,
 };
 
 static struct pinctrl_desc abx500_pinctrl_desc = {
@@ -1285,7 +1278,6 @@ static int abx500_gpio_remove(struct platform_device *pdev)
 static struct platform_driver abx500_gpio_driver = {
        .driver = {
                .name = "abx500-gpio",
-               .owner = THIS_MODULE,
                .of_match_table = abx500_gpio_match,
        },
        .probe = abx500_gpio_probe,