All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Popa <stefan.popa@analog.com>
To: <jic23@kernel.org>
Cc: <Michael.Hennerich@analog.com>, <knaack.h@gmx.de>,
	<lars@metafoo.de>, <pmeerw@pmeerw.net>,
	<linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>,
	<stefan.popa@analog.com>
Subject: [PATCH 3/3] iio: accel: adxl372: Make sure interrupts are disabled
Date: Tue, 3 Sep 2019 12:19:11 +0300	[thread overview]
Message-ID: <1567502351-10429-1-git-send-email-stefan.popa@analog.com> (raw)

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


             reply	other threads:[~2019-09-03  9:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  9:19 Stefan Popa [this message]
2019-09-08  9:31 ` [PATCH 3/3] iio: accel: adxl372: Make sure interrupts are disabled 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=1567502351-10429-1-git-send-email-stefan.popa@analog.com \
    --to=stefan.popa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.