From: Jonathan Cameron <jic23@kernel.org>
To: Stefan Popa <stefan.popa@analog.com>
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>
Subject: Re: [PATCH 3/3] iio: accel: adxl372: Make sure interrupts are disabled
Date: Sun, 8 Sep 2019 10:31:45 +0100 [thread overview]
Message-ID: <20190908103145.7d2f763b@archlinux> (raw)
In-Reply-To: <1567502351-10429-1-git-send-email-stefan.popa@analog.com>
On Tue, 3 Sep 2019 12:19:11 +0300
Stefan Popa <stefan.popa@analog.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@analog.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);
> }
prev parent reply other threads:[~2019-09-08 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 9:19 [PATCH 3/3] iio: accel: adxl372: Make sure interrupts are disabled Stefan Popa
2019-09-08 9:31 ` Jonathan Cameron [this message]
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=20190908103145.7d2f763b@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--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 \
--cc=stefan.popa@analog.com \
/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.