brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0443-w1-w1-gpio-Make-GPIO-an-output-for-strong-pullup.patch
1 From afea1f84cbda94c47ba4a8f84d16c4330e145a0a Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 12 Jun 2019 17:15:05 +0100
4 Subject: [PATCH] w1: w1-gpio: Make GPIO an output for strong pullup
5
6 The logic to drive the data line high to implement a strong pullup
7 assumed that the pin was already an output - setting a value does
8 not change an input.
9
10 See: https://github.com/raspberrypi/firmware/issues/1143
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
13 ---
14 drivers/w1/masters/w1-gpio.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- a/drivers/w1/masters/w1-gpio.c
18 +++ b/drivers/w1/masters/w1-gpio.c
19 @@ -33,7 +33,7 @@ static u8 w1_gpio_set_pullup(void *data,
20 * This will OVERRIDE open drain emulation and force-pull
21 * the line high for some time.
22 */
23 - gpiod_set_raw_value(pdata->gpiod, 1);
24 + gpiod_direction_output_raw(pdata->gpiod, 1);
25 msleep(pdata->pullup_duration);
26 /*
27 * This will simply set the line as input since we are doing