All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Tachici <alexandru.tachici@analog.com>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2 V3] iio: adc: ad7124: Set IRQ type to falling
Date: Sat, 18 Jan 2020 11:20:07 +0000	[thread overview]
Message-ID: <20200118112007.43ab1f13@archlinux> (raw)
In-Reply-To: <20200113102653.20900-3-alexandru.tachici@analog.com>

On Mon, 13 Jan 2020 12:26:53 +0200
Alexandru Tachici <alexandru.tachici@analog.com> wrote:

> Ad7124 data-sheet specifies that the falling edge
> of the DOUT line should be used for an interrupt.
> The current irq flag (IRQF_TRIGGER_LOW) used will
> cause unwanted behaviour. When enabling the interrupt
> it will fire once because the DOUT line is already low.
> This will make the driver to read an unfinished conversion
> from the chip.
> 
> This patch sets the irq type to the one specified in
> the data-sheet.
> 
> Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ad7124.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
> index 9531d8a6cb27..9113f6d36ad4 100644
> --- a/drivers/iio/adc/ad7124.c
> +++ b/drivers/iio/adc/ad7124.c
> @@ -223,7 +223,7 @@ static const struct ad_sigma_delta_info ad7124_sigma_delta_info = {
>  	.addr_shift = 0,
>  	.read_mask = BIT(6),
>  	.data_reg = AD7124_DATA,
> -	.irq_flags = IRQF_TRIGGER_LOW,
> +	.irq_flags = IRQF_TRIGGER_FALLING,
>  };
>  
>  static int ad7124_set_channel_odr(struct ad7124_state *st,


      reply	other threads:[~2020-01-18 11:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 10:57 [PATCH] iio: ad_sigma_delta: Add custom irq flags Alexandru Tachici
2020-01-07  8:41 ` Tachici, Alexandru
2020-01-07 11:06 ` [PATCH V2] " Alexandru Tachici
2020-01-11 11:23   ` Jonathan Cameron
2020-01-13 10:26     ` [PATCH 0/2 V3] iio: adc: ad7124 fix wrong irq flag Alexandru Tachici
2020-01-13 10:26       ` [PATCH 1/2 V3] iio: adc: ad-sigma-delta: Allow custom IRQ flags Alexandru Tachici
2020-01-18 11:18         ` Jonathan Cameron
2020-01-13 10:26       ` [PATCH 2/2 V3] iio: adc: ad7124: Set IRQ type to falling Alexandru Tachici
2020-01-18 11:20         ` 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=20200118112007.43ab1f13@archlinux \
    --to=jic23@kernel.org \
    --cc=alexandru.tachici@analog.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.