diff options
author | Song Hongyan <hongyan.song@intel.com> | 2017-02-22 17:23:33 +0800 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-02-25 16:43:18 +0000 |
commit | b0105002816907daf72e984a72e16e3a5f2471cc (patch) | |
tree | 1b967847b1791e8ee0df5c004aa3cf20f8f398a2 /drivers/iio/light/hid-sensor-prox.c | |
parent | 6a882a2cbeb09b7c32610a644d5915d17b80b617 (diff) |
hid: hid-sensor-prox: Add more data field for hysteresis parsing
Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence sensitivity
parsing, in case some implementation uses it as sensitivity modifier.
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 'drivers/iio/light/hid-sensor-prox.c')
-rw-r--r-- | drivers/iio/light/hid-sensor-prox.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c index 45ca056f019e..73fced8a63b7 100644 --- a/drivers/iio/light/hid-sensor-prox.c +++ b/drivers/iio/light/hid-sensor-prox.c @@ -240,6 +240,13 @@ static int prox_parse_report(struct platform_device *pdev, st->common_attributes.sensitivity.index, st->common_attributes.sensitivity.report_id); } + if (st->common_attributes.sensitivity.index < 0) + sensor_hub_input_get_attribute_info(hsdev, + HID_FEATURE_REPORT, usage_id, + HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS | + HID_USAGE_SENSOR_HUMAN_PRESENCE, + &st->common_attributes.sensitivity); + return ret; } |