summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ad7124.c
diff options
context:
space:
mode:
authorAlexandru Tachici <alexandru.tachici@analog.com>2020-01-13 13:26:52 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-01-18 14:43:16 +0300
commitda4d3d6bb9f6047217d549c233303161bb4678d9 (patch)
tree7fe8a285615263a6e767f2dab13ef20f223323aa /drivers/iio/adc/ad7124.c
parenta4e6f40c77afe6e6a0076c4bcf7cbf68406a7d9f (diff)
downloadlinux-da4d3d6bb9f6047217d549c233303161bb4678d9.tar.xz
iio: adc: ad-sigma-delta: Allow custom IRQ flags
Before this patch the ad_sigma_delta implementation hardcoded the irq trigger type to low, assuming that all Sigma-Delta ADCs have the same interrupt-type. This patch allows all drivers using the ad_sigma_delta layer to set the irq trigger type to the one specified in the datasheet. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ad7124.c')
-rw-r--r--drivers/iio/adc/ad7124.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index 3f03abf100b5..63df2e2a8caf 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -9,6 +9,7 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
+#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
@@ -224,6 +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,
};
static int ad7124_set_channel_odr(struct ad7124_state *st,