diff options
Diffstat (limited to 'drivers/w1/masters/w1-gpio.c')
-rw-r--r-- | drivers/w1/masters/w1-gpio.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 9709b8b484ba..1d111e56c8c8 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c | |||
@@ -89,11 +89,22 @@ static int w1_gpio_probe_dt(struct platform_device *pdev) | |||
89 | pdata->is_open_drain = 1; | 89 | pdata->is_open_drain = 1; |
90 | 90 | ||
91 | gpio = of_get_gpio(np, 0); | 91 | gpio = of_get_gpio(np, 0); |
92 | if (gpio < 0) | 92 | if (gpio < 0) { |
93 | if (gpio != -EPROBE_DEFER) | ||
94 | dev_err(&pdev->dev, | ||
95 | "Failed to parse gpio property for data pin (%d)\n", | ||
96 | gpio); | ||
97 | |||
93 | return gpio; | 98 | return gpio; |
99 | } | ||
94 | pdata->pin = gpio; | 100 | pdata->pin = gpio; |
95 | 101 | ||
96 | pdata->ext_pullup_enable_pin = of_get_gpio(np, 1); | 102 | gpio = of_get_gpio(np, 1); |
103 | if (gpio == -EPROBE_DEFER) | ||
104 | return gpio; | ||
105 | /* ignore other errors as the pullup gpio is optional */ | ||
106 | pdata->ext_pullup_enable_pin = gpio; | ||
107 | |||
97 | pdev->dev.platform_data = pdata; | 108 | pdev->dev.platform_data = pdata; |
98 | 109 | ||
99 | return 0; | 110 | return 0; |
@@ -107,10 +118,8 @@ static int w1_gpio_probe(struct platform_device *pdev) | |||
107 | 118 | ||
108 | if (of_have_populated_dt()) { | 119 | if (of_have_populated_dt()) { |
109 | err = w1_gpio_probe_dt(pdev); | 120 | err = w1_gpio_probe_dt(pdev); |
110 | if (err < 0) { | 121 | if (err < 0) |
111 | dev_err(&pdev->dev, "Failed to parse DT\n"); | ||
112 | return err; | 122 | return err; |
113 | } | ||
114 | } | 123 | } |
115 | 124 | ||
116 | pdata = dev_get_platdata(&pdev->dev); | 125 | pdata = dev_get_platdata(&pdev->dev); |