Commit 4efd13c3 authored by Ye Xiang's avatar Ye Xiang Committed by Jonathan Cameron

hid-sensors: Add more data fields for sensitivity checking

Before, when reading/writing the hysteresis of als, incli-3d, press, and
rotation sensor, we will get invalid argument error.

This patch add more sensitivity data fields for these sensors, so that
these sensors can get sensitivity index and return correct hysteresis
value.
Signed-off-by: default avatarYe Xiang <xiang.ye@intel.com>
Link: https://lore.kernel.org/r/20210201054921.18214-3-xiang.ye@intel.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 0e41fd51
......@@ -41,6 +41,7 @@ struct als_state {
static const u32 als_sensitivity_addresses[] = {
HID_USAGE_SENSOR_DATA_LIGHT,
HID_USAGE_SENSOR_LIGHT_ILLUM,
};
/* Channel definitions */
......
......@@ -49,6 +49,7 @@ static const u32 incl_3d_addresses[INCLI_3D_CHANNEL_MAX] = {
static const u32 incl_3d_sensitivity_addresses[] = {
HID_USAGE_SENSOR_DATA_ORIENTATION,
HID_USAGE_SENSOR_ORIENT_TILT,
};
/* Channel definitions */
......
......@@ -33,6 +33,7 @@ struct dev_rot_state {
static const u32 rotation_sensitivity_addresses[] = {
HID_USAGE_SENSOR_DATA_ORIENTATION,
HID_USAGE_SENSOR_ORIENT_QUATERNION,
};
/* Channel definitions */
......
......@@ -31,6 +31,7 @@ struct press_state {
static const u32 press_sensitivity_addresses[] = {
HID_USAGE_SENSOR_DATA_ATMOSPHERIC_PRESSURE,
HID_USAGE_SENSOR_ATMOSPHERIC_PRESSURE
};
/* Channel definitions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment