]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 30 Mar 2017 14:47:39 +0000 (08:47 -0600)
commit5f78b06d01cbb1a1b91b8b7aef3a9ea686dd558e
tree58eba7d576f244621bbf63a003d425242c45c804
parent6cf514519a6b05f6947c40a5790a6e4a6a56fafb
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>
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