lkml.org 
[lkml]   [2019]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] iio: accel: adxl372: Make sure interrupts are disabled
Date
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@analog.com>
---
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);
}
--
2.7.4
\
 
 \ /
  Last update: 2019-09-03 11:20    [W:0.037 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site