linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] w1-gpio: Pinctrl-fy
@ 2012-10-31 15:57 Pantelis Antoniou
  2012-10-30 18:26 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Pantelis Antoniou @ 2012-10-31 15:57 UTC (permalink / raw)
  To: Evgeniy Polyakov
  Cc: Pantelis Antoniou, linux-kernel, Koen Kooi, Matt Porter,
	Russ Dill, linux-omap

Enable pinctrl for w1-gpio.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/w1/masters/w1-gpio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index 6012c4e..aec35bd 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -16,6 +16,8 @@
 #include <linux/gpio.h>
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/err.h>
 
 #include "../w1.h"
 #include "../w1_int.h"
@@ -85,8 +87,13 @@ static int __init w1_gpio_probe(struct platform_device *pdev)
 {
 	struct w1_bus_master *master;
 	struct w1_gpio_platform_data *pdata;
+	struct pinctrl *pinctrl;
 	int err;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		dev_warn(&pdev->dev, "unable to select pin group\n");
+
 	err = w1_gpio_probe_dt(pdev);
 	if (err < 0)
 		return err;
-- 
1.7.12

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

end of thread, other threads:[~2012-11-05 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 15:57 [PATCH] w1-gpio: Pinctrl-fy Pantelis Antoniou
2012-10-30 18:26 ` Tony Lindgren
2012-11-05 15:45   ` Evgeniy Polyakov
2012-11-05 16:13     ` Tony Lindgren

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).