aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid-sensor-ids.h
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2017-04-07 19:22:06 -0700
committerJonathan Cameron <jic23@kernel.org>2017-05-16 19:44:01 +0100
commit138bc7969c24c6cbba28e919c2376ad10a46fc60 (patch)
tree0de82ecba4edebb0bcd40fc10663b952027bdf24 /include/linux/hid-sensor-ids.h
parentiio: tsl2583: add runtime power management support (diff)
downloadlinux-dev-138bc7969c24c6cbba28e919c2376ad10a46fc60.tar.xz
linux-dev-138bc7969c24c6cbba28e919c2376ad10a46fc60.zip
iio: hid-sensor-hub: Implement batch mode
HID sensor hubs using Integrated Senor Hub (ISH) has added capability to support batch mode. This allows host processor to go to sleep for extended duration, while the sensor hub is storing samples in its internal buffers. 'Commit f4f4673b7535 ("iio: add support for hardware fifo")' implements feature in IIO core to implement such feature. This feature is used in bmc150-accel-core.c to implement batch mode. This implementation allows software device buffer watermark to be used as a hint to adjust hardware FIFO. But HID sensor hubs don't allow to change internal buffer size of FIFOs. Instead an additional usage id to set "maximum report latency" is defined. This allows host to go to sleep upto this latency period without getting any report. Since there is no ABI to set this latency, a new attribute "hwfifo_timeout" is added so that user mode can specify a latency. This change checks presence of usage id to get/set maximum report latency and if present, it will expose hwfifo_timeout. Signed-off-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 5af62c7e49f3..76033e0420a7 100644
--- a/include/linux/hid-sensor-ids.h
+++ b/include/linux/hid-sensor-ids.h
@@ -152,6 +152,9 @@
#define HID_USAGE_SENSOR_PROP_REPORT_STATE 0x200316
#define HID_USAGE_SENSOR_PROY_POWER_STATE 0x200319
+/* Batch mode selectors */
+#define HID_USAGE_SENSOR_PROP_REPORT_LATENCY 0x20031B
+
/* Per data field properties */
#define HID_USAGE_SENSOR_DATA_MOD_NONE 0x00
#define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS 0x1000