diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-03-27 15:34:37 -0700 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-03-28 22:04:32 +0100 |
commit | 69f0793eb60dacd153388974bbaaa1d3184d171d (patch) | |
tree | d54ed7972466cfa6c9910128b655ee463f601c83 /include/linux/iio | |
parent | d9452adcc5b485ab1b50352d9356cde75ae6ac0e (diff) | |
download | linux-next-69f0793eb60dacd153388974bbaaa1d3184d171d.tar.gz |
iio: expose iio_device_set_clock
Some IIO devices may want to override the default (realtime) to another
clock source by default.
It can beneficial when timestamps coming from the hardware or underlying
drivers are already in that format.
It can always be overridden by attribute current_timestamp_clock.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/iio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 862ce0019eba..b18f34a8901f 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -627,6 +627,8 @@ static inline clockid_t iio_device_get_clock(const struct iio_dev *indio_dev) return indio_dev->clock_id; } +int iio_device_set_clock(struct iio_dev *indio_dev, clockid_t clock_id); + /** * dev_to_iio_dev() - Get IIO device struct from a device struct * @dev: The device embedded in the IIO device |