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>
This commit is contained in:

committed by
Enric Balletbo i Serra

parent
d9452adcc5
commit
69f0793eb6
@@ -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
|
||||
|
Reference in New Issue
Block a user