From 3a6b04ca33a225dd64fcd5f4469b7b1088f16c37 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 1 Feb 2013 13:04:57 +0100 Subject: 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 Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-xway.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/pinctrl/pinctrl-xway.c') diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index c49c9db..aa4c8b8 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 = { -- cgit v1.1