]> git.baikalelectronics.ru Git - kernel.git/commit
iio: accel: hid-sensor-accel-3d: Add timestamp
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 28 Nov 2016 22:41:16 +0000 (14:41 -0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Dec 2016 10:06:13 +0000 (10:06 +0000)
commit3ad65f3440767d3c3a982b8416e79660e0433e29
treee69ecac2bcf8692050cb2ffde059c9e562fc4576
parent998369a2a9d2621941fb54ec55a6a17da9f415d3
iio: accel: hid-sensor-accel-3d: Add timestamp

Added timestamp channel. With this change, each sample has a timestamp.
This timestamp can be from the sensor hub when present or local kernel
timestamp. HID sensors can send timestamp with input data using usage id
HID_USAGE_SENSOR_TIME_TIMESTAMP. This timestamp value is converted to
nano seconds before pushing this sample to the iio core.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/common/hid-sensors/hid-sensor-attributes.c
include/linux/hid-sensor-hub.h
include/linux/hid-sensor-ids.h