summaryrefslogtreecommitdiffstats
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorSong Hongyan <hongyan.song@intel.com>2017-02-22 10:23:33 +0100
committerJonathan Cameron <jic23@kernel.org>2017-02-25 17:43:18 +0100
commitb0105002816907daf72e984a72e16e3a5f2471cc (patch)
tree1b967847b1791e8ee0df5c004aa3cf20f8f398a2 /drivers/iio/light
parentiio: adc: meson-saradc: improve meson_sar_adc_read_raw_sample (diff)
downloadlinux-b0105002816907daf72e984a72e16e3a5f2471cc.tar.xz
linux-b0105002816907daf72e984a72e16e3a5f2471cc.zip
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')
-rw-r--r--drivers/iio/light/hid-sensor-prox.c7
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;
}