linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Antti Keränen" <detegr@rbx.email>
Cc: linux-iio@vger.kernel.org, Hannu Hartikainen <hannu@hrtk.in>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Nuno Sa <nuno.sa@analog.com>,
	linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v2] iio: adis: set GPIO reset pin direction
Date: Tue, 13 Jul 2021 18:53:11 +0100	[thread overview]
Message-ID: <20210713185311.200023ef@jic23-huawei> (raw)
In-Reply-To: <20210708095425.13295-1-detegr@rbx.email>

On Thu,  8 Jul 2021 12:54:29 +0300
Antti Keränen <detegr@rbx.email> wrote:

> Set reset pin direction to output as the reset pin needs to be an active
> low output pin.
> 
> Co-developed-by: Hannu Hartikainen <hannu@hrtk.in>
> Signed-off-by: Hannu Hartikainen <hannu@hrtk.in>
> Signed-off-by: Antti Keränen <detegr@rbx.email>

So this sits on the boundary of whether it is a fix or not.
Do we want this to go into rc1 + stable?

If so a fixes tag would be great.

Thanks,

Jonathan

> ---
> Removed unnecessary toggling of the pin as requested by Lars-Peter. I
> missed out on the conversation, but I agree this is better.
> 
>  drivers/iio/imu/adis.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> index 319b64b2fd88..f8b7837d8b8f 100644
> --- a/drivers/iio/imu/adis.c
> +++ b/drivers/iio/imu/adis.c
> @@ -415,12 +415,11 @@ int __adis_initial_startup(struct adis *adis)
>  	int ret;
>  
>  	/* check if the device has rst pin low */
> -	gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_ASIS);
> +	gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_OUT_HIGH);
>  	if (IS_ERR(gpio))
>  		return PTR_ERR(gpio);
>  
>  	if (gpio) {
> -		gpiod_set_value_cansleep(gpio, 1);
>  		msleep(10);
>  		/* bring device out of reset */
>  		gpiod_set_value_cansleep(gpio, 0);


  parent reply	other threads:[~2021-07-13 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <60e5ac8c.1c69fb81.c69f0.abab@mx.google.com>
2021-07-08  9:54 ` [PATCH v2] iio: adis: set GPIO reset pin direction Antti Keränen
2021-07-08 10:05   ` Sa, Nuno
2021-07-10 17:35   ` Jonathan Cameron
2021-07-13 17:53   ` Jonathan Cameron [this message]
2021-07-14 10:04     ` Antti Keränen
2021-07-14 12:40       ` Jonathan Cameron
2021-07-14 18:25         ` Antti Keränen
2021-07-17 17:41           ` Jonathan Cameron

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=20210713185311.200023ef@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=detegr@rbx.email \
    --cc=hannu@hrtk.in \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /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;
as well as URLs for NNTP newsgroup(s).