iio: accel: hid-sensor-accel-3d: Add timestamp
BugLink: http://bugs.launchpad.net/bugs/1645521
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>
(cherry picked from commit
a96cd0f901eecd9589477cc2cd46bdb4f1f3e49a)
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>