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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191012122810.5330fd7f@archlinux>
Date:   Sat, 12 Oct 2019 12:28:10 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        <devicetree@...r.kernel.org>, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v4 3/8] iio: adc: max1027: Reset the device at probe
 time

On Fri, 11 Oct 2019 16:43:42 +0200
Miquel Raynal <miquel.raynal@...tlin.com> wrote:

> All the registers are configured by the driver, let's reset the chip
> at probe time, avoiding any conflict with a possible earlier
> configuration.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/max1027.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
> index 823223b77a70..f9b473ee6711 100644
> --- a/drivers/iio/adc/max1027.c
> +++ b/drivers/iio/adc/max1027.c
> @@ -466,6 +466,14 @@ static int max1027_probe(struct spi_device *spi)
>  		}
>  	}
>  
> +	/* Internal reset */
> +	st->reg = MAX1027_RST_REG;
> +	ret = spi_write(st->spi, &st->reg, 1);
> +	if (ret < 0) {
> +		dev_err(&indio_dev->dev, "Failed to reset the ADC\n");
> +		return ret;
> +	}
> +
>  	/* Disable averaging */
>  	st->reg = MAX1027_AVG_REG;
>  	ret = spi_write(st->spi, &st->reg, 1);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ