summaryrefslogtreecommitdiff
path: root/drivers/w1/masters
diff options
context:
space:
mode:
authorPantelis Antoniou <panto@antoniou-consulting.com>2012-11-22 01:13:29 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 16:16:25 -0800
commit277ed0d542778182c863c30bdbd2441dee3f964c (patch)
tree0cb7171d001e3fa4c469bf74c3b98f65ef48ff71 /drivers/w1/masters
parent5f7e22283cec597e532b75d5a455ce6ed75de362 (diff)
w1-gpio: Pinctrl-fy
Enable pinctrl for w1-gpio. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/masters')
-rw-r--r--drivers/w1/masters/w1-gpio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index 6012c4ea3206..aec35bd46506 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;