diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/iio/iio.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 75a8a20c8179..5f2d00e7e488 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -254,12 +254,16 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, | |||
| 254 | (chan->info_mask_shared_by_all & BIT(type)); | 254 | (chan->info_mask_shared_by_all & BIT(type)); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | #define IIO_ST(si, rb, sb, sh) \ | 257 | #define IIO_CHAN_SOFT_TIMESTAMP(_si) { \ |
| 258 | { .sign = si, .realbits = rb, .storagebits = sb, .shift = sh } | 258 | .type = IIO_TIMESTAMP, \ |
| 259 | 259 | .channel = -1, \ | |
| 260 | #define IIO_CHAN_SOFT_TIMESTAMP(_si) \ | 260 | .scan_index = _si, \ |
| 261 | { .type = IIO_TIMESTAMP, .channel = -1, \ | 261 | .scan_type = { \ |
| 262 | .scan_index = _si, .scan_type = IIO_ST('s', 64, 64, 0) } | 262 | .sign = 's', \ |
| 263 | .realbits = 64, \ | ||
| 264 | .storagebits = 64, \ | ||
| 265 | }, \ | ||
| 266 | } | ||
| 263 | 267 | ||
| 264 | /** | 268 | /** |
| 265 | * iio_get_time_ns() - utility function to get a time stamp for events etc | 269 | * iio_get_time_ns() - utility function to get a time stamp for events etc |
