lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210713185311.200023ef@jic23-huawei>
Date:   Tue, 13 Jul 2021 18:53:11 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Antti Keränen <detegr@....email>
Cc:     linux-iio@...r.kernel.org, Hannu Hartikainen <hannu@...k.in>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Nuno Sa <nuno.sa@...log.com>,
        linux-kernel@...r.kernel.org (open list)
Subject: Re: [PATCH v2] iio: adis: set GPIO reset pin direction

On Thu,  8 Jul 2021 12:54:29 +0300
Antti Keränen <detegr@....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@...k.in>
> Signed-off-by: Hannu Hartikainen <hannu@...k.in>
> Signed-off-by: Antti Keränen <detegr@....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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ