aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/nomadik
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-09-30 06:10:11 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-10-20 03:08:26 -0400
commit51d39936acba666774b596829277db3e13e5e970 (patch)
treef184ee24c2e21ab500e33d382dd2b29f44b3395a /drivers/pinctrl/nomadik
parent68d41f23ce8d049d05bdd96889d3a2504e7f21f0 (diff)
pinctrl: abx500: force-convert to generic mux bindings
This converts the ABx500 pin controller and all associated device trees to use the standard, generic mux bindings for pin controllers. There are no such device trees deployed in the wild so this is safe to do to set a good example. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nomadik')
-rw-r--r--drivers/pinctrl/nomadik/pinctrl-abx500.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c
index 228972827132..d0c0454dce0d 100644
--- a/drivers/pinctrl/nomadik/pinctrl-abx500.c
+++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c
@@ -893,12 +893,13 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
893 unsigned int nconfigs = 0; 893 unsigned int nconfigs = 0;
894 bool has_config = 0; 894 bool has_config = 0;
895 struct property *prop; 895 struct property *prop;
896 const char *group, *gpio_name;
897 struct device_node *np_config; 896 struct device_node *np_config;
898 897
899 ret = of_property_read_string(np, "ste,function", &function); 898 ret = of_property_read_string(np, "function", &function);
900 if (ret >= 0) { 899 if (ret >= 0) {
901 ret = of_property_count_strings(np, "ste,pins"); 900 const char *group;
901
902 ret = of_property_count_strings(np, "groups");
902 if (ret < 0) 903 if (ret < 0)
903 goto exit; 904 goto exit;
904 905
@@ -907,7 +908,7 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
907 if (ret < 0) 908 if (ret < 0)
908 goto exit; 909 goto exit;
909 910
910 of_property_for_each_string(np, "ste,pins", prop, group) { 911 of_property_for_each_string(np, "groups", prop, group) {
911 ret = abx500_dt_add_map_mux(map, reserved_maps, 912 ret = abx500_dt_add_map_mux(map, reserved_maps,
912 num_maps, group, function); 913 num_maps, group, function);
913 if (ret < 0) 914 if (ret < 0)
@@ -927,6 +928,9 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
927 has_config |= nconfigs; 928 has_config |= nconfigs;
928 } 929 }
929 if (has_config) { 930 if (has_config) {
931 const char *gpio_name;
932 const char *pin;
933
930 ret = of_property_count_strings(np, "ste,pins"); 934 ret = of_property_count_strings(np, "ste,pins");
931 if (ret < 0) 935 if (ret < 0)
932 goto exit; 936 goto exit;
@@ -937,8 +941,8 @@ static int abx500_dt_subnode_to_map(struct pinctrl_dev *pctldev,
937 if (ret < 0) 941 if (ret < 0)
938 goto exit; 942 goto exit;
939 943
940 of_property_for_each_string(np, "ste,pins", prop, group) { 944 of_property_for_each_string(np, "ste,pins", prop, pin) {
941 gpio_name = abx500_find_pin_name(pctldev, group); 945 gpio_name = abx500_find_pin_name(pctldev, pin);
942 946
943 ret = abx500_dt_add_map_configs(map, reserved_maps, 947 ret = abx500_dt_add_map_configs(map, reserved_maps,
944 num_maps, gpio_name, configs, 1); 948 num_maps, gpio_name, configs, 1);