diff options
author | John Crispin <blogic@openwrt.org> | 2013-02-01 13:04:57 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-02-05 16:17:22 +0100 |
commit | 3a6b04ca33a225dd64fcd5f4469b7b1088f16c37 (patch) | |
tree | 0d0d77a81897a81fdbe2f065f65d833927e7ac06 /drivers/pinctrl/pinctrl-xway.c | |
parent | pinctrl/lantiq: faulty bit inversion (diff) | |
download | linux-3a6b04ca33a225dd64fcd5f4469b7b1088f16c37.tar.xz linux-3a6b04ca33a225dd64fcd5f4469b7b1088f16c37.zip |
pinctrl/lantiq: add pin_config_group_set support
While converting all the boards supported by OpenWrt to OF
I noticed that this feature is missing. Adding it makes the
devicetrees more readable.
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-xway.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-xway.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index c49c9dbe3917..aa4c8b815c20 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c @@ -522,9 +522,24 @@ static int xway_pinconf_set(struct pinctrl_dev *pctldev, return 0; } +int xway_pinconf_group_set(struct pinctrl_dev *pctldev, + unsigned selector, + unsigned long config) +{ + struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctldev); + int i, ret = 0; + + for (i = 0; i < info->grps[selector].npins && !ret; i++) + ret = xway_pinconf_set(pctldev, + info->grps[selector].pins[i], config); + + return ret; +} + static struct pinconf_ops xway_pinconf_ops = { .pin_config_get = xway_pinconf_get, .pin_config_set = xway_pinconf_set, + .pin_config_group_set = xway_pinconf_group_set, }; static struct pinctrl_desc xway_pctrl_desc = { |