Skip to content

Commit

Permalink
hid: hid-sensor-prox: Add more data field for hysteresis parsing
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
hongyans authored and jic23 committed Feb 25, 2017
1 parent 6a882a2 commit b010500
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/iio/light/hid-sensor-prox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b010500

Please sign in to comment.