ramips: replace pinctrl property names
[openwrt/openwrt.git] / target / linux / ramips / patches-4.14 / 0025-pinctrl-ralink-add-pinctrl-driver.patch
index a374e01b5935f96697b405f8338515cd49eae2ca..497110bb3772550a95f35a46f075983121afd3de 100644 (file)
@@ -156,8 +156,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +                              struct pinctrl_map **map)
 +{
 +        const char *function;
-+      int func = of_property_read_string(np, "ralink,function", &function);
-+      int grps = of_property_count_strings(np, "ralink,group");
++      int func = of_property_read_string(np, "function", &function);
++      int grps = of_property_count_strings(np, "groups");
 +      int i;
 +
 +      if (func || !grps)
@@ -166,7 +166,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      for (i = 0; i < grps; i++) {
 +              const char *group;
 +
-+              of_property_read_string_index(np, "ralink,group", i, &group);
++              of_property_read_string_index(np, "groups", i, &group);
 +
 +              (*map)->type = PIN_MAP_TYPE_MUX_GROUP;
 +              (*map)->name = function;
@@ -186,7 +186,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      struct device_node *np;
 +
 +      for_each_child_of_node(np_config, np) {
-+              int ret = of_property_count_strings(np, "ralink,group");
++              int ret = of_property_count_strings(np, "groups");
 +
 +              if (ret >= 0)
 +                      max_maps += ret;
@@ -482,7 +482,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +              if (!of_device_is_available(np))
 +                      continue;
 +
-+              ngpio = of_get_property(np, "ralink,nr-gpio", NULL);
++              ngpio = of_get_property(np, "ralink,num-gpios", NULL);
 +              gpiobase = of_get_property(np, "ralink,gpio-base", NULL);
 +              if (!ngpio || !gpiobase) {
 +                      dev_err(&pdev->dev, "failed to load chip info\n");