diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-09-03 07:02:56 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-09-04 04:05:07 -0400 |
commit | 03e9f0cac5da6af85758276cb4624caf5911f2b9 (patch) | |
tree | ce79c1a080347a615b82f2805296f3e3091c01c1 /drivers | |
parent | 327455817a92522e669d2d11367e42af5956a8ed (diff) |
pinctrl: clean up after enable refactoring
commit 2243a87d90b42eb38bc281957df3e57c712b5e56
"pinctrl: avoid duplicated calling enable_pinmux_setting for a pin"
removed the .disable callback from the struct pinmux_ops,
making the .enable() callback the only remaining callback.
However .enable() is a bad name as it seems to imply that a
muxing can also be disabled. Rename the callback to .set_mux()
and also take this opportunity to clean out any remaining
mentions of .disable() from the documentation.
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Fan Wu <fwu@marvell.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
32 files changed, 105 insertions, 99 deletions
diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c index 86db2235ab00..61f1bf0e60ba 100644 --- a/drivers/pinctrl/berlin/berlin.c +++ b/drivers/pinctrl/berlin/berlin.c | |||
@@ -170,9 +170,9 @@ berlin_pinctrl_find_function_by_name(struct berlin_pinctrl *pctrl, | |||
170 | return NULL; | 170 | return NULL; |
171 | } | 171 | } |
172 | 172 | ||
173 | static int berlin_pinmux_enable(struct pinctrl_dev *pctrl_dev, | 173 | static int berlin_pinmux_set(struct pinctrl_dev *pctrl_dev, |
174 | unsigned function, | 174 | unsigned function, |
175 | unsigned group) | 175 | unsigned group) |
176 | { | 176 | { |
177 | struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); | 177 | struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); |
178 | const struct berlin_desc_group *group_desc = pctrl->desc->groups + group; | 178 | const struct berlin_desc_group *group_desc = pctrl->desc->groups + group; |
@@ -197,7 +197,7 @@ static const struct pinmux_ops berlin_pinmux_ops = { | |||
197 | .get_functions_count = &berlin_pinmux_get_functions_count, | 197 | .get_functions_count = &berlin_pinmux_get_functions_count, |
198 | .get_function_name = &berlin_pinmux_get_function_name, | 198 | .get_function_name = &berlin_pinmux_get_function_name, |
199 | .get_function_groups = &berlin_pinmux_get_function_groups, | 199 | .get_function_groups = &berlin_pinmux_get_function_groups, |
200 | .enable = &berlin_pinmux_enable, | 200 | .set_mux = &berlin_pinmux_set, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl, | 203 | static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl, |
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index 9908374f8f92..f3b426cdaf8f 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c | |||
@@ -259,8 +259,8 @@ static int mvebu_pinmux_get_groups(struct pinctrl_dev *pctldev, unsigned fid, | |||
259 | return 0; | 259 | return 0; |
260 | } | 260 | } |
261 | 261 | ||
262 | static int mvebu_pinmux_enable(struct pinctrl_dev *pctldev, unsigned fid, | 262 | static int mvebu_pinmux_set(struct pinctrl_dev *pctldev, unsigned fid, |
263 | unsigned gid) | 263 | unsigned gid) |
264 | { | 264 | { |
265 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | 265 | struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); |
266 | struct mvebu_pinctrl_function *func = &pctl->functions[fid]; | 266 | struct mvebu_pinctrl_function *func = &pctl->functions[fid]; |
@@ -344,7 +344,7 @@ static const struct pinmux_ops mvebu_pinmux_ops = { | |||
344 | .get_function_groups = mvebu_pinmux_get_groups, | 344 | .get_function_groups = mvebu_pinmux_get_groups, |
345 | .gpio_request_enable = mvebu_pinmux_gpio_request_enable, | 345 | .gpio_request_enable = mvebu_pinmux_gpio_request_enable, |
346 | .gpio_set_direction = mvebu_pinmux_gpio_set_direction, | 346 | .gpio_set_direction = mvebu_pinmux_gpio_set_direction, |
347 | .enable = mvebu_pinmux_enable, | 347 | .set_mux = mvebu_pinmux_set, |
348 | }; | 348 | }; |
349 | 349 | ||
350 | static int mvebu_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) | 350 | static int mvebu_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) |
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c index a53a689a2bfa..b0289824cf73 100644 --- a/drivers/pinctrl/nomadik/pinctrl-abx500.c +++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c | |||
@@ -709,8 +709,8 @@ static int abx500_pmx_get_func_groups(struct pinctrl_dev *pctldev, | |||
709 | return 0; | 709 | return 0; |
710 | } | 710 | } |
711 | 711 | ||
712 | static int abx500_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, | 712 | static int abx500_pmx_set(struct pinctrl_dev *pctldev, unsigned function, |
713 | unsigned group) | 713 | unsigned group) |
714 | { | 714 | { |
715 | struct abx500_pinctrl *pct = pinctrl_dev_get_drvdata(pctldev); | 715 | struct abx500_pinctrl *pct = pinctrl_dev_get_drvdata(pctldev); |
716 | struct gpio_chip *chip = &pct->chip; | 716 | struct gpio_chip *chip = &pct->chip; |
@@ -784,7 +784,7 @@ static const struct pinmux_ops abx500_pinmux_ops = { | |||
784 | .get_functions_count = abx500_pmx_get_funcs_cnt, | 784 | .get_functions_count = abx500_pmx_get_funcs_cnt, |
785 | .get_function_name = abx500_pmx_get_func_name, | 785 | .get_function_name = abx500_pmx_get_func_name, |
786 | .get_function_groups = abx500_pmx_get_func_groups, | 786 | .get_function_groups = abx500_pmx_get_func_groups, |
787 | .enable = abx500_pmx_enable, | 787 | .set_mux = abx500_pmx_set, |
788 | .gpio_request_enable = abx500_gpio_request_enable, | 788 | .gpio_request_enable = abx500_gpio_request_enable, |
789 | .gpio_disable_free = abx500_gpio_disable_free, | 789 | .gpio_disable_free = abx500_gpio_disable_free, |
790 | }; | 790 | }; |
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index e7cab07eef47..c093d75a022a 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c | |||
@@ -1647,8 +1647,8 @@ static int nmk_pmx_get_func_groups(struct pinctrl_dev *pctldev, | |||
1647 | return 0; | 1647 | return 0; |
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | static int nmk_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, | 1650 | static int nmk_pmx_set(struct pinctrl_dev *pctldev, unsigned function, |
1651 | unsigned group) | 1651 | unsigned group) |
1652 | { | 1652 | { |
1653 | struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); | 1653 | struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); |
1654 | const struct nmk_pingroup *g; | 1654 | const struct nmk_pingroup *g; |
@@ -1810,7 +1810,7 @@ static const struct pinmux_ops nmk_pinmux_ops = { | |||
1810 | .get_functions_count = nmk_pmx_get_funcs_cnt, | 1810 | .get_functions_count = nmk_pmx_get_funcs_cnt, |
1811 | .get_function_name = nmk_pmx_get_func_name, | 1811 | .get_function_name = nmk_pmx_get_func_name, |
1812 | .get_function_groups = nmk_pmx_get_func_groups, | 1812 | .get_function_groups = nmk_pmx_get_func_groups, |
1813 | .enable = nmk_pmx_enable, | 1813 | .set_mux = nmk_pmx_set, |
1814 | .gpio_request_enable = nmk_gpio_request_enable, | 1814 | .gpio_request_enable = nmk_gpio_request_enable, |
1815 | .gpio_disable_free = nmk_gpio_disable_free, | 1815 | .gpio_disable_free = nmk_gpio_disable_free, |
1816 | }; | 1816 | }; |
diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c index b092b93c67a1..e02943b0285d 100644 --- a/drivers/pinctrl/pinctrl-adi2.c +++ b/drivers/pinctrl/pinctrl-adi2.c | |||
@@ -619,8 +619,8 @@ static struct pinctrl_ops adi_pctrl_ops = { | |||
619 | .get_group_pins = adi_get_group_pins, | 619 | .get_group_pins = adi_get_group_pins, |
620 | }; | 620 | }; |
621 | 621 | ||
622 | static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned func_id, | 622 | static int adi_pinmux_set(struct pinctrl_dev *pctldev, unsigned func_id, |
623 | unsigned group_id) | 623 | unsigned group_id) |
624 | { | 624 | { |
625 | struct adi_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev); | 625 | struct adi_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev); |
626 | struct gpio_port *port; | 626 | struct gpio_port *port; |
@@ -698,7 +698,7 @@ static int adi_pinmux_request_gpio(struct pinctrl_dev *pctldev, | |||
698 | } | 698 | } |
699 | 699 | ||
700 | static struct pinmux_ops adi_pinmux_ops = { | 700 | static struct pinmux_ops adi_pinmux_ops = { |
701 | .enable = adi_pinmux_enable, | 701 | .set_mux = adi_pinmux_set, |
702 | .get_functions_count = adi_pinmux_get_funcs_count, | 702 | .get_functions_count = adi_pinmux_get_funcs_count, |
703 | .get_function_name = adi_pinmux_get_func_name, | 703 | .get_function_name = adi_pinmux_get_func_name, |
704 | .get_function_groups = adi_pinmux_get_groups, | 704 | .get_function_groups = adi_pinmux_get_groups, |
diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3722.c index 0e4ec91f4d49..1f790a4b83fe 100644 --- a/drivers/pinctrl/pinctrl-as3722.c +++ b/drivers/pinctrl/pinctrl-as3722.c | |||
@@ -230,7 +230,7 @@ static int as3722_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, | |||
230 | return 0; | 230 | return 0; |
231 | } | 231 | } |
232 | 232 | ||
233 | static int as3722_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, | 233 | static int as3722_pinctrl_set(struct pinctrl_dev *pctldev, unsigned function, |
234 | unsigned group) | 234 | unsigned group) |
235 | { | 235 | { |
236 | struct as3722_pctrl_info *as_pci = pinctrl_dev_get_drvdata(pctldev); | 236 | struct as3722_pctrl_info *as_pci = pinctrl_dev_get_drvdata(pctldev); |
@@ -327,7 +327,7 @@ static const struct pinmux_ops as3722_pinmux_ops = { | |||
327 | .get_functions_count = as3722_pinctrl_get_funcs_count, | 327 | .get_functions_count = as3722_pinctrl_get_funcs_count, |
328 | .get_function_name = as3722_pinctrl_get_func_name, | 328 | .get_function_name = as3722_pinctrl_get_func_name, |
329 | .get_function_groups = as3722_pinctrl_get_func_groups, | 329 | .get_function_groups = as3722_pinctrl_get_func_groups, |
330 | .enable = as3722_pinctrl_enable, | 330 | .set_mux = as3722_pinctrl_set, |
331 | .gpio_request_enable = as3722_pinctrl_gpio_request_enable, | 331 | .gpio_request_enable = as3722_pinctrl_gpio_request_enable, |
332 | .gpio_set_direction = as3722_pinctrl_gpio_set_direction, | 332 | .gpio_set_direction = as3722_pinctrl_gpio_set_direction, |
333 | }; | 333 | }; |
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index af1ba4fc150d..4839c36a3a1c 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c | |||
@@ -554,8 +554,8 @@ static void at91_mux_gpio_enable(void __iomem *pio, unsigned mask, bool input) | |||
554 | writel_relaxed(mask, pio + (input ? PIO_ODR : PIO_OER)); | 554 | writel_relaxed(mask, pio + (input ? PIO_ODR : PIO_OER)); |
555 | } | 555 | } |
556 | 556 | ||
557 | static int at91_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, | 557 | static int at91_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, |
558 | unsigned group) | 558 | unsigned group) |
559 | { | 559 | { |
560 | struct at91_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); | 560 | struct at91_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); |
561 | const struct at91_pmx_pin *pins_conf = info->groups[group].pins_conf; | 561 | const struct at91_pmx_pin *pins_conf = info->groups[group].pins_conf; |
@@ -684,7 +684,7 @@ static const struct pinmux_ops at91_pmx_ops = { | |||
684 | .get_functions_count = at91_pmx_get_funcs_count, | 684 | .get_functions_count = at91_pmx_get_funcs_count, |
685 | .get_function_name = at91_pmx_get_func_name, | 685 | .get_function_name = at91_pmx_get_func_name, |
686 | .get_function_groups = at91_pmx_get_groups, | 686 | .get_function_groups = at91_pmx_get_groups, |
687 | .enable = at91_pmx_enable, | 687 | .set_mux = at91_pmx_set, |
688 | .gpio_request_enable = at91_gpio_request_enable, | 688 | .gpio_request_enable = at91_gpio_request_enable, |
689 | .gpio_disable_free = at91_gpio_disable_free, | 689 | .gpio_disable_free = at91_gpio_disable_free, |
690 | }; | 690 | }; |
diff --git a/drivers/pinctrl/pinctrl-bcm281xx.c b/drivers/pinctrl/pinctrl-bcm281xx.c index c5ca9e633fff..a26e0c2ba33e 100644 --- a/drivers/pinctrl/pinctrl-bcm281xx.c +++ b/drivers/pinctrl/pinctrl-bcm281xx.c | |||
@@ -1055,9 +1055,9 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev, | |||
1055 | return 0; | 1055 | return 0; |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | static int bcm281xx_pinmux_enable(struct pinctrl_dev *pctldev, | 1058 | static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev, |
1059 | unsigned function, | 1059 | unsigned function, |
1060 | unsigned group) | 1060 | unsigned group) |
1061 | { | 1061 | { |
1062 | struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); | 1062 | struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); |
1063 | const struct bcm281xx_pin_function *f = &pdata->functions[function]; | 1063 | const struct bcm281xx_pin_function *f = &pdata->functions[function]; |
@@ -1084,7 +1084,7 @@ static struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = { | |||
1084 | .get_functions_count = bcm281xx_pinctrl_get_fcns_count, | 1084 | .get_functions_count = bcm281xx_pinctrl_get_fcns_count, |
1085 | .get_function_name = bcm281xx_pinctrl_get_fcn_name, | 1085 | .get_function_name = bcm281xx_pinctrl_get_fcn_name, |
1086 | .get_function_groups = bcm281xx_pinctrl_get_fcn_groups, | 1086 | .get_function_groups = bcm281xx_pinctrl_get_fcn_groups, |
1087 | .enable = bcm281xx_pinmux_enable, | 1087 | .set_mux = bcm281xx_pinmux_set, |
1088 | }; | 1088 | }; |
1089 | 1089 | ||
1090 | static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev, | 1090 | static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev, |
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c index 5bcfd7ace0cd..eabba02f71f9 100644 --- a/drivers/pinctrl/pinctrl-bcm2835.c +++ b/drivers/pinctrl/pinctrl-bcm2835.c | |||
@@ -830,7 +830,7 @@ static int bcm2835_pmx_get_function_groups(struct pinctrl_dev *pctldev, | |||
830 | return 0; | 830 | return 0; |
831 | } | 831 | } |
832 | 832 | ||
833 | static int bcm2835_pmx_enable(struct pinctrl_dev *pctldev, | 833 | static int bcm2835_pmx_set(struct pinctrl_dev *pctldev, |
834 | unsigned func_selector, | 834 | unsigned func_selector, |
835 | unsigned group_selector) | 835 | unsigned group_selector) |
836 | { | 836 | { |
@@ -869,7 +869,7 @@ static const struct pinmux_ops bcm2835_pmx_ops = { | |||
869 | .get_functions_count = bcm2835_pmx_get_functions_count, | 869 | .get_functions_count = bcm2835_pmx_get_functions_count, |
870 | .get_function_name = bcm2835_pmx_get_function_name, | 870 | .get_function_name = bcm2835_pmx_get_function_name, |
871 | .get_function_groups = bcm2835_pmx_get_function_groups, | 871 | .get_function_groups = bcm2835_pmx_get_function_groups, |
872 | .enable = bcm2835_pmx_enable, | 872 | .set_mux = bcm2835_pmx_set, |
873 | .gpio_disable_free = bcm2835_pmx_gpio_disable_free, | 873 | .gpio_disable_free = bcm2835_pmx_gpio_disable_free, |
874 | .gpio_set_direction = bcm2835_pmx_gpio_set_direction, | 874 | .gpio_set_direction = bcm2835_pmx_gpio_set_direction, |
875 | }; | 875 | }; |
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c index 946d594a64dd..570e5acb4a6a 100644 --- a/drivers/pinctrl/pinctrl-imx.c +++ b/drivers/pinctrl/pinctrl-imx.c | |||
@@ -179,8 +179,8 @@ static const struct pinctrl_ops imx_pctrl_ops = { | |||
179 | 179 | ||
180 | }; | 180 | }; |
181 | 181 | ||
182 | static int imx_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, | 182 | static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, |
183 | unsigned group) | 183 | unsigned group) |
184 | { | 184 | { |
185 | struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); | 185 | struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); |
186 | const struct imx_pinctrl_soc_info *info = ipctl->info; | 186 | const struct imx_pinctrl_soc_info *info = ipctl->info; |
@@ -298,7 +298,7 @@ static const struct pinmux_ops imx_pmx_ops = { | |||
298 | .get_functions_count = imx_pmx_get_funcs_count, | 298 | .get_functions_count = imx_pmx_get_funcs_count, |
299 | .get_function_name = imx_pmx_get_func_name, | 299 | .get_function_name = imx_pmx_get_func_name, |
300 | .get_function_groups = imx_pmx_get_groups, | 300 | .get_function_groups = imx_pmx_get_groups, |
301 | .enable = imx_pmx_enable, | 301 | .set_mux = imx_pmx_set, |
302 | }; | 302 | }; |
303 | 303 | ||
304 | static int imx_pinconf_get(struct pinctrl_dev *pctldev, | 304 | static int imx_pinconf_get(struct pinctrl_dev *pctldev, |
diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c index 483420757c9f..176a3e62f1cf 100644 --- a/drivers/pinctrl/pinctrl-imx1-core.c +++ b/drivers/pinctrl/pinctrl-imx1-core.c | |||
@@ -298,8 +298,8 @@ static const struct pinctrl_ops imx1_pctrl_ops = { | |||
298 | 298 | ||
299 | }; | 299 | }; |
300 | 300 | ||
301 | static int imx1_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, | 301 | static int imx1_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, |
302 | unsigned group) | 302 | unsigned group) |
303 | { | 303 | { |
304 | struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); | 304 | struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); |
305 | const struct imx1_pinctrl_soc_info *info = ipctl->info; | 305 | const struct imx1_pinctrl_soc_info *info = ipctl->info; |
@@ -385,7 +385,7 @@ static const struct pinmux_ops imx1_pmx_ops = { | |||
385 | .get_functions_count = imx1_pmx_get_funcs_count, | 385 | .get_functions_count = imx1_pmx_get_funcs_count, |
386 | .get_function_name = imx1_pmx_get_func_name, | 386 | .get_function_name = imx1_pmx_get_func_name, |
387 | .get_function_groups = imx1_pmx_get_groups, | 387 | .get_function_groups = imx1_pmx_get_groups, |
388 | .enable = imx1_pmx_enable, | 388 | .set_mux = imx1_pmx_set, |
389 | }; | 389 | }; |
390 | 390 | ||
391 | static int imx1_pinconf_get(struct pinctrl_dev *pctldev, | 391 | static int imx1_pinconf_get(struct pinctrl_dev *pctldev, |
diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c index d22ca252b80d..296e5b37f768 100644 --- a/drivers/pinctrl/pinctrl-lantiq.c +++ b/drivers/pinctrl/pinctrl-lantiq.c | |||
@@ -257,9 +257,9 @@ static int match_group_mux(const struct ltq_pin_group *grp, | |||
257 | return ret; | 257 | return ret; |
258 | } | 258 | } |
259 | 259 | ||
260 | static int ltq_pmx_enable(struct pinctrl_dev *pctrldev, | 260 | static int ltq_pmx_set(struct pinctrl_dev *pctrldev, |
261 | unsigned func, | 261 | unsigned func, |
262 | unsigned group) | 262 | unsigned group) |
263 | { | 263 | { |
264 | struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev); | 264 | struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev); |
265 | const struct ltq_pin_group *pin_grp = &info->grps[group]; | 265 | const struct ltq_pin_group *pin_grp = &info->grps[group]; |
@@ -316,7 +316,7 @@ static const struct pinmux_ops ltq_pmx_ops = { | |||
316 | .get_functions_count = ltq_pmx_func_count, | 316 | .get_functions_count = ltq_pmx_func_count, |
317 | .get_function_name = ltq_pmx_func_name, | 317 | .get_function_name = ltq_pmx_func_name, |
318 | .get_function_groups = ltq_pmx_get_groups, | 318 | .get_function_groups = ltq_pmx_get_groups, |
319 | .enable = ltq_pmx_enable, | 319 | .set_mux = ltq_pmx_set, |
320 | .gpio_request_enable = ltq_pmx_gpio_request_enable, | 320 | .gpio_request_enable = ltq_pmx_gpio_request_enable, |
321 | }; | 321 | }; |
322 | 322 | ||
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c index 40c76f26998c..67035091f8fd 100644 --- a/drivers/pinctrl/pinctrl-mxs.c +++ b/drivers/pinctrl/pinctrl-mxs.c | |||
@@ -195,8 +195,8 @@ static int mxs_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, | |||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | static int mxs_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned selector, | 198 | static int mxs_pinctrl_set_mux(struct pinctrl_dev *pctldev, unsigned selector, |
199 | unsigned group) | 199 | unsigned group) |
200 | { | 200 | { |
201 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); | 201 | struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); |
202 | struct mxs_group *g = &d->soc->groups[group]; | 202 | struct mxs_group *g = &d->soc->groups[group]; |
@@ -223,7 +223,7 @@ static const struct pinmux_ops mxs_pinmux_ops = { | |||
223 | .get_functions_count = mxs_pinctrl_get_funcs_count, | 223 | .get_functions_count = mxs_pinctrl_get_funcs_count, |
224 | .get_function_name = mxs_pinctrl_get_func_name, | 224 | .get_function_name = mxs_pinctrl_get_func_name, |
225 | .get_function_groups = mxs_pinctrl_get_func_groups, | 225 | .get_function_groups = mxs_pinctrl_get_func_groups, |
226 | .enable = mxs_pinctrl_enable, | 226 | .set_mux = mxs_pinctrl_set_mux, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static int mxs_pinconf_get(struct pinctrl_dev *pctldev, | 229 | static int mxs_pinconf_get(struct pinctrl_dev *pctldev, |
diff --git a/drivers/pinctrl/pinctrl-palmas.c b/drivers/pinctrl/pinctrl-palmas.c index f13d0e78a41c..e3079d3d19fe 100644 --- a/drivers/pinctrl/pinctrl-palmas.c +++ b/drivers/pinctrl/pinctrl-palmas.c | |||
@@ -685,7 +685,8 @@ static int palmas_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, | |||
685 | return 0; | 685 | return 0; |
686 | } | 686 | } |
687 | 687 | ||
688 | static int palmas_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, | 688 | static int palmas_pinctrl_set_mux(struct pinctrl_dev *pctldev, |
689 | unsigned function, | ||
689 | unsigned group) | 690 | unsigned group) |
690 | { | 691 | { |
691 | struct palmas_pctrl_chip_info *pci = pinctrl_dev_get_drvdata(pctldev); | 692 | struct palmas_pctrl_chip_info *pci = pinctrl_dev_get_drvdata(pctldev); |
@@ -742,7 +743,7 @@ static const struct pinmux_ops palmas_pinmux_ops = { | |||
742 | .get_functions_count = palmas_pinctrl_get_funcs_count, | 743 | .get_functions_count = palmas_pinctrl_get_funcs_count, |
743 | .get_function_name = palmas_pinctrl_get_func_name, | 744 | .get_function_name = palmas_pinctrl_get_func_name, |
744 | .get_function_groups = palmas_pinctrl_get_func_groups, | 745 | .get_function_groups = palmas_pinctrl_get_func_groups, |
745 | .enable = palmas_pinctrl_enable, | 746 | .set_mux = palmas_pinctrl_set_mux, |
746 | }; | 747 | }; |
747 | 748 | ||
748 | static int palmas_pinconf_get(struct pinctrl_dev *pctldev, | 749 | static int palmas_pinconf_get(struct pinctrl_dev *pctldev, |
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 5e8b2e04cd7a..b91b966add8f 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c | |||
@@ -813,8 +813,8 @@ static int rockchip_pmx_get_groups(struct pinctrl_dev *pctldev, | |||
813 | return 0; | 813 | return 0; |
814 | } | 814 | } |
815 | 815 | ||
816 | static int rockchip_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, | 816 | static int rockchip_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, |
817 | unsigned group) | 817 | unsigned group) |
818 | { | 818 | { |
819 | struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); | 819 | struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); |
820 | const unsigned int *pins = info->groups[group].pins; | 820 | const unsigned int *pins = info->groups[group].pins; |
@@ -889,7 +889,7 @@ static const struct pinmux_ops rockchip_pmx_ops = { | |||
889 | .get_functions_count = rockchip_pmx_get_funcs_count, | 889 | .get_functions_count = rockchip_pmx_get_funcs_count, |
890 | .get_function_name = rockchip_pmx_get_func_name, | 890 | .get_function_name = rockchip_pmx_get_func_name, |
891 | .get_function_groups = rockchip_pmx_get_groups, | 891 | .get_function_groups = rockchip_pmx_get_groups, |
892 | .enable = rockchip_pmx_enable, | 892 | .set_mux = rockchip_pmx_set, |
893 | .gpio_set_direction = rockchip_pmx_gpio_set_direction, | 893 | .gpio_set_direction = rockchip_pmx_gpio_set_direction, |
894 | }; | 894 | }; |
895 | 895 | ||
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 784de13facf3..9032422ad18f 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c | |||
@@ -447,7 +447,7 @@ static int pcs_get_function(struct pinctrl_dev *pctldev, unsigned pin, | |||
447 | return 0; | 447 | return 0; |
448 | } | 448 | } |
449 | 449 | ||
450 | static int pcs_enable(struct pinctrl_dev *pctldev, unsigned fselector, | 450 | static int pcs_set_mux(struct pinctrl_dev *pctldev, unsigned fselector, |
451 | unsigned group) | 451 | unsigned group) |
452 | { | 452 | { |
453 | struct pcs_device *pcs; | 453 | struct pcs_device *pcs; |
@@ -519,7 +519,7 @@ static const struct pinmux_ops pcs_pinmux_ops = { | |||
519 | .get_functions_count = pcs_get_functions_count, | 519 | .get_functions_count = pcs_get_functions_count, |
520 | .get_function_name = pcs_get_function_name, | 520 | .get_function_name = pcs_get_function_name, |
521 | .get_function_groups = pcs_get_function_groups, | 521 | .get_function_groups = pcs_get_function_groups, |
522 | .enable = pcs_enable, | 522 | .set_mux = pcs_sex_mux, |
523 | .gpio_request_enable = pcs_request_gpio, | 523 | .gpio_request_enable = pcs_request_gpio, |
524 | }; | 524 | }; |
525 | 525 | ||
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 5475374d803f..6c4c41bed1e3 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c | |||
@@ -914,8 +914,8 @@ static struct st_pio_control *st_get_pio_control( | |||
914 | return &bank->pc; | 914 | return &bank->pc; |
915 | } | 915 | } |
916 | 916 | ||
917 | static int st_pmx_enable(struct pinctrl_dev *pctldev, unsigned fselector, | 917 | static int st_pmx_set_mux(struct pinctrl_dev *pctldev, unsigned fselector, |
918 | unsigned group) | 918 | unsigned group) |
919 | { | 919 | { |
920 | struct st_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); | 920 | struct st_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); |
921 | struct st_pinconf *conf = info->groups[group].pin_conf; | 921 | struct st_pinconf *conf = info->groups[group].pin_conf; |
@@ -951,7 +951,7 @@ static struct pinmux_ops st_pmxops = { | |||
951 | .get_functions_count = st_pmx_get_funcs_count, | 951 | .get_functions_count = st_pmx_get_funcs_count, |
952 | .get_function_name = st_pmx_get_fname, | 952 | .get_function_name = st_pmx_get_fname, |
953 | .get_function_groups = st_pmx_get_groups, | 953 | .get_function_groups = st_pmx_get_groups, |
954 | .enable = st_pmx_enable, | 954 | .set_mux = st_pmx_set_mux, |
955 | .gpio_set_direction = st_pmx_set_gpio_direction, | 955 | .gpio_set_direction = st_pmx_set_gpio_direction, |
956 | }; | 956 | }; |
957 | 957 | ||
diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c index 71c5d4f0c538..3b9bfcf717ac 100644 --- a/drivers/pinctrl/pinctrl-tb10x.c +++ b/drivers/pinctrl/pinctrl-tb10x.c | |||
@@ -697,7 +697,7 @@ static void tb10x_gpio_disable_free(struct pinctrl_dev *pctl, | |||
697 | mutex_unlock(&state->mutex); | 697 | mutex_unlock(&state->mutex); |
698 | } | 698 | } |
699 | 699 | ||
700 | static int tb10x_pctl_enable(struct pinctrl_dev *pctl, | 700 | static int tb10x_pctl_set_mux(struct pinctrl_dev *pctl, |
701 | unsigned func_selector, unsigned group_selector) | 701 | unsigned func_selector, unsigned group_selector) |
702 | { | 702 | { |
703 | struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); | 703 | struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); |
@@ -744,7 +744,7 @@ static struct pinmux_ops tb10x_pinmux_ops = { | |||
744 | .get_function_groups = tb10x_get_function_groups, | 744 | .get_function_groups = tb10x_get_function_groups, |
745 | .gpio_request_enable = tb10x_gpio_request_enable, | 745 | .gpio_request_enable = tb10x_gpio_request_enable, |
746 | .gpio_disable_free = tb10x_gpio_disable_free, | 746 | .gpio_disable_free = tb10x_gpio_disable_free, |
747 | .enable = tb10x_pctl_enable, | 747 | .set_mux = tb10x_pctl_set_mux, |
748 | }; | 748 | }; |
749 | 749 | ||
750 | static struct pinctrl_desc tb10x_pindesc = { | 750 | static struct pinctrl_desc tb10x_pindesc = { |
diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c b/drivers/pinctrl/pinctrl-tegra-xusb.c index a06620474845..4648c9e5c582 100644 --- a/drivers/pinctrl/pinctrl-tegra-xusb.c +++ b/drivers/pinctrl/pinctrl-tegra-xusb.c | |||
@@ -281,9 +281,9 @@ static int tegra_xusb_padctl_get_function_groups(struct pinctrl_dev *pinctrl, | |||
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | 283 | ||
284 | static int tegra_xusb_padctl_pinmux_enable(struct pinctrl_dev *pinctrl, | 284 | static int tegra_xusb_padctl_pinmux_set(struct pinctrl_dev *pinctrl, |
285 | unsigned int function, | 285 | unsigned int function, |
286 | unsigned int group) | 286 | unsigned int group) |
287 | { | 287 | { |
288 | struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl); | 288 | struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl); |
289 | const struct tegra_xusb_padctl_lane *lane; | 289 | const struct tegra_xusb_padctl_lane *lane; |
@@ -311,7 +311,7 @@ static const struct pinmux_ops tegra_xusb_padctl_pinmux_ops = { | |||
311 | .get_functions_count = tegra_xusb_padctl_get_functions_count, | 311 | .get_functions_count = tegra_xusb_padctl_get_functions_count, |
312 | .get_function_name = tegra_xusb_padctl_get_function_name, | 312 | .get_function_name = tegra_xusb_padctl_get_function_name, |
313 | .get_function_groups = tegra_xusb_padctl_get_function_groups, | 313 | .get_function_groups = tegra_xusb_padctl_get_function_groups, |
314 | .enable = tegra_xusb_padctl_pinmux_enable, | 314 | .set_mux = tegra_xusb_padctl_pinmux_set, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl, | 317 | static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl, |
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c index 150af5503c09..e5949d51bc52 100644 --- a/drivers/pinctrl/pinctrl-tegra.c +++ b/drivers/pinctrl/pinctrl-tegra.c | |||
@@ -262,8 +262,9 @@ static int tegra_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, | |||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | 264 | ||
265 | static int tegra_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, | 265 | static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev, |
266 | unsigned group) | 266 | unsigned function, |
267 | unsigned group) | ||
267 | { | 268 | { |
268 | struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); | 269 | struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); |
269 | const struct tegra_pingroup *g; | 270 | const struct tegra_pingroup *g; |
@@ -294,7 +295,7 @@ static const struct pinmux_ops tegra_pinmux_ops = { | |||
294 | .get_functions_count = tegra_pinctrl_get_funcs_count, | 295 | .get_functions_count = tegra_pinctrl_get_funcs_count, |
295 | .get_function_name = tegra_pinctrl_get_func_name, | 296 | .get_function_name = tegra_pinctrl_get_func_name, |
296 | .get_function_groups = tegra_pinctrl_get_func_groups, | 297 | .get_function_groups = tegra_pinctrl_get_func_groups, |
297 | .enable = tegra_pinctrl_enable, | 298 | .set_mux = tegra_pinctrl_set_mux, |
298 | }; | 299 | }; |
299 | 300 | ||
300 | static int tegra_pinconf_reg(struct tegra_pmx *pmx, | 301 | static int tegra_pinconf_reg(struct tegra_pmx *pmx, |
diff --git a/drivers/pinctrl/pinctrl-tz1090-pdc.c b/drivers/pinctrl/pinctrl-tz1090-pdc.c index 41e81a35cabb..3bb6a3b78864 100644 --- a/drivers/pinctrl/pinctrl-tz1090-pdc.c +++ b/drivers/pinctrl/pinctrl-tz1090-pdc.c | |||
@@ -547,8 +547,9 @@ static void tz1090_pdc_pinctrl_mux(struct tz1090_pdc_pmx *pmx, | |||
547 | __global_unlock2(flags); | 547 | __global_unlock2(flags); |
548 | } | 548 | } |
549 | 549 | ||
550 | static int tz1090_pdc_pinctrl_enable(struct pinctrl_dev *pctldev, | 550 | static int tz1090_pdc_pinctrl_set_mux(struct pinctrl_dev *pctldev, |
551 | unsigned int function, unsigned int group) | 551 | unsigned int function, |
552 | unsigned int group) | ||
552 | { | 553 | { |
553 | struct tz1090_pdc_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); | 554 | struct tz1090_pdc_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); |
554 | const struct tz1090_pdc_pingroup *grp = &tz1090_pdc_groups[group]; | 555 | const struct tz1090_pdc_pingroup *grp = &tz1090_pdc_groups[group]; |
@@ -634,7 +635,7 @@ static struct pinmux_ops tz1090_pdc_pinmux_ops = { | |||
634 | .get_functions_count = tz1090_pdc_pinctrl_get_funcs_count, | 635 | .get_functions_count = tz1090_pdc_pinctrl_get_funcs_count, |
635 | .get_function_name = tz1090_pdc_pinctrl_get_func_name, | 636 | .get_function_name = tz1090_pdc_pinctrl_get_func_name, |
636 | .get_function_groups = tz1090_pdc_pinctrl_get_func_groups, | 637 | .get_function_groups = tz1090_pdc_pinctrl_get_func_groups, |
637 | .enable = tz1090_pdc_pinctrl_enable, | 638 | .set_mux = tz1090_pdc_pinctrl_set_mux, |
638 | .gpio_request_enable = tz1090_pdc_pinctrl_gpio_request_enable, | 639 | .gpio_request_enable = tz1090_pdc_pinctrl_gpio_request_enable, |
639 | .gpio_disable_free = tz1090_pdc_pinctrl_gpio_disable_free, | 640 | .gpio_disable_free = tz1090_pdc_pinctrl_gpio_disable_free, |
640 | }; | 641 | }; |
diff --git a/drivers/pinctrl/pinctrl-tz1090.c b/drivers/pinctrl/pinctrl-tz1090.c index 24082216842e..48d36413b99f 100644 --- a/drivers/pinctrl/pinctrl-tz1090.c +++ b/drivers/pinctrl/pinctrl-tz1090.c | |||
@@ -1415,8 +1415,8 @@ found_mux: | |||
1415 | * the effect is the same as enabling the function on each individual pin in the | 1415 | * the effect is the same as enabling the function on each individual pin in the |
1416 | * group. | 1416 | * group. |
1417 | */ | 1417 | */ |
1418 | static int tz1090_pinctrl_enable(struct pinctrl_dev *pctldev, | 1418 | static int tz1090_pinctrl_set_mux(struct pinctrl_dev *pctldev, |
1419 | unsigned int function, unsigned int group) | 1419 | unsigned int function, unsigned int group) |
1420 | { | 1420 | { |
1421 | struct tz1090_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); | 1421 | struct tz1090_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); |
1422 | struct tz1090_pingroup *grp; | 1422 | struct tz1090_pingroup *grp; |
@@ -1517,7 +1517,7 @@ static struct pinmux_ops tz1090_pinmux_ops = { | |||
1517 | .get_functions_count = tz1090_pinctrl_get_funcs_count, | 1517 | .get_functions_count = tz1090_pinctrl_get_funcs_count, |
1518 | .get_function_name = tz1090_pinctrl_get_func_name, | 1518 | .get_function_name = tz1090_pinctrl_get_func_name, |
1519 | .get_function_groups = tz1090_pinctrl_get_func_groups, | 1519 | .get_function_groups = tz1090_pinctrl_get_func_groups, |
1520 | .enable = tz1090_pinctrl_enable, | 1520 | .set_mux = tz1090_pinctrl_set_mux, |
1521 | .gpio_request_enable = tz1090_pinctrl_gpio_request_enable, | 1521 | .gpio_request_enable = tz1090_pinctrl_gpio_request_enable, |
1522 | .gpio_disable_free = tz1090_pinctrl_gpio_disable_free, | 1522 | .gpio_disable_free = tz1090_pinctrl_gpio_disable_free, |
1523 | }; | 1523 | }; |
diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c index 0959bb36450f..e9c7113d81f2 100644 --- a/drivers/pinctrl/pinctrl-u300.c +++ b/drivers/pinctrl/pinctrl-u300.c | |||
@@ -955,8 +955,8 @@ static void u300_pmx_endisable(struct u300_pmx *upmx, unsigned selector, | |||
955 | } | 955 | } |
956 | } | 956 | } |
957 | 957 | ||
958 | static int u300_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, | 958 | static int u300_pmx_set_mux(struct pinctrl_dev *pctldev, unsigned selector, |
959 | unsigned group) | 959 | unsigned group) |
960 | { | 960 | { |
961 | struct u300_pmx *upmx; | 961 | struct u300_pmx *upmx; |
962 | 962 | ||
@@ -994,7 +994,7 @@ static const struct pinmux_ops u300_pmx_ops = { | |||
994 | .get_functions_count = u300_pmx_get_funcs_count, | 994 | .get_functions_count = u300_pmx_get_funcs_count, |
995 | .get_function_name = u300_pmx_get_func_name, | 995 | .get_function_name = u300_pmx_get_func_name, |
996 | .get_function_groups = u300_pmx_get_groups, | 996 | .get_function_groups = u300_pmx_get_groups, |
997 | .enable = u300_pmx_enable, | 997 | .set_mux = u300_pmx_set_mux, |
998 | }; | 998 | }; |
999 | 999 | ||
1000 | static int u300_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin, | 1000 | static int u300_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin, |
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index c055daf9a80f..b874458dcb88 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c | |||
@@ -41,7 +41,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev) | |||
41 | !ops->get_functions_count || | 41 | !ops->get_functions_count || |
42 | !ops->get_function_name || | 42 | !ops->get_function_name || |
43 | !ops->get_function_groups || | 43 | !ops->get_function_groups || |
44 | !ops->enable) { | 44 | !ops->set_mux) { |
45 | dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n"); | 45 | dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n"); |
46 | return -EINVAL; | 46 | return -EINVAL; |
47 | } | 47 | } |
@@ -445,15 +445,15 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting) | |||
445 | desc->mux_setting = &(setting->data.mux); | 445 | desc->mux_setting = &(setting->data.mux); |
446 | } | 446 | } |
447 | 447 | ||
448 | ret = ops->enable(pctldev, setting->data.mux.func, | 448 | ret = ops->set_mux(pctldev, setting->data.mux.func, |
449 | setting->data.mux.group); | 449 | setting->data.mux.group); |
450 | 450 | ||
451 | if (ret) | 451 | if (ret) |
452 | goto err_enable; | 452 | goto err_set_mux; |
453 | 453 | ||
454 | return 0; | 454 | return 0; |
455 | 455 | ||
456 | err_enable: | 456 | err_set_mux: |
457 | for (i = 0; i < num_pins; i++) { | 457 | for (i = 0; i < num_pins; i++) { |
458 | desc = pin_desc_get(pctldev, pins[i]); | 458 | desc = pin_desc_get(pctldev, pins[i]); |
459 | if (desc) | 459 | if (desc) |
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 80a64cad907d..01eab47a746f 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c | |||
@@ -134,9 +134,9 @@ static int msm_get_function_groups(struct pinctrl_dev *pctldev, | |||
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | static int msm_pinmux_enable(struct pinctrl_dev *pctldev, | 137 | static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev, |
138 | unsigned function, | 138 | unsigned function, |
139 | unsigned group) | 139 | unsigned group) |
140 | { | 140 | { |
141 | struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); | 141 | struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); |
142 | const struct msm_pingroup *g; | 142 | const struct msm_pingroup *g; |
@@ -170,7 +170,7 @@ static const struct pinmux_ops msm_pinmux_ops = { | |||
170 | .get_functions_count = msm_get_functions_count, | 170 | .get_functions_count = msm_get_functions_count, |
171 | .get_function_name = msm_get_function_name, | 171 | .get_function_name = msm_get_function_name, |
172 | .get_function_groups = msm_get_function_groups, | 172 | .get_function_groups = msm_get_function_groups, |
173 | .enable = msm_pinmux_enable, | 173 | .set_mux = msm_pinmux_set_mux, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static int msm_config_reg(struct msm_pinctrl *pctrl, | 176 | static int msm_config_reg(struct msm_pinctrl *pctrl, |
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c index 603da2f9dd95..b995ec2c5d16 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos5440.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos5440.c | |||
@@ -364,8 +364,9 @@ static void exynos5440_pinmux_setup(struct pinctrl_dev *pctldev, unsigned select | |||
364 | } | 364 | } |
365 | 365 | ||
366 | /* enable a specified pinmux by writing to registers */ | 366 | /* enable a specified pinmux by writing to registers */ |
367 | static int exynos5440_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector, | 367 | static int exynos5440_pinmux_set_mux(struct pinctrl_dev *pctldev, |
368 | unsigned group) | 368 | unsigned selector, |
369 | unsigned group) | ||
369 | { | 370 | { |
370 | exynos5440_pinmux_setup(pctldev, selector, group, true); | 371 | exynos5440_pinmux_setup(pctldev, selector, group, true); |
371 | return 0; | 372 | return 0; |
@@ -387,7 +388,7 @@ static const struct pinmux_ops exynos5440_pinmux_ops = { | |||
387 | .get_functions_count = exynos5440_get_functions_count, | 388 | .get_functions_count = exynos5440_get_functions_count, |
388 | .get_function_name = exynos5440_pinmux_get_fname, | 389 | .get_function_name = exynos5440_pinmux_get_fname, |
389 | .get_function_groups = exynos5440_pinmux_get_groups, | 390 | .get_function_groups = exynos5440_pinmux_get_groups, |
390 | .enable = exynos5440_pinmux_enable, | 391 | .set_mux = exynos5440_pinmux_set_mux, |
391 | .gpio_set_direction = exynos5440_pinmux_gpio_set_direction, | 392 | .gpio_set_direction = exynos5440_pinmux_gpio_set_direction, |
392 | }; | 393 | }; |
393 | 394 | ||
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index b07406da333c..4a47691c32b1 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c | |||
@@ -401,8 +401,9 @@ static void samsung_pinmux_setup(struct pinctrl_dev *pctldev, unsigned selector, | |||
401 | } | 401 | } |
402 | 402 | ||
403 | /* enable a specified pinmux by writing to registers */ | 403 | /* enable a specified pinmux by writing to registers */ |
404 | static int samsung_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector, | 404 | static int samsung_pinmux_set_mux(struct pinctrl_dev *pctldev, |
405 | unsigned group) | 405 | unsigned selector, |
406 | unsigned group) | ||
406 | { | 407 | { |
407 | samsung_pinmux_setup(pctldev, selector, group, true); | 408 | samsung_pinmux_setup(pctldev, selector, group, true); |
408 | return 0; | 409 | return 0; |
@@ -413,7 +414,7 @@ static const struct pinmux_ops samsung_pinmux_ops = { | |||
413 | .get_functions_count = samsung_get_functions_count, | 414 | .get_functions_count = samsung_get_functions_count, |
414 | .get_function_name = samsung_pinmux_get_fname, | 415 | .get_function_name = samsung_pinmux_get_fname, |
415 | .get_function_groups = samsung_pinmux_get_groups, | 416 | .get_function_groups = samsung_pinmux_get_groups, |
416 | .enable = samsung_pinmux_enable, | 417 | .set_mux = samsung_pinmux_set_mux, |
417 | }; | 418 | }; |
418 | 419 | ||
419 | /* set or get the pin config settings for a specified pin */ | 420 | /* set or get the pin config settings for a specified pin */ |
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index 11db3ee39d40..910deaefa0ac 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c | |||
@@ -312,8 +312,8 @@ static int sh_pfc_get_function_groups(struct pinctrl_dev *pctldev, | |||
312 | return 0; | 312 | return 0; |
313 | } | 313 | } |
314 | 314 | ||
315 | static int sh_pfc_func_enable(struct pinctrl_dev *pctldev, unsigned selector, | 315 | static int sh_pfc_func_set_mux(struct pinctrl_dev *pctldev, unsigned selector, |
316 | unsigned group) | 316 | unsigned group) |
317 | { | 317 | { |
318 | struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); | 318 | struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); |
319 | struct sh_pfc *pfc = pmx->pfc; | 319 | struct sh_pfc *pfc = pmx->pfc; |
@@ -442,7 +442,7 @@ static const struct pinmux_ops sh_pfc_pinmux_ops = { | |||
442 | .get_functions_count = sh_pfc_get_functions_count, | 442 | .get_functions_count = sh_pfc_get_functions_count, |
443 | .get_function_name = sh_pfc_get_function_name, | 443 | .get_function_name = sh_pfc_get_function_name, |
444 | .get_function_groups = sh_pfc_get_function_groups, | 444 | .get_function_groups = sh_pfc_get_function_groups, |
445 | .enable = sh_pfc_func_enable, | 445 | .set_mux = sh_pfc_func_set_mux, |
446 | .gpio_request_enable = sh_pfc_gpio_request_enable, | 446 | .gpio_request_enable = sh_pfc_gpio_request_enable, |
447 | .gpio_disable_free = sh_pfc_gpio_disable_free, | 447 | .gpio_disable_free = sh_pfc_gpio_disable_free, |
448 | .gpio_set_direction = sh_pfc_gpio_set_direction, | 448 | .gpio_set_direction = sh_pfc_gpio_set_direction, |
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c index 45f93f952a39..6f252fd7cb0c 100644 --- a/drivers/pinctrl/sirf/pinctrl-sirf.c +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c | |||
@@ -179,8 +179,9 @@ static void sirfsoc_pinmux_endisable(struct sirfsoc_pmx *spmx, | |||
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | static int sirfsoc_pinmux_enable(struct pinctrl_dev *pmxdev, unsigned selector, | 182 | static int sirfsoc_pinmux_set_mux(struct pinctrl_dev *pmxdev, |
183 | unsigned group) | 183 | unsigned selector, |
184 | unsigned group) | ||
184 | { | 185 | { |
185 | struct sirfsoc_pmx *spmx; | 186 | struct sirfsoc_pmx *spmx; |
186 | 187 | ||
@@ -237,7 +238,7 @@ static int sirfsoc_pinmux_request_gpio(struct pinctrl_dev *pmxdev, | |||
237 | } | 238 | } |
238 | 239 | ||
239 | static struct pinmux_ops sirfsoc_pinmux_ops = { | 240 | static struct pinmux_ops sirfsoc_pinmux_ops = { |
240 | .enable = sirfsoc_pinmux_enable, | 241 | .set_mux = sirfsoc_pinmux_set_mux, |
241 | .get_functions_count = sirfsoc_pinmux_get_funcs_count, | 242 | .get_functions_count = sirfsoc_pinmux_get_funcs_count, |
242 | .get_function_name = sirfsoc_pinmux_get_func_name, | 243 | .get_function_name = sirfsoc_pinmux_get_func_name, |
243 | .get_function_groups = sirfsoc_pinmux_get_groups, | 244 | .get_function_groups = sirfsoc_pinmux_get_groups, |
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index f72cc4e192bd..abdb05ac43dc 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.c +++ b/drivers/pinctrl/spear/pinctrl-spear.c | |||
@@ -268,7 +268,7 @@ static int spear_pinctrl_endisable(struct pinctrl_dev *pctldev, | |||
268 | return 0; | 268 | return 0; |
269 | } | 269 | } |
270 | 270 | ||
271 | static int spear_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, | 271 | static int spear_pinctrl_set_mux(struct pinctrl_dev *pctldev, unsigned function, |
272 | unsigned group) | 272 | unsigned group) |
273 | { | 273 | { |
274 | return spear_pinctrl_endisable(pctldev, function, group, true); | 274 | return spear_pinctrl_endisable(pctldev, function, group, true); |
@@ -338,7 +338,7 @@ static const struct pinmux_ops spear_pinmux_ops = { | |||
338 | .get_functions_count = spear_pinctrl_get_funcs_count, | 338 | .get_functions_count = spear_pinctrl_get_funcs_count, |
339 | .get_function_name = spear_pinctrl_get_func_name, | 339 | .get_function_name = spear_pinctrl_get_func_name, |
340 | .get_function_groups = spear_pinctrl_get_func_groups, | 340 | .get_function_groups = spear_pinctrl_get_func_groups, |
341 | .enable = spear_pinctrl_enable, | 341 | .set_mux = spear_pinctrl_set_mux, |
342 | .gpio_request_enable = gpio_request_enable, | 342 | .gpio_request_enable = gpio_request_enable, |
343 | .gpio_disable_free = gpio_disable_free, | 343 | .gpio_disable_free = gpio_disable_free, |
344 | }; | 344 | }; |
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 3df66e366c87..ef9d804e55de 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c | |||
@@ -393,9 +393,9 @@ static void sunxi_pmx_set(struct pinctrl_dev *pctldev, | |||
393 | spin_unlock_irqrestore(&pctl->lock, flags); | 393 | spin_unlock_irqrestore(&pctl->lock, flags); |
394 | } | 394 | } |
395 | 395 | ||
396 | static int sunxi_pmx_enable(struct pinctrl_dev *pctldev, | 396 | static int sunxi_pmx_set_mux(struct pinctrl_dev *pctldev, |
397 | unsigned function, | 397 | unsigned function, |
398 | unsigned group) | 398 | unsigned group) |
399 | { | 399 | { |
400 | struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); | 400 | struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); |
401 | struct sunxi_pinctrl_group *g = pctl->groups + group; | 401 | struct sunxi_pinctrl_group *g = pctl->groups + group; |
@@ -441,7 +441,7 @@ static const struct pinmux_ops sunxi_pmx_ops = { | |||
441 | .get_functions_count = sunxi_pmx_get_funcs_cnt, | 441 | .get_functions_count = sunxi_pmx_get_funcs_cnt, |
442 | .get_function_name = sunxi_pmx_get_func_name, | 442 | .get_function_name = sunxi_pmx_get_func_name, |
443 | .get_function_groups = sunxi_pmx_get_func_groups, | 443 | .get_function_groups = sunxi_pmx_get_func_groups, |
444 | .enable = sunxi_pmx_enable, | 444 | .set_mux = sunxi_pmx_set_mux, |
445 | .gpio_set_direction = sunxi_pmx_gpio_set_direction, | 445 | .gpio_set_direction = sunxi_pmx_gpio_set_direction, |
446 | }; | 446 | }; |
447 | 447 | ||
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index 8cea355f9a81..d055d63309e4 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c | |||
@@ -131,9 +131,9 @@ static int wmt_set_pinmux(struct wmt_pinctrl_data *data, unsigned func, | |||
131 | return 0; | 131 | return 0; |
132 | } | 132 | } |
133 | 133 | ||
134 | static int wmt_pmx_enable(struct pinctrl_dev *pctldev, | 134 | static int wmt_pmx_set_mux(struct pinctrl_dev *pctldev, |
135 | unsigned func_selector, | 135 | unsigned func_selector, |
136 | unsigned group_selector) | 136 | unsigned group_selector) |
137 | { | 137 | { |
138 | struct wmt_pinctrl_data *data = pinctrl_dev_get_drvdata(pctldev); | 138 | struct wmt_pinctrl_data *data = pinctrl_dev_get_drvdata(pctldev); |
139 | u32 pinnum = data->pins[group_selector].number; | 139 | u32 pinnum = data->pins[group_selector].number; |
@@ -168,7 +168,7 @@ static struct pinmux_ops wmt_pinmux_ops = { | |||
168 | .get_functions_count = wmt_pmx_get_functions_count, | 168 | .get_functions_count = wmt_pmx_get_functions_count, |
169 | .get_function_name = wmt_pmx_get_function_name, | 169 | .get_function_name = wmt_pmx_get_function_name, |
170 | .get_function_groups = wmt_pmx_get_function_groups, | 170 | .get_function_groups = wmt_pmx_get_function_groups, |
171 | .enable = wmt_pmx_enable, | 171 | .set_mux = wmt_pmx_set_mux, |
172 | .gpio_disable_free = wmt_pmx_gpio_disable_free, | 172 | .gpio_disable_free = wmt_pmx_gpio_disable_free, |
173 | .gpio_set_direction = wmt_pmx_gpio_set_direction, | 173 | .gpio_set_direction = wmt_pmx_gpio_set_direction, |
174 | }; | 174 | }; |