diff options
-rw-r--r-- | drivers/iio/gyro/hid-sensor-gyro-3d.c | 11 | ||||
-rw-r--r-- | include/linux/hid-sensor-ids.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index ea01c6bcfb56..97797dbaad34 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c | |||
@@ -262,6 +262,17 @@ static int gyro_3d_parse_report(struct platform_device *pdev, | |||
262 | st->gyro[1].index, st->gyro[1].report_id, | 262 | st->gyro[1].index, st->gyro[1].report_id, |
263 | st->gyro[2].index, st->gyro[2].report_id); | 263 | st->gyro[2].index, st->gyro[2].report_id); |
264 | 264 | ||
265 | /* Set Sensitivity field ids, when there is no individual modifier */ | ||
266 | if (st->common_attributes.sensitivity.index < 0) { | ||
267 | sensor_hub_input_get_attribute_info(hsdev, | ||
268 | HID_FEATURE_REPORT, usage_id, | ||
269 | HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS | | ||
270 | HID_USAGE_SENSOR_DATA_ANGL_VELOCITY, | ||
271 | &st->common_attributes.sensitivity); | ||
272 | dev_dbg(&pdev->dev, "Sensitivity index:report %d:%d\n", | ||
273 | st->common_attributes.sensitivity.index, | ||
274 | st->common_attributes.sensitivity.report_id); | ||
275 | } | ||
265 | return ret; | 276 | return ret; |
266 | } | 277 | } |
267 | 278 | ||
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h index 4dda3b791c82..f3ed6b14f86c 100644 --- a/include/linux/hid-sensor-ids.h +++ b/include/linux/hid-sensor-ids.h | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | /* Gyro 3D: (200076) */ | 35 | /* Gyro 3D: (200076) */ |
36 | #define HID_USAGE_SENSOR_GYRO_3D 0x200076 | 36 | #define HID_USAGE_SENSOR_GYRO_3D 0x200076 |
37 | #define HID_USAGE_SENSOR_DATA_ANGL_VELOCITY 0x200456 | ||
37 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS 0x200457 | 38 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS 0x200457 |
38 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458 | 39 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458 |
39 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459 | 40 | #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459 |