linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions
@ 2012-04-04 15:14 Mark Brown
  2012-04-04 15:14 ` [PATCH 2/2] gpiolib: Implement devm_gpio_request_one() Mark Brown
  2012-04-06  4:40 ` [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions Grant Likely
  0 siblings, 2 replies; 12+ messages in thread
From: Mark Brown @ 2012-04-04 15:14 UTC (permalink / raw)
  To: Grant Likely, Linus Walleij; +Cc: linux-kernel, Mark Brown

Currently the managed gpio_request() and gpio_free() are not stubbed out
for configurations not using gpiolib - do that to aid use in drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/linux/gpio.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index f8b46af..ceb8eef 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -89,6 +89,12 @@ static inline int gpio_request(unsigned gpio, const char *label)
 	return -ENOSYS;
 }
 
+static inline int devm_gpio_request(struct device *dev, unsigned gpio,
+				    const char *label)
+{
+	return -ENOSYS;
+}
+
 static inline int gpio_request_one(unsigned gpio,
 					unsigned long flags, const char *label)
 {
@@ -108,6 +114,14 @@ static inline void gpio_free(unsigned gpio)
 	WARN_ON(1);
 }
 
+static inline void devm_gpio_free(struct device *dev, unsigned gpio)
+{
+	might_sleep();
+
+	/* GPIO can never have been requested */
+	WARN_ON(1);
+}
+
 static inline void gpio_free_array(const struct gpio *array, size_t num)
 {
 	might_sleep();
-- 
1.7.9.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions
@ 2012-05-02 11:46 Mark Brown
  2012-05-02 11:46 ` [PATCH 2/2] gpiolib: Implement devm_gpio_request_one() Mark Brown
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2012-05-02 11:46 UTC (permalink / raw)
  To: Grant Likely, Linus Walleij; +Cc: linux-kernel, Mark Brown

Currently the managed gpio_request() and gpio_free() are not stubbed out
for configurations not using gpiolib - do that to aid use in drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---

I thought you'd applied this but it's not showing up in -next.

 include/linux/gpio.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index d1890d46..8e0fe1b 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -66,6 +66,12 @@ static inline int devm_gpio_request(struct device *dev, unsigned gpio,
 	return -ENOSYS;
 }
 
+static inline int devm_gpio_request(struct device *dev, unsigned gpio,
+				    const char *label)
+{
+	return -ENOSYS;
+}
+
 static inline int gpio_request_one(unsigned gpio,
 					unsigned long flags, const char *label)
 {
@@ -93,6 +99,14 @@ static inline void devm_gpio_free(struct device *dev, unsigned gpio)
 	WARN_ON(1);
 }
 
+static inline void devm_gpio_free(struct device *dev, unsigned gpio)
+{
+	might_sleep();
+
+	/* GPIO can never have been requested */
+	WARN_ON(1);
+}
+
 static inline void gpio_free_array(const struct gpio *array, size_t num)
 {
 	might_sleep();
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-05-18  0:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 15:14 [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions Mark Brown
2012-04-04 15:14 ` [PATCH 2/2] gpiolib: Implement devm_gpio_request_one() Mark Brown
2012-04-06  4:48   ` Grant Likely
2012-04-06 14:49     ` Mark Brown
2012-04-07  2:25       ` Grant Likely
2012-04-07  9:00         ` Mark Brown
2012-04-07  9:16           ` Mark Brown
2012-04-06  4:40 ` [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2012-05-02 11:46 Mark Brown
2012-05-02 11:46 ` [PATCH 2/2] gpiolib: Implement devm_gpio_request_one() Mark Brown
2012-05-12 19:05   ` Mark Brown
2012-05-18  0:10     ` Grant Likely
2012-05-12 23:19   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).