All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/5] Revert "pinctrl: remove pinctrl_remove_gpio_range"
Date: Sat, 27 Oct 2012 15:21:35 +0530	[thread overview]
Message-ID: <d08146fb6ea692330a2b0c6a4fe2df75edc0f20e.1351330569.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1351330569.git.viresh.kumar@linaro.org>

This reverts earlier commit which removed pinctrl_remove_gpio_range(), because
at that time there aren't any more users of that routine. It was removed as the
removal of ranges was done in unregister of pinctrl.

But because we are registering stuff from gpiolib now, we may remove and insert
a gpio module multiple times. So, we need that again.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---

This is V1 actually. Because it is part of this series, it is marked V2.

 drivers/pinctrl/core.c          | 14 ++++++++++++++
 include/linux/pinctrl/pinctrl.h |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index cec6072..b1086dc 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -346,6 +346,20 @@ void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,
 EXPORT_SYMBOL_GPL(pinctrl_add_gpio_ranges);
 
 /**
+ * pinctrl_remove_gpio_range() - remove a range of GPIOs fro a pin controller
+ * @pctldev: pin controller device to remove the range from
+ * @range: the GPIO range to remove
+ */
+void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
+			       struct pinctrl_gpio_range *range)
+{
+	mutex_lock(&pinctrl_mutex);
+	list_del(&range->node);
+	mutex_unlock(&pinctrl_mutex);
+}
+EXPORT_SYMBOL_GPL(pinctrl_remove_gpio_range);
+
+/**
  * pinctrl_get_group_selector() - returns the group selector for a group
  * @pctldev: the pin controller handling the group
  * @pin_group: the pin group to look up
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 7d087f0..eda0467 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -134,6 +134,8 @@ extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
 extern void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,
 				struct pinctrl_gpio_range *ranges,
 				unsigned nranges);
+extern void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
+				struct pinctrl_gpio_range *range);
 extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
 extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);
 #else
-- 
1.7.12.rc2.18.g61b472e

  reply	other threads:[~2012-10-27  9:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27  9:51 [PATCH V2 0/5] Pinctrl: SPEAr: Add support for plgpio driver Viresh Kumar
2012-10-27  9:51 ` Viresh Kumar [this message]
2012-11-06  8:07   ` [PATCH V2 1/5] Revert "pinctrl: remove pinctrl_remove_gpio_range" Linus Walleij
2012-10-27  9:51 ` [PATCH V2 RESEND 2/5] gpiolib: provide provision for gpiolib to register pin range Viresh Kumar
2012-11-06  8:03   ` Linus Walleij
2012-11-06  8:08     ` Viresh Kumar
2012-10-27  9:51 ` [PATCH V2 3/5] pinctrl: SPEAr: Add plgpio driver Viresh Kumar
2012-11-06  8:08   ` Linus Walleij
2012-10-27  9:51 ` [PATCH V2 4/5] pinctrl: SPEAr: Add gpio ranges support Viresh Kumar
2012-11-06  8:09   ` Linus Walleij
2012-11-06  8:11     ` Viresh Kumar
2012-11-06  8:27       ` Linus Walleij
2012-11-11 18:07   ` Linus Walleij
2012-10-27  9:51 ` [PATCH V2 5/5] ARM: SPEAr: Add plgpio node in device tree dtsi files Viresh Kumar
2012-11-11 18:09   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d08146fb6ea692330a2b0c6a4fe2df75edc0f20e.1351330569.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.