summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexandru Tachici <alexandru.tachici@analog.com>2020-01-13 13:26:53 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-01-18 14:43:16 +0300
commit79ef91493f5494e9ddbad85bf571ec03940a7f5c (patch)
tree7b873ff44fa37fe3cc3e608992ca2d0b914d9459 /drivers
parentda4d3d6bb9f6047217d549c233303161bb4678d9 (diff)
downloadlinux-79ef91493f5494e9ddbad85bf571ec03940a7f5c.tar.xz
iio: adc: ad7124: Set IRQ type to falling
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> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/adc/ad7124.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index 63df2e2a8caf..52f45b13da4a 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -225,7 +225,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,