From: Eugen Hristev Date: Wed, 23 Jun 2021 13:11:58 +0000 (+0300) Subject: w1: w1-gpio: claim the gpio with correct initial flag X-Git-Tag: v2025.01-rc5-pxa1908~1814^2~1 X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=dffea443a3c4d899085f7c0d307dbb8e88ea849a;p=u-boot.git 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 --- diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c index 3b0ead6f6d..9346f810ce 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);