android_kernel_samsung_univ.../include/linux/iio
Lars-Peter Clausen d2c3d072c4 iio: Add iio_push_buffers_with_timestamp() helper
Drivers using software buffers often store the timestamp in their data buffer
before calling iio_push_to_buffers() with that data buffer. Storing the
timestamp in the buffer usually involves some ugly pointer arithmetic. This
patch adds a new helper function called iio_push_buffers_with_timestamp() which
is similar to iio_push_to_buffers but takes an additional timestamp parameter.
The function will help to hide to uglyness in one central place instead of
exposing it in every driver. If timestamps are enabled for the IIO device
iio_push_buffers_with_timestamp() will store the timestamp as the last element
in buffer, before passing the buffer on to iio_push_buffers(). The buffer needs
large enough to hold the timestamp in this case. If timestamps are disabled
iio_push_buffers_with_timestamp() will behave just like iio_push_buffers().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Cc: Josh Wu <josh.wu@atmel.com>
Cc: Denis Ciocca <denis.ciocca@gmail.com>
Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Cc: Ge Gao <ggao@invensense.com>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-21 19:23:50 +01:00
..
adc iio:adc:ad_sigma_delta move to info_mask_(shared_by_type/separate) 2013-03-17 19:49:24 +00:00
common iio: pressure-core: st: Allow for number of channels to vary 2013-09-14 21:17:17 +01:00
dac
frequency iio: frequency: adf4350: cast value to unsigned to make code checkers happy 2013-06-04 18:36:52 +01:00
gyro itg3200: fix incorrect ifdef comment 2013-03-18 10:59:42 +01:00
imu staging:iio:accel:adis move to info_mask_(shared_by_type/separate) 2013-03-17 19:49:37 +00:00
buffer.h iio: Add iio_push_buffers_with_timestamp() helper 2013-09-21 19:23:50 +01:00
consumer.h iio: iio_push_to_buffers(): Change type of 'data' to const void * 2013-09-15 19:02:07 +01:00
driver.h iio: Simplify iio_map_array_unregister API 2013-02-02 12:02:20 +00:00
events.h
iio.h iio: add info_mask_[shared_by_dir/shared_by_all] 2013-09-15 17:45:49 +01:00
kfifo_buf.h
machine.h
sysfs.h iio: Add INT_TIME (integration time) channel info attribute 2013-09-14 21:16:44 +01:00
trigger_consumer.h
trigger.h iio:trigger: Fix use_count race condition 2013-07-20 10:18:53 +01:00
triggered_buffer.h
types.h