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)
commita96cd0f901eecd9589477cc2cd46bdb4f1f3e49a
treee69ecac2bcf8692050cb2ffde059c9e562fc4576
parent902c4b2446d468cc6e4940db1aa72ee4d144dd35
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