diff options
author | Eugen Hristev <eugen.hristev@microchip.com> | 2021-06-23 16:11:58 +0300 |
---|---|---|
committer | Eugen Hristev <eugen.hristev@microchip.com> | 2021-07-06 15:17:10 +0300 |
commit | dffea443a3c4d899085f7c0d307dbb8e88ea849a (patch) | |
tree | 8e77ebf46ec9803ea29273b17ed669dcbc292411 | |
parent | 1311dd37ecf476be041d0452d4ee38619aadd5de (diff) | |
download | u-boot-dffea443a3c4d899085f7c0d307dbb8e88ea849a.zip u-boot-dffea443a3c4d899085f7c0d307dbb8e88ea849a.tar.gz u-boot-dffea443a3c4d899085f7c0d307dbb8e88ea849a.tar.bz2 |
w1: w1-gpio: claim the gpio with correct initial flag
gpio_request_by_name should be called with proper flags.
The 0 value flag is invalid, and causes bad initialization of the gpio.
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
-rw-r--r-- | drivers/w1/w1-gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c index 3b0ead6..9346f81 100644 --- a/drivers/w1/w1-gpio.c +++ b/drivers/w1/w1-gpio.c @@ -156,7 +156,7 @@ static int w1_gpio_of_to_plat(struct udevice *dev) struct w1_gpio_pdata *pdata = dev_get_plat(dev); int ret; - ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, 0); + ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, GPIOD_IS_IN); if (ret < 0) printf("Error claiming GPIO %d\n", ret); |