From e3653749aaee8dc8c819b9e4137f07e0383afb7e Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Fri, 14 Feb 2014 18:21:06 +0800 Subject: pinctrl: pinctrl-adi: combine multiple groups of one function together The data pins of some peripheral are different if connecting to different devices in one pinmux function. In the PPI case, data pins can be used in 8, 16 and 24 pin groups individually. Add these groups into one ppi function. Signed-off-by: Sonic Zhang Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-adi2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/pinctrl/pinctrl-adi2.c') diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c index 72450a120a54..200ea1e72d40 100644 --- a/drivers/pinctrl/pinctrl-adi2.c +++ b/drivers/pinctrl/pinctrl-adi2.c @@ -618,8 +618,8 @@ static struct pinctrl_ops adi_pctrl_ops = { .get_group_pins = adi_get_group_pins, }; -static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector, - unsigned group) +static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned func_id, + unsigned group_id) { struct adi_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev); struct gpio_port *port; @@ -627,7 +627,7 @@ static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector, unsigned long flags; unsigned short *mux, pin; - mux = (unsigned short *)pinctrl->soc->functions[selector].mux; + mux = (unsigned short *)pinctrl->soc->groups[group_id].mux; while (*mux) { pin = P_IDENT(*mux); @@ -651,8 +651,8 @@ static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector, return 0; } -static void adi_pinmux_disable(struct pinctrl_dev *pctldev, unsigned selector, - unsigned group) +static void adi_pinmux_disable(struct pinctrl_dev *pctldev, unsigned func_id, + unsigned group_id) { struct adi_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev); struct gpio_port *port; @@ -660,7 +660,7 @@ static void adi_pinmux_disable(struct pinctrl_dev *pctldev, unsigned selector, unsigned long flags; unsigned short *mux, pin; - mux = (unsigned short *)pinctrl->soc->functions[selector].mux; + mux = (unsigned short *)pinctrl->soc->groups[group_id].mux; while (*mux) { pin = P_IDENT(*mux); -- cgit v1.2.1