diff options
Diffstat (limited to 'drivers/w1/masters/w1-gpio.c')
| -rw-r--r-- | drivers/w1/masters/w1-gpio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index a579f95be8f1..b03085c50afa 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -35,7 +35,7 @@ static u8 w1_gpio_set_pullup(void *data, int delay) * This will OVERRIDE open drain emulation and force-pull * the line high for some time. */ - gpiod_set_raw_value(ddata->gpiod, 1); + gpiod_direction_output_raw(ddata->gpiod, 1); msleep(ddata->pullup_duration); /* * This will simply set the line as input since we are doing @@ -89,6 +89,9 @@ static int w1_gpio_probe(struct platform_device *pdev) if (!master) return -ENOMEM; + if (device_property_present(dev, "raspberrypi,delay-needs-poll")) + master->delay_needs_poll = true; + ddata->gpiod = devm_gpiod_get_index(dev, NULL, 0, gflags); if (IS_ERR(ddata->gpiod)) return dev_err_probe(dev, PTR_ERR(ddata->gpiod), "gpio_request (pin) failed\n"); |
