aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/iio
diff options
context:
space:
mode:
authorAlexandru Tachici <alexandru.tachici@analog.com>2020-01-13 12:26:52 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-01-18 11:43:16 +0000
commitda4d3d6bb9f6047217d549c233303161bb4678d9 (patch)
tree7fe8a285615263a6e767f2dab13ef20f223323aa /include/linux/iio
parentiio: imu: adis: use new `delay` structure for SPI transfer delays (diff)
downloadwireguard-linux-da4d3d6bb9f6047217d549c233303161bb4678d9.tar.xz
wireguard-linux-da4d3d6bb9f6047217d549c233303161bb4678d9.zip
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 'include/linux/iio')
-rw-r--r--include/linux/iio/adc/ad_sigma_delta.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h
index 8a4e25a7080c..5a127c0ed200 100644
--- a/include/linux/iio/adc/ad_sigma_delta.h
+++ b/include/linux/iio/adc/ad_sigma_delta.h
@@ -40,6 +40,7 @@ struct iio_dev;
* @read_mask: Mask for the communications register having the read bit set.
* @data_reg: Address of the data register, if 0 the default address of 0x3 will
* be used.
+ * @irq_flags: flags for the interrupt used by the triggered buffer
*/
struct ad_sigma_delta_info {
int (*set_channel)(struct ad_sigma_delta *, unsigned int channel);
@@ -49,6 +50,7 @@ struct ad_sigma_delta_info {
unsigned int addr_shift;
unsigned int read_mask;
unsigned int data_reg;
+ unsigned long irq_flags;
};
/**