public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: <Eugen.Hristev@microchip.com>
To: <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/2] w1: w1-gpio: claim the gpio with correct initial flag
Date: Tue, 6 Jul 2021 12:18:24 +0000	[thread overview]
Message-ID: <d27999d7-46ff-bd50-87df-2f354e7b6cde@microchip.com> (raw)
In-Reply-To: <20210623142017.634100-1-eugen.hristev@microchip.com>

On 6/23/21 5:20 PM, Eugen Hristev wrote:
> 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);
>   
> 

Applied both to u-boot-atmel/master

      parent reply	other threads:[~2021-07-06 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 14:20 [PATCH 1/2] w1: w1-gpio: claim the gpio with correct initial flag Eugen Hristev
2021-06-23 14:20 ` [PATCH 2/2] ARM: dts: at91: fix the GPIO polarity for onewire Eugen Hristev
2021-07-06 12:18 ` Eugen.Hristev [this message]

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=d27999d7-46ff-bd50-87df-2f354e7b6cde@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