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] [day] [month] [year] [list]
Date:   Sun, 8 Sep 2019 10:31:45 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Stefan Popa <stefan.popa@...log.com>
Cc:     <Michael.Hennerich@...log.com>, <knaack.h@....de>,
        <lars@...afoo.de>, <pmeerw@...erw.net>,
        <linux-kernel@...r.kernel.org>, <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 3/3] iio: accel: adxl372: Make sure interrupts are
 disabled

On Tue, 3 Sep 2019 12:19:11 +0300
Stefan Popa <stefan.popa@...log.com> wrote:

> This patch disables the adxl372 interrupts at setup. The interrupts
> should be enabled together with the iio buffer. Not doing this, might
> cause an unwanted interrupt to trigger without being able to properly
> clear it.
> 
> Signed-off-by: Stefan Popa <stefan.popa@...log.com>

Given the device has a software reset, would we be better off
just hitting that to make sure we are in a consistent state after
driver start up?

Thanks,

Jonathan


> ---
>  drivers/iio/accel/adxl372.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c
> index 72d3f45..77651f4 100644
> --- a/drivers/iio/accel/adxl372.c
> +++ b/drivers/iio/accel/adxl372.c
> @@ -609,6 +609,10 @@ static int adxl372_setup(struct adxl372_state *st)
>  	if (ret < 0)
>  		return ret;
>  
> +	ret = adxl372_set_interrupts(st, 0, 0);
> +	if (ret < 0)
> +		return ret;
> +
>  	/* Set the mode of operation to full bandwidth measurement mode */
>  	return adxl372_set_op_mode(st, ADXL372_FULL_BW_MEASUREMENT);
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ