summaryrefslogtreecommitdiff
path: root/include/linux/hid-sensor-ids.h
diff options
context:
space:
mode:
authorSong Hongyan <hongyan.song@intel.com>2017-01-05 13:24:04 +0300
committerJonathan Cameron <jic23@kernel.org>2017-01-05 16:07:24 +0300
commit0e377f3b9ae936aefe5aaca4c2e2546d57b63df7 (patch)
tree945539660c44e6b8860713402136ef121ba49f60 /include/linux/hid-sensor-ids.h
parent571299d099dcce0ff32c76e70e32e0ba01e55adc (diff)
downloadlinux-0e377f3b9ae936aefe5aaca4c2e2546d57b63df7.tar.xz
iio: Add gravity sensor support
Gravity sensor is a soft sensor, which derives value from standard accelerometer device by filtering out the acceleration which is not caused by gravity. Gravity sensor provides a three dimensional vector indicating the direction and magnitude of gravity. Typically, this sensor is used to determine the device's relative orientation in space. The units and the coordinate system is the same as the one used by the acceleration sensor. When a device is at rest, the output of the gravity sensor should be identical to that of the accelerometer. More information can be found in: http://www.usb.org/developers/hidpage/HUTRR59_-_Usages_for_Wearables.pdf Gravity sensor and accelerometer have similar channels and share channel usage ids. So the most of the code for accel_3d can be reused. Signed-off-by: Song Hongyan <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/hid-sensor-ids.h')
-rw-r--r--include/linux/hid-sensor-ids.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h
index 9a3a9db1b39d..30c7dc45e45f 100644
--- a/include/linux/hid-sensor-ids.h
+++ b/include/linux/hid-sensor-ids.h
@@ -52,6 +52,9 @@
#define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458
#define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459
+/* Gravity vector */
+#define HID_USAGE_SENSOR_GRAVITY_VECTOR 0x20007B
+
/* ORIENTATION: Compass 3D: (200083) */
#define HID_USAGE_SENSOR_COMPASS_3D 0x200083
#define HID_USAGE_SENSOR_DATA_ORIENTATION 0x200470