diff options
Diffstat (limited to 'include/linux/iio/common/st_sensors.h')
-rw-r--r-- | include/linux/iio/common/st_sensors.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index d029ffac0d69..99403b19092f 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
@@ -223,6 +223,8 @@ struct st_sensor_settings { | |||
223 | * @get_irq_data_ready: Function to get the IRQ used for data ready signal. | 223 | * @get_irq_data_ready: Function to get the IRQ used for data ready signal. |
224 | * @tf: Transfer function structure used by I/O operations. | 224 | * @tf: Transfer function structure used by I/O operations. |
225 | * @tb: Transfer buffers and mutex used by I/O operations. | 225 | * @tb: Transfer buffers and mutex used by I/O operations. |
226 | * @hw_irq_trigger: if we're using the hardware interrupt on the sensor. | ||
227 | * @hw_timestamp: Latest timestamp from the interrupt handler, when in use. | ||
226 | */ | 228 | */ |
227 | struct st_sensor_data { | 229 | struct st_sensor_data { |
228 | struct device *dev; | 230 | struct device *dev; |
@@ -247,6 +249,9 @@ struct st_sensor_data { | |||
247 | 249 | ||
248 | const struct st_sensor_transfer_function *tf; | 250 | const struct st_sensor_transfer_function *tf; |
249 | struct st_sensor_transfer_buffer tb; | 251 | struct st_sensor_transfer_buffer tb; |
252 | |||
253 | bool hw_irq_trigger; | ||
254 | s64 hw_timestamp; | ||
250 | }; | 255 | }; |
251 | 256 | ||
252 | #ifdef CONFIG_IIO_BUFFER | 257 | #ifdef CONFIG_IIO_BUFFER |
@@ -260,7 +265,8 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | |||
260 | const struct iio_trigger_ops *trigger_ops); | 265 | const struct iio_trigger_ops *trigger_ops); |
261 | 266 | ||
262 | void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); | 267 | void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); |
263 | 268 | int st_sensors_validate_device(struct iio_trigger *trig, | |
269 | struct iio_dev *indio_dev); | ||
264 | #else | 270 | #else |
265 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | 271 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, |
266 | const struct iio_trigger_ops *trigger_ops) | 272 | const struct iio_trigger_ops *trigger_ops) |
@@ -271,6 +277,7 @@ static inline void st_sensors_deallocate_trigger(struct iio_dev *indio_dev) | |||
271 | { | 277 | { |
272 | return; | 278 | return; |
273 | } | 279 | } |
280 | #define st_sensors_validate_device NULL | ||
274 | #endif | 281 | #endif |
275 | 282 | ||
276 | int st_sensors_init_sensor(struct iio_dev *indio_dev, | 283 | int st_sensors_init_sensor(struct iio_dev *indio_dev, |