diff options
author | Pantelis Antoniou <panto@antoniou-consulting.com> | 2012-11-21 16:13:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-26 19:16:25 -0500 |
commit | 277ed0d542778182c863c30bdbd2441dee3f964c (patch) | |
tree | 0cb7171d001e3fa4c469bf74c3b98f65ef48ff71 /drivers/w1 | |
parent | 5f7e22283cec597e532b75d5a455ce6ed75de362 (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')
-rw-r--r-- | drivers/w1/masters/w1-gpio.c | 7 |
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 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
18 | #include <linux/of_gpio.h> | 18 | #include <linux/of_gpio.h> |
19 | #include <linux/pinctrl/consumer.h> | ||
20 | #include <linux/err.h> | ||
19 | 21 | ||
20 | #include "../w1.h" | 22 | #include "../w1.h" |
21 | #include "../w1_int.h" | 23 | #include "../w1_int.h" |
@@ -85,8 +87,13 @@ static int __init w1_gpio_probe(struct platform_device *pdev) | |||
85 | { | 87 | { |
86 | struct w1_bus_master *master; | 88 | struct w1_bus_master *master; |
87 | struct w1_gpio_platform_data *pdata; | 89 | struct w1_gpio_platform_data *pdata; |
90 | struct pinctrl *pinctrl; | ||
88 | int err; | 91 | int err; |
89 | 92 | ||
93 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
94 | if (IS_ERR(pinctrl)) | ||
95 | dev_warn(&pdev->dev, "unable to select pin group\n"); | ||
96 | |||
90 | err = w1_gpio_probe_dt(pdev); | 97 | err = w1_gpio_probe_dt(pdev); |
91 | if (err < 0) | 98 | if (err < 0) |
92 | return err; | 99 | return err; |