From: Eugen Hristev <eugen.hristev@microchip.com>
To: <u-boot@lists.denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Subject: [PATCH 1/2] w1: w1-gpio: claim the gpio with correct initial flag
Date: Wed, 23 Jun 2021 17:20:16 +0300 [thread overview]
Message-ID: <20210623142017.634100-1-eugen.hristev@microchip.com> (raw)
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>
---
drivers/w1/w1-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.25.1
next reply other threads:[~2021-06-23 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 14:20 Eugen Hristev [this message]
2021-06-23 14:20 ` [PATCH 2/2] ARM: dts: at91: fix the GPIO polarity for onewire Eugen Hristev
2021-07-06 12:18 ` [PATCH 1/2] w1: w1-gpio: claim the gpio with correct initial flag Eugen.Hristev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210623142017.634100-1-eugen.hristev@microchip.com \
--to=eugen.hristev@microchip.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox