HID: hid-sensor-hub: Extend API for async reads
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 19 Feb 2015 23:33:56 +0000 (15:33 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 23 Feb 2015 14:16:37 +0000 (15:16 +0100)
commitb3f4737d00de317d1549d5cb5b1dad90e19f5cec
tree92cb55d8f19f340f2daf779336368cb3a34e8426
parentcb67126f32f008b9abe97fbfca9b23a797b2458a
HID: hid-sensor-hub: Extend API for async reads

Add additional flag to read in async mode. In this mode the caller will get
reply via registered callback for capture_sample. Callbacks can be registered
using sensor_hub_register_callback function. The usage id parameter of the
capture_sample can be matched with the usage id of the requested attribute.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-hub.c
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/light/hid-sensor-prox.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c
drivers/iio/orientation/hid-sensor-incl-3d.c
drivers/iio/pressure/hid-sensor-press.c
drivers/rtc/rtc-hid-sensor-time.c
include/linux/hid-sensor-hub.h