diff options
author | Dong Aisheng <dong.aisheng@linaro.org> | 2012-05-23 21:22:41 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-07-03 21:51:08 +0200 |
commit | 3e5e00b654997aa2c3998d30f7213b9611eb23d7 (patch) | |
tree | fc086243b83c88df75604165633fa62212921677 /drivers/pinctrl/core.c | |
parent | 5d589b092ab212bbcc27828167e1c036e7fc77d2 (diff) | |
download | linux-3e5e00b654997aa2c3998d30f7213b9611eb23d7.tar.gz linux-3e5e00b654997aa2c3998d30f7213b9611eb23d7.tar.bz2 linux-3e5e00b654997aa2c3998d30f7213b9611eb23d7.zip |
pinctrl: add pinctrl_add_gpio_ranges function
Often GPIO ranges are added in batch, so create a special
function for that.
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r-- | drivers/pinctrl/core.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 902428dfb37e..fb7f3bebdc69 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -332,6 +332,17 @@ void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev, } EXPORT_SYMBOL_GPL(pinctrl_add_gpio_range); +void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *ranges, + unsigned nranges) +{ + int i; + + for (i = 0; i < nranges; i++) + pinctrl_add_gpio_range(pctldev, &ranges[i]); +} +EXPORT_SYMBOL_GPL(pinctrl_add_gpio_ranges); + /** * pinctrl_get_group_selector() - returns the group selector for a group * @pctldev: the pin controller handling the group |