mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] of: gpio: Add Kconfig variable to depend on
Date: Fri, 22 Nov 2013 15:55:22 +0100	[thread overview]
Message-ID: <1385132122-4725-1-git-send-email-s.hauer@pengutronix.de> (raw)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/of/Kconfig  | 5 +++++
 drivers/of/Makefile | 2 +-
 include/of_gpio.h   | 6 +++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index 6b893d7..cdf7ac7 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -19,6 +19,11 @@ config OF_NET
 	depends on NET
 	def_bool y
 
+config OF_GPIO
+	depends on CONFIG_GPIOLIB
+	depends on CONFIG_OFDEVICE
+	def_bool y
+
 config OF_BAREBOX_DRIVERS
 	depends on OFDEVICE
 	depends on ENV_HANDLING
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index a19a8af..c883e51 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -1,6 +1,6 @@
 obj-y += address.o base.o fdt.o platform.o
 obj-$(CONFIG_OFTREE_MEM_GENERIC) += mem_generic.o
-obj-$(CONFIG_GPIOLIB) += of_gpio.o
+obj-$(CONFIG_OF_GPIO) += of_gpio.o
 obj-y += partition.o
 obj-y += of_net.o
 obj-$(CONFIG_MTD) += of_mtd.o
diff --git a/include/of_gpio.h b/include/of_gpio.h
index 50536a8..d42b18e 100644
--- a/include/of_gpio.h
+++ b/include/of_gpio.h
@@ -21,11 +21,11 @@ enum of_gpio_flags {
 	OF_GPIO_ACTIVE_LOW = 0x1,
 };
 
-#ifdef CONFIG_OFTREE
+#ifdef CONFIG_OF_GPIO
 extern int of_get_named_gpio_flags(struct device_node *np,
 		const char *list_name, int index, enum of_gpio_flags *flags);
 
-#else /* CONFIG_OFTREE */
+#else /* CONFIG_OF_GPIO */
 
 static inline int of_get_named_gpio_flags(struct device_node *np,
 		const char *list_name, int index, enum of_gpio_flags *flags)
@@ -33,7 +33,7 @@ static inline int of_get_named_gpio_flags(struct device_node *np,
 	return -ENOSYS;
 }
 
-#endif /* CONFIG_OFTREE */
+#endif /* CONFIG_OF_GPIO */
 
 static inline int of_get_named_gpio(struct device_node *np,
 				const char *list_name, int index)
-- 
1.8.4.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2013-11-22 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 14:55 Sascha Hauer [this message]
2013-11-23  6:21 ` Alexander Aring
2013-11-27  7:53   ` Sascha Hauer

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=1385132122-4725-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox