HID: hid-sensor-hub: Enhance get feature report API

Some hid sensor feature report can contain more than one reports.
This API can now support receiving multiple values from the feature
report.
Also update the parameters in the users of this API.

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>
This commit is contained in:
Srinivas Pandruvada 2015-02-19 15:35:25 -08:00 committed by Jiri Kosina
parent b3f4737d00
commit 6adc83fca7
4 changed files with 27 additions and 13 deletions

View file

@ -206,13 +206,15 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
* sensor_hub_get_feature() - Feature get request
* @report_id: Report id to look for
* @field_index: Field index inside a report
* @value: Place holder for return value
* @buffer_size: size of the buffer
* @buffer: buffer to copy output
*
* Used to get a field in feature report. For example this can get polling
* interval, sensitivity, activate/deactivate state.
* interval, sensitivity, activate/deactivate state. On success it returns
* number of bytes copied to buffer. On failure, it returns value < 0.
*/
int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
u32 field_index, s32 *value);
u32 field_index, int buffer_size, void *buffer);
/* hid-sensor-attributes */