Commit 03e9f0ca authored by Linus Walleij's avatar Linus Walleij

pinctrl: clean up after enable refactoring

commit 2243a87d
"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: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarBjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: default avatarFan Wu <fwu@marvell.com>
Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
parent 32745581
...@@ -702,7 +702,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector, ...@@ -702,7 +702,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector,
return 0; return 0;
} }
int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, int foo_set_mux(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
u8 regbit = (1 << selector + group); u8 regbit = (1 << selector + group);
...@@ -711,21 +711,11 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector, ...@@ -711,21 +711,11 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector,
return 0; return 0;
} }
void foo_disable(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group)
{
u8 regbit = (1 << selector + group);
writeb((readb(MUX) & ~(regbit)), MUX)
return 0;
}
struct pinmux_ops foo_pmxops = { struct pinmux_ops foo_pmxops = {
.get_functions_count = foo_get_functions_count, .get_functions_count = foo_get_functions_count,
.get_function_name = foo_get_fname, .get_function_name = foo_get_fname,
.get_function_groups = foo_get_groups, .get_function_groups = foo_get_groups,
.enable = foo_enable, .set_mux = foo_set_mux,
.disable = foo_disable,
}; };
/* Pinmux operations are handled by some pin controller */ /* Pinmux operations are handled by some pin controller */
......
...@@ -170,7 +170,7 @@ berlin_pinctrl_find_function_by_name(struct berlin_pinctrl *pctrl, ...@@ -170,7 +170,7 @@ berlin_pinctrl_find_function_by_name(struct berlin_pinctrl *pctrl,
return NULL; return NULL;
} }
static int berlin_pinmux_enable(struct pinctrl_dev *pctrl_dev, static int berlin_pinmux_set(struct pinctrl_dev *pctrl_dev,
unsigned function, unsigned function,
unsigned group) unsigned group)
{ {
...@@ -197,7 +197,7 @@ static const struct pinmux_ops berlin_pinmux_ops = { ...@@ -197,7 +197,7 @@ static const struct pinmux_ops berlin_pinmux_ops = {
.get_functions_count = &berlin_pinmux_get_functions_count, .get_functions_count = &berlin_pinmux_get_functions_count,
.get_function_name = &berlin_pinmux_get_function_name, .get_function_name = &berlin_pinmux_get_function_name,
.get_function_groups = &berlin_pinmux_get_function_groups, .get_function_groups = &berlin_pinmux_get_function_groups,
.enable = &berlin_pinmux_enable, .set_mux = &berlin_pinmux_set,
}; };
static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl, static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl,
......
...@@ -259,7 +259,7 @@ static int mvebu_pinmux_get_groups(struct pinctrl_dev *pctldev, unsigned fid, ...@@ -259,7 +259,7 @@ static int mvebu_pinmux_get_groups(struct pinctrl_dev *pctldev, unsigned fid,
return 0; return 0;
} }
static int mvebu_pinmux_enable(struct pinctrl_dev *pctldev, unsigned fid, static int mvebu_pinmux_set(struct pinctrl_dev *pctldev, unsigned fid,
unsigned gid) unsigned gid)
{ {
struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
...@@ -344,7 +344,7 @@ static const struct pinmux_ops mvebu_pinmux_ops = { ...@@ -344,7 +344,7 @@ static const struct pinmux_ops mvebu_pinmux_ops = {
.get_function_groups = mvebu_pinmux_get_groups, .get_function_groups = mvebu_pinmux_get_groups,
.gpio_request_enable = mvebu_pinmux_gpio_request_enable, .gpio_request_enable = mvebu_pinmux_gpio_request_enable,
.gpio_set_direction = mvebu_pinmux_gpio_set_direction, .gpio_set_direction = mvebu_pinmux_gpio_set_direction,
.enable = mvebu_pinmux_enable, .set_mux = mvebu_pinmux_set,
}; };
static int mvebu_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) static int mvebu_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
......
...@@ -709,7 +709,7 @@ static int abx500_pmx_get_func_groups(struct pinctrl_dev *pctldev, ...@@ -709,7 +709,7 @@ static int abx500_pmx_get_func_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int abx500_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, static int abx500_pmx_set(struct pinctrl_dev *pctldev, unsigned function,
unsigned group) unsigned group)
{ {
struct abx500_pinctrl *pct = pinctrl_dev_get_drvdata(pctldev); struct abx500_pinctrl *pct = pinctrl_dev_get_drvdata(pctldev);
...@@ -784,7 +784,7 @@ static const struct pinmux_ops abx500_pinmux_ops = { ...@@ -784,7 +784,7 @@ static const struct pinmux_ops abx500_pinmux_ops = {
.get_functions_count = abx500_pmx_get_funcs_cnt, .get_functions_count = abx500_pmx_get_funcs_cnt,
.get_function_name = abx500_pmx_get_func_name, .get_function_name = abx500_pmx_get_func_name,
.get_function_groups = abx500_pmx_get_func_groups, .get_function_groups = abx500_pmx_get_func_groups,
.enable = abx500_pmx_enable, .set_mux = abx500_pmx_set,
.gpio_request_enable = abx500_gpio_request_enable, .gpio_request_enable = abx500_gpio_request_enable,
.gpio_disable_free = abx500_gpio_disable_free, .gpio_disable_free = abx500_gpio_disable_free,
}; };
......
...@@ -1647,7 +1647,7 @@ static int nmk_pmx_get_func_groups(struct pinctrl_dev *pctldev, ...@@ -1647,7 +1647,7 @@ static int nmk_pmx_get_func_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int nmk_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, static int nmk_pmx_set(struct pinctrl_dev *pctldev, unsigned function,
unsigned group) unsigned group)
{ {
struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev);
...@@ -1810,7 +1810,7 @@ static const struct pinmux_ops nmk_pinmux_ops = { ...@@ -1810,7 +1810,7 @@ static const struct pinmux_ops nmk_pinmux_ops = {
.get_functions_count = nmk_pmx_get_funcs_cnt, .get_functions_count = nmk_pmx_get_funcs_cnt,
.get_function_name = nmk_pmx_get_func_name, .get_function_name = nmk_pmx_get_func_name,
.get_function_groups = nmk_pmx_get_func_groups, .get_function_groups = nmk_pmx_get_func_groups,
.enable = nmk_pmx_enable, .set_mux = nmk_pmx_set,
.gpio_request_enable = nmk_gpio_request_enable, .gpio_request_enable = nmk_gpio_request_enable,
.gpio_disable_free = nmk_gpio_disable_free, .gpio_disable_free = nmk_gpio_disable_free,
}; };
......
...@@ -619,7 +619,7 @@ static struct pinctrl_ops adi_pctrl_ops = { ...@@ -619,7 +619,7 @@ static struct pinctrl_ops adi_pctrl_ops = {
.get_group_pins = adi_get_group_pins, .get_group_pins = adi_get_group_pins,
}; };
static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned func_id, static int adi_pinmux_set(struct pinctrl_dev *pctldev, unsigned func_id,
unsigned group_id) unsigned group_id)
{ {
struct adi_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev); struct adi_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev);
...@@ -698,7 +698,7 @@ static int adi_pinmux_request_gpio(struct pinctrl_dev *pctldev, ...@@ -698,7 +698,7 @@ static int adi_pinmux_request_gpio(struct pinctrl_dev *pctldev,
} }
static struct pinmux_ops adi_pinmux_ops = { static struct pinmux_ops adi_pinmux_ops = {
.enable = adi_pinmux_enable, .set_mux = adi_pinmux_set,
.get_functions_count = adi_pinmux_get_funcs_count, .get_functions_count = adi_pinmux_get_funcs_count,
.get_function_name = adi_pinmux_get_func_name, .get_function_name = adi_pinmux_get_func_name,
.get_function_groups = adi_pinmux_get_groups, .get_function_groups = adi_pinmux_get_groups,
......
...@@ -230,7 +230,7 @@ static int as3722_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, ...@@ -230,7 +230,7 @@ static int as3722_pinctrl_get_func_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int as3722_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, static int as3722_pinctrl_set(struct pinctrl_dev *pctldev, unsigned function,
unsigned group) unsigned group)
{ {
struct as3722_pctrl_info *as_pci = pinctrl_dev_get_drvdata(pctldev); struct as3722_pctrl_info *as_pci = pinctrl_dev_get_drvdata(pctldev);
...@@ -327,7 +327,7 @@ static const struct pinmux_ops as3722_pinmux_ops = { ...@@ -327,7 +327,7 @@ static const struct pinmux_ops as3722_pinmux_ops = {
.get_functions_count = as3722_pinctrl_get_funcs_count, .get_functions_count = as3722_pinctrl_get_funcs_count,
.get_function_name = as3722_pinctrl_get_func_name, .get_function_name = as3722_pinctrl_get_func_name,
.get_function_groups = as3722_pinctrl_get_func_groups, .get_function_groups = as3722_pinctrl_get_func_groups,
.enable = as3722_pinctrl_enable, .set_mux = as3722_pinctrl_set,
.gpio_request_enable = as3722_pinctrl_gpio_request_enable, .gpio_request_enable = as3722_pinctrl_gpio_request_enable,
.gpio_set_direction = as3722_pinctrl_gpio_set_direction, .gpio_set_direction = as3722_pinctrl_gpio_set_direction,
}; };
......
...@@ -554,7 +554,7 @@ static void at91_mux_gpio_enable(void __iomem *pio, unsigned mask, bool input) ...@@ -554,7 +554,7 @@ static void at91_mux_gpio_enable(void __iomem *pio, unsigned mask, bool input)
writel_relaxed(mask, pio + (input ? PIO_ODR : PIO_OER)); writel_relaxed(mask, pio + (input ? PIO_ODR : PIO_OER));
} }
static int at91_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, static int at91_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
struct at91_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); struct at91_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
...@@ -684,7 +684,7 @@ static const struct pinmux_ops at91_pmx_ops = { ...@@ -684,7 +684,7 @@ static const struct pinmux_ops at91_pmx_ops = {
.get_functions_count = at91_pmx_get_funcs_count, .get_functions_count = at91_pmx_get_funcs_count,
.get_function_name = at91_pmx_get_func_name, .get_function_name = at91_pmx_get_func_name,
.get_function_groups = at91_pmx_get_groups, .get_function_groups = at91_pmx_get_groups,
.enable = at91_pmx_enable, .set_mux = at91_pmx_set,
.gpio_request_enable = at91_gpio_request_enable, .gpio_request_enable = at91_gpio_request_enable,
.gpio_disable_free = at91_gpio_disable_free, .gpio_disable_free = at91_gpio_disable_free,
}; };
......
...@@ -1055,7 +1055,7 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev, ...@@ -1055,7 +1055,7 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int bcm281xx_pinmux_enable(struct pinctrl_dev *pctldev, static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
unsigned function, unsigned function,
unsigned group) unsigned group)
{ {
...@@ -1084,7 +1084,7 @@ static struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = { ...@@ -1084,7 +1084,7 @@ static struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
.get_functions_count = bcm281xx_pinctrl_get_fcns_count, .get_functions_count = bcm281xx_pinctrl_get_fcns_count,
.get_function_name = bcm281xx_pinctrl_get_fcn_name, .get_function_name = bcm281xx_pinctrl_get_fcn_name,
.get_function_groups = bcm281xx_pinctrl_get_fcn_groups, .get_function_groups = bcm281xx_pinctrl_get_fcn_groups,
.enable = bcm281xx_pinmux_enable, .set_mux = bcm281xx_pinmux_set,
}; };
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev, static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
......
...@@ -830,7 +830,7 @@ static int bcm2835_pmx_get_function_groups(struct pinctrl_dev *pctldev, ...@@ -830,7 +830,7 @@ static int bcm2835_pmx_get_function_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int bcm2835_pmx_enable(struct pinctrl_dev *pctldev, static int bcm2835_pmx_set(struct pinctrl_dev *pctldev,
unsigned func_selector, unsigned func_selector,
unsigned group_selector) unsigned group_selector)
{ {
...@@ -869,7 +869,7 @@ static const struct pinmux_ops bcm2835_pmx_ops = { ...@@ -869,7 +869,7 @@ static const struct pinmux_ops bcm2835_pmx_ops = {
.get_functions_count = bcm2835_pmx_get_functions_count, .get_functions_count = bcm2835_pmx_get_functions_count,
.get_function_name = bcm2835_pmx_get_function_name, .get_function_name = bcm2835_pmx_get_function_name,
.get_function_groups = bcm2835_pmx_get_function_groups, .get_function_groups = bcm2835_pmx_get_function_groups,
.enable = bcm2835_pmx_enable, .set_mux = bcm2835_pmx_set,
.gpio_disable_free = bcm2835_pmx_gpio_disable_free, .gpio_disable_free = bcm2835_pmx_gpio_disable_free,
.gpio_set_direction = bcm2835_pmx_gpio_set_direction, .gpio_set_direction = bcm2835_pmx_gpio_set_direction,
}; };
......
...@@ -179,7 +179,7 @@ static const struct pinctrl_ops imx_pctrl_ops = { ...@@ -179,7 +179,7 @@ static const struct pinctrl_ops imx_pctrl_ops = {
}; };
static int imx_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
...@@ -298,7 +298,7 @@ static const struct pinmux_ops imx_pmx_ops = { ...@@ -298,7 +298,7 @@ static const struct pinmux_ops imx_pmx_ops = {
.get_functions_count = imx_pmx_get_funcs_count, .get_functions_count = imx_pmx_get_funcs_count,
.get_function_name = imx_pmx_get_func_name, .get_function_name = imx_pmx_get_func_name,
.get_function_groups = imx_pmx_get_groups, .get_function_groups = imx_pmx_get_groups,
.enable = imx_pmx_enable, .set_mux = imx_pmx_set,
}; };
static int imx_pinconf_get(struct pinctrl_dev *pctldev, static int imx_pinconf_get(struct pinctrl_dev *pctldev,
......
...@@ -298,7 +298,7 @@ static const struct pinctrl_ops imx1_pctrl_ops = { ...@@ -298,7 +298,7 @@ static const struct pinctrl_ops imx1_pctrl_ops = {
}; };
static int imx1_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, static int imx1_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
...@@ -385,7 +385,7 @@ static const struct pinmux_ops imx1_pmx_ops = { ...@@ -385,7 +385,7 @@ static const struct pinmux_ops imx1_pmx_ops = {
.get_functions_count = imx1_pmx_get_funcs_count, .get_functions_count = imx1_pmx_get_funcs_count,
.get_function_name = imx1_pmx_get_func_name, .get_function_name = imx1_pmx_get_func_name,
.get_function_groups = imx1_pmx_get_groups, .get_function_groups = imx1_pmx_get_groups,
.enable = imx1_pmx_enable, .set_mux = imx1_pmx_set,
}; };
static int imx1_pinconf_get(struct pinctrl_dev *pctldev, static int imx1_pinconf_get(struct pinctrl_dev *pctldev,
......
...@@ -257,7 +257,7 @@ static int match_group_mux(const struct ltq_pin_group *grp, ...@@ -257,7 +257,7 @@ static int match_group_mux(const struct ltq_pin_group *grp,
return ret; return ret;
} }
static int ltq_pmx_enable(struct pinctrl_dev *pctrldev, static int ltq_pmx_set(struct pinctrl_dev *pctrldev,
unsigned func, unsigned func,
unsigned group) unsigned group)
{ {
...@@ -316,7 +316,7 @@ static const struct pinmux_ops ltq_pmx_ops = { ...@@ -316,7 +316,7 @@ static const struct pinmux_ops ltq_pmx_ops = {
.get_functions_count = ltq_pmx_func_count, .get_functions_count = ltq_pmx_func_count,
.get_function_name = ltq_pmx_func_name, .get_function_name = ltq_pmx_func_name,
.get_function_groups = ltq_pmx_get_groups, .get_function_groups = ltq_pmx_get_groups,
.enable = ltq_pmx_enable, .set_mux = ltq_pmx_set,
.gpio_request_enable = ltq_pmx_gpio_request_enable, .gpio_request_enable = ltq_pmx_gpio_request_enable,
}; };
......
...@@ -195,7 +195,7 @@ static int mxs_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, ...@@ -195,7 +195,7 @@ static int mxs_pinctrl_get_func_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int mxs_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned selector, static int mxs_pinctrl_set_mux(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev); struct mxs_pinctrl_data *d = pinctrl_dev_get_drvdata(pctldev);
...@@ -223,7 +223,7 @@ static const struct pinmux_ops mxs_pinmux_ops = { ...@@ -223,7 +223,7 @@ static const struct pinmux_ops mxs_pinmux_ops = {
.get_functions_count = mxs_pinctrl_get_funcs_count, .get_functions_count = mxs_pinctrl_get_funcs_count,
.get_function_name = mxs_pinctrl_get_func_name, .get_function_name = mxs_pinctrl_get_func_name,
.get_function_groups = mxs_pinctrl_get_func_groups, .get_function_groups = mxs_pinctrl_get_func_groups,
.enable = mxs_pinctrl_enable, .set_mux = mxs_pinctrl_set_mux,
}; };
static int mxs_pinconf_get(struct pinctrl_dev *pctldev, static int mxs_pinconf_get(struct pinctrl_dev *pctldev,
......
...@@ -685,7 +685,8 @@ static int palmas_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, ...@@ -685,7 +685,8 @@ static int palmas_pinctrl_get_func_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int palmas_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, static int palmas_pinctrl_set_mux(struct pinctrl_dev *pctldev,
unsigned function,
unsigned group) unsigned group)
{ {
struct palmas_pctrl_chip_info *pci = pinctrl_dev_get_drvdata(pctldev); struct palmas_pctrl_chip_info *pci = pinctrl_dev_get_drvdata(pctldev);
...@@ -742,7 +743,7 @@ static const struct pinmux_ops palmas_pinmux_ops = { ...@@ -742,7 +743,7 @@ static const struct pinmux_ops palmas_pinmux_ops = {
.get_functions_count = palmas_pinctrl_get_funcs_count, .get_functions_count = palmas_pinctrl_get_funcs_count,
.get_function_name = palmas_pinctrl_get_func_name, .get_function_name = palmas_pinctrl_get_func_name,
.get_function_groups = palmas_pinctrl_get_func_groups, .get_function_groups = palmas_pinctrl_get_func_groups,
.enable = palmas_pinctrl_enable, .set_mux = palmas_pinctrl_set_mux,
}; };
static int palmas_pinconf_get(struct pinctrl_dev *pctldev, static int palmas_pinconf_get(struct pinctrl_dev *pctldev,
......
...@@ -813,7 +813,7 @@ static int rockchip_pmx_get_groups(struct pinctrl_dev *pctldev, ...@@ -813,7 +813,7 @@ static int rockchip_pmx_get_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int rockchip_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, static int rockchip_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
...@@ -889,7 +889,7 @@ static const struct pinmux_ops rockchip_pmx_ops = { ...@@ -889,7 +889,7 @@ static const struct pinmux_ops rockchip_pmx_ops = {
.get_functions_count = rockchip_pmx_get_funcs_count, .get_functions_count = rockchip_pmx_get_funcs_count,
.get_function_name = rockchip_pmx_get_func_name, .get_function_name = rockchip_pmx_get_func_name,
.get_function_groups = rockchip_pmx_get_groups, .get_function_groups = rockchip_pmx_get_groups,
.enable = rockchip_pmx_enable, .set_mux = rockchip_pmx_set,
.gpio_set_direction = rockchip_pmx_gpio_set_direction, .gpio_set_direction = rockchip_pmx_gpio_set_direction,
}; };
......
...@@ -447,7 +447,7 @@ static int pcs_get_function(struct pinctrl_dev *pctldev, unsigned pin, ...@@ -447,7 +447,7 @@ static int pcs_get_function(struct pinctrl_dev *pctldev, unsigned pin,
return 0; return 0;
} }
static int pcs_enable(struct pinctrl_dev *pctldev, unsigned fselector, static int pcs_set_mux(struct pinctrl_dev *pctldev, unsigned fselector,
unsigned group) unsigned group)
{ {
struct pcs_device *pcs; struct pcs_device *pcs;
...@@ -519,7 +519,7 @@ static const struct pinmux_ops pcs_pinmux_ops = { ...@@ -519,7 +519,7 @@ static const struct pinmux_ops pcs_pinmux_ops = {
.get_functions_count = pcs_get_functions_count, .get_functions_count = pcs_get_functions_count,
.get_function_name = pcs_get_function_name, .get_function_name = pcs_get_function_name,
.get_function_groups = pcs_get_function_groups, .get_function_groups = pcs_get_function_groups,
.enable = pcs_enable, .set_mux = pcs_sex_mux,
.gpio_request_enable = pcs_request_gpio, .gpio_request_enable = pcs_request_gpio,
}; };
......
...@@ -914,7 +914,7 @@ static struct st_pio_control *st_get_pio_control( ...@@ -914,7 +914,7 @@ static struct st_pio_control *st_get_pio_control(
return &bank->pc; return &bank->pc;
} }
static int st_pmx_enable(struct pinctrl_dev *pctldev, unsigned fselector, static int st_pmx_set_mux(struct pinctrl_dev *pctldev, unsigned fselector,
unsigned group) unsigned group)
{ {
struct st_pinctrl *info = pinctrl_dev_get_drvdata(pctldev); struct st_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
...@@ -951,7 +951,7 @@ static struct pinmux_ops st_pmxops = { ...@@ -951,7 +951,7 @@ static struct pinmux_ops st_pmxops = {
.get_functions_count = st_pmx_get_funcs_count, .get_functions_count = st_pmx_get_funcs_count,
.get_function_name = st_pmx_get_fname, .get_function_name = st_pmx_get_fname,
.get_function_groups = st_pmx_get_groups, .get_function_groups = st_pmx_get_groups,
.enable = st_pmx_enable, .set_mux = st_pmx_set_mux,
.gpio_set_direction = st_pmx_set_gpio_direction, .gpio_set_direction = st_pmx_set_gpio_direction,
}; };
......
...@@ -697,7 +697,7 @@ static void tb10x_gpio_disable_free(struct pinctrl_dev *pctl, ...@@ -697,7 +697,7 @@ static void tb10x_gpio_disable_free(struct pinctrl_dev *pctl,
mutex_unlock(&state->mutex); mutex_unlock(&state->mutex);
} }
static int tb10x_pctl_enable(struct pinctrl_dev *pctl, static int tb10x_pctl_set_mux(struct pinctrl_dev *pctl,
unsigned func_selector, unsigned group_selector) unsigned func_selector, unsigned group_selector)
{ {
struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl);
...@@ -744,7 +744,7 @@ static struct pinmux_ops tb10x_pinmux_ops = { ...@@ -744,7 +744,7 @@ static struct pinmux_ops tb10x_pinmux_ops = {
.get_function_groups = tb10x_get_function_groups, .get_function_groups = tb10x_get_function_groups,
.gpio_request_enable = tb10x_gpio_request_enable, .gpio_request_enable = tb10x_gpio_request_enable,
.gpio_disable_free = tb10x_gpio_disable_free, .gpio_disable_free = tb10x_gpio_disable_free,
.enable = tb10x_pctl_enable, .set_mux = tb10x_pctl_set_mux,
}; };
static struct pinctrl_desc tb10x_pindesc = { static struct pinctrl_desc tb10x_pindesc = {
......
...@@ -281,7 +281,7 @@ static int tegra_xusb_padctl_get_function_groups(struct pinctrl_dev *pinctrl, ...@@ -281,7 +281,7 @@ static int tegra_xusb_padctl_get_function_groups(struct pinctrl_dev *pinctrl,
return 0; return 0;
} }
static int tegra_xusb_padctl_pinmux_enable(struct pinctrl_dev *pinctrl, static int tegra_xusb_padctl_pinmux_set(struct pinctrl_dev *pinctrl,
unsigned int function, unsigned int function,
unsigned int group) unsigned int group)
{ {
...@@ -311,7 +311,7 @@ static const struct pinmux_ops tegra_xusb_padctl_pinmux_ops = { ...@@ -311,7 +311,7 @@ static const struct pinmux_ops tegra_xusb_padctl_pinmux_ops = {
.get_functions_count = tegra_xusb_padctl_get_functions_count, .get_functions_count = tegra_xusb_padctl_get_functions_count,
.get_function_name = tegra_xusb_padctl_get_function_name, .get_function_name = tegra_xusb_padctl_get_function_name,
.get_function_groups = tegra_xusb_padctl_get_function_groups, .get_function_groups = tegra_xusb_padctl_get_function_groups,
.enable = tegra_xusb_padctl_pinmux_enable, .set_mux = tegra_xusb_padctl_pinmux_set,
}; };
static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl, static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl,
......
...@@ -262,7 +262,8 @@ static int tegra_pinctrl_get_func_groups(struct pinctrl_dev *pctldev, ...@@ -262,7 +262,8 @@ static int tegra_pinctrl_get_func_groups(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static int tegra_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned function, static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,
unsigned function,
unsigned group) unsigned group)
{ {
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
...@@ -294,7 +295,7 @@ static const struct pinmux_ops tegra_pinmux_ops = { ...@@ -294,7 +295,7 @@ static const struct pinmux_ops tegra_pinmux_ops = {
.get_functions_count = tegra_pinctrl_get_funcs_count, .get_functions_count = tegra_pinctrl_get_funcs_count,
.get_function_name = tegra_pinctrl_get_func_name, .get_function_name = tegra_pinctrl_get_func_name,
.get_function_groups = tegra_pinctrl_get_func_groups, .get_function_groups = tegra_pinctrl_get_func_groups,
.enable = tegra_pinctrl_enable, .set_mux = tegra_pinctrl_set_mux,
}; };
static int tegra_pinconf_reg(struct tegra_pmx *pmx, static int tegra_pinconf_reg(struct tegra_pmx *pmx,
......
...@@ -547,8 +547,9 @@ static void tz1090_pdc_pinctrl_mux(struct tz1090_pdc_pmx *pmx, ...@@ -547,8 +547,9 @@ static void tz1090_pdc_pinctrl_mux(struct tz1090_pdc_pmx *pmx,
__global_unlock2(flags); __global_unlock2(flags);
} }
static int tz1090_pdc_pinctrl_enable(struct pinctrl_dev *pctldev, static int tz1090_pdc_pinctrl_set_mux(struct pinctrl_dev *pctldev,
unsigned int function, unsigned int group) unsigned int function,
unsigned int group)
{ {
struct tz1090_pdc_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); struct tz1090_pdc_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
const struct tz1090_pdc_pingroup *grp = &tz1090_pdc_groups[group]; const struct tz1090_pdc_pingroup *grp = &tz1090_pdc_groups[group];
...@@ -634,7 +635,7 @@ static struct pinmux_ops tz1090_pdc_pinmux_ops = { ...@@ -634,7 +635,7 @@ static struct pinmux_ops tz1090_pdc_pinmux_ops = {
.get_functions_count = tz1090_pdc_pinctrl_get_funcs_count, .get_functions_count = tz1090_pdc_pinctrl_get_funcs_count,
.get_function_name = tz1090_pdc_pinctrl_get_func_name, .get_function_name = tz1090_pdc_pinctrl_get_func_name,
.get_function_groups = tz1090_pdc_pinctrl_get_func_groups, .get_function_groups = tz1090_pdc_pinctrl_get_func_groups,
.enable = tz1090_pdc_pinctrl_enable, .set_mux = tz1090_pdc_pinctrl_set_mux,
.gpio_request_enable = tz1090_pdc_pinctrl_gpio_request_enable, .gpio_request_enable = tz1090_pdc_pinctrl_gpio_request_enable,
.gpio_disable_free = tz1090_pdc_pinctrl_gpio_disable_free, .gpio_disable_free = tz1090_pdc_pinctrl_gpio_disable_free,
}; };
......
...@@ -1415,7 +1415,7 @@ static int tz1090_pinctrl_enable_mux(struct tz1090_pmx *pmx, ...@@ -1415,7 +1415,7 @@ static int tz1090_pinctrl_enable_mux(struct tz1090_pmx *pmx,
* the effect is the same as enabling the function on each individual pin in the * the effect is the same as enabling the function on each individual pin in the
* group. * group.
*/ */
static int tz1090_pinctrl_enable(struct pinctrl_dev *pctldev, static int tz1090_pinctrl_set_mux(struct pinctrl_dev *pctldev,
unsigned int function, unsigned int group) unsigned int function, unsigned int group)
{ {
struct tz1090_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); struct tz1090_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
...@@ -1517,7 +1517,7 @@ static struct pinmux_ops tz1090_pinmux_ops = { ...@@ -1517,7 +1517,7 @@ static struct pinmux_ops tz1090_pinmux_ops = {
.get_functions_count = tz1090_pinctrl_get_funcs_count, .get_functions_count = tz1090_pinctrl_get_funcs_count,
.get_function_name = tz1090_pinctrl_get_func_name, .get_function_name = tz1090_pinctrl_get_func_name,
.get_function_groups = tz1090_pinctrl_get_func_groups, .get_function_groups = tz1090_pinctrl_get_func_groups,
.enable = tz1090_pinctrl_enable, .set_mux = tz1090_pinctrl_set_mux,
.gpio_request_enable = tz1090_pinctrl_gpio_request_enable, .gpio_request_enable = tz1090_pinctrl_gpio_request_enable,
.gpio_disable_free = tz1090_pinctrl_gpio_disable_free, .gpio_disable_free = tz1090_pinctrl_gpio_disable_free,
}; };
......
...@@ -955,7 +955,7 @@ static void u300_pmx_endisable(struct u300_pmx *upmx, unsigned selector, ...@@ -955,7 +955,7 @@ static void u300_pmx_endisable(struct u300_pmx *upmx, unsigned selector,
} }
} }
static int u300_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector, static int u300_pmx_set_mux(struct pinctrl_dev *pctldev, unsigned selector,
unsigned group) unsigned group)
{ {
struct u300_pmx *upmx; struct u300_pmx *upmx;
...@@ -994,7 +994,7 @@ static const struct pinmux_ops u300_pmx_ops = { ...@@ -994,7 +994,7 @@ static const struct pinmux_ops u300_pmx_ops = {
.get_functions_count = u300_pmx_get_funcs_count, .get_functions_count = u300_pmx_get_funcs_count,
.get_function_name = u300_pmx_get_func_name, .get_function_name = u300_pmx_get_func_name,
.get_function_groups = u300_pmx_get_groups, .get_function_groups = u300_pmx_get_groups,
.enable = u300_pmx_enable, .set_mux = u300_pmx_set_mux,
}; };
static int u300_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin, static int u300_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin,
......
...@@ -41,7 +41,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev) ...@@ -41,7 +41,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev)
!ops->get_functions_count || !ops->get_functions_count ||
!ops->get_function_name || !ops->get_function_name ||
!ops->get_function_groups || !ops->get_function_groups ||
!ops->enable) { !ops->set_mux) {
dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n"); dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n");
return -EINVAL; return -EINVAL;
} }
...@@ -445,15 +445,15 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting) ...@@ -445,15 +445,15 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting)
desc->mux_setting = &(setting->data.mux); desc->mux_setting = &(setting->data.mux);
} }
ret = ops->enable(pctldev, setting->data.mux.func, ret = ops->set_mux(pctldev, setting->data.mux.func,
setting->data.mux.group); setting->data.mux.group);
if (ret) if (ret)
goto err_enable; goto err_set_mux;