diff options
author | Lukasz Czerwinski <l.czerwinski@samsung.com> | 2013-05-23 13:35:28 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:43:10 +0900 |
commit | 4c85a153a73e9b2d6f8991b389eb76c031825a13 (patch) | |
tree | 42dc93baa1ecdec917fac404bc1c1833d0e21211 /include | |
parent | 28e52bfb3c5bd51acd369a0b05b203b979ac9a36 (diff) | |
download | linux-3.10-4c85a153a73e9b2d6f8991b389eb76c031825a13.tar.gz linux-3.10-4c85a153a73e9b2d6f8991b389eb76c031825a13.tar.bz2 linux-3.10-4c85a153a73e9b2d6f8991b389eb76c031825a13.zip |
iio: st_sensors: Add handling of multiple interrupts
This patch adds handling of multiple interrupts for st_sensors.
Each mapped interrupt can be declared from DT.
Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/iio/common/st_sensors.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 172c5b23cb8..2fd12a62113 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h @@ -42,6 +42,13 @@ #define ST_SENSORS_MAX_NAME 17 #define ST_SENSORS_MAX_4WAI 7 +#define ST_SENSORS_INT_MAX 2 +#define ST_SENSORS_INT1 0 +#define ST_SENSORS_INT2 1 +#define ST_SENSORS_MAP_ONLY_DRDY_IRQ 1 +#define ST_SENSORS_MAP_ONLY_EVENT_IRQ 2 + + #define ST_SENSORS_LSM_CHANNELS(device_type, index, mod, endian, bits, addr) \ { \ .type = device_type, \ @@ -204,6 +211,7 @@ struct st_sensors { * @multiread_bit: Use or not particular bit for [I2C/SPI] multiread. * @buffer_data: Data used by buffer part. * @odr: Output data rate of the sensor [Hz]. + * @irq_map: Container of mapped IRQs. * @get_irq_data_ready: Function to get the IRQ used for data ready signal. * @tf: Transfer function structure used by I/O operations. * @tb: Transfer buffers and mutex used by I/O operations. @@ -220,6 +228,7 @@ struct st_sensor_data { char *buffer_data; unsigned int odr; + unsigned int irq_map[ST_SENSORS_INT_MAX]; unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev); |