aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2012-10-27 05:51:35 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-11-11 13:05:59 -0500
commit7e10ee68f8ccc62e0934ff02f39ce541f3879844 (patch)
treed83e89f5d73be6f9b90c55faf526a064699d0b02 /drivers/pinctrl/core.c
parentafa538c2bf00cf6cd28fc6b5fcea1a75894228a0 (diff)
Revert "pinctrl: remove pinctrl_remove_gpio_range"
This reverts earlier commit which removed pinctrl_remove_gpio_range(), because at that time there weren't any more users of that routine. It was removed as the removal of ranges was done in unregister of pinctrl. But as we are now registering stuff from gpiolib, we may remove and insert a gpio module multiple times. So, we need this routine again. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r--drivers/pinctrl/core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index cec6072cd7c1..b1086dcde15d 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -346,6 +346,20 @@ void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,
346EXPORT_SYMBOL_GPL(pinctrl_add_gpio_ranges); 346EXPORT_SYMBOL_GPL(pinctrl_add_gpio_ranges);
347 347
348/** 348/**
349 * pinctrl_remove_gpio_range() - remove a range of GPIOs fro a pin controller
350 * @pctldev: pin controller device to remove the range from
351 * @range: the GPIO range to remove
352 */
353void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
354 struct pinctrl_gpio_range *range)
355{
356 mutex_lock(&pinctrl_mutex);
357 list_del(&range->node);
358 mutex_unlock(&pinctrl_mutex);
359}
360EXPORT_SYMBOL_GPL(pinctrl_remove_gpio_range);
361
362/**
349 * pinctrl_get_group_selector() - returns the group selector for a group 363 * pinctrl_get_group_selector() - returns the group selector for a group
350 * @pctldev: the pin controller handling the group 364 * @pctldev: the pin controller handling the group
351 * @pin_group: the pin group to look up 365 * @pin_group: the pin group to look up