Re: [PATCH 2/2 V3] iio: adc: ad7124: Set IRQ type to falling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Jan 2020 12:26:53 +0200
Alexandru Tachici <alexandru.tachici@xxxxxxxxxx> 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@xxxxxxxxxx>
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,




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux