|
@@ -343,15 +343,28 @@ int hid_sensor_format_scale(u32 usage_id,
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(hid_sensor_format_scale);
|
|
EXPORT_SYMBOL(hid_sensor_format_scale);
|
|
|
|
|
|
-int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
|
|
|
|
|
+int hid_sensor_get_reporting_interval(struct hid_sensor_hub_device *hsdev,
|
|
u32 usage_id,
|
|
u32 usage_id,
|
|
struct hid_sensor_common *st)
|
|
struct hid_sensor_common *st)
|
|
{
|
|
{
|
|
-
|
|
|
|
sensor_hub_input_get_attribute_info(hsdev,
|
|
sensor_hub_input_get_attribute_info(hsdev,
|
|
HID_FEATURE_REPORT, usage_id,
|
|
HID_FEATURE_REPORT, usage_id,
|
|
HID_USAGE_SENSOR_PROP_REPORT_INTERVAL,
|
|
HID_USAGE_SENSOR_PROP_REPORT_INTERVAL,
|
|
&st->poll);
|
|
&st->poll);
|
|
|
|
+ /* Default unit of measure is milliseconds */
|
|
|
|
+ if (st->poll.units == 0)
|
|
|
|
+ st->poll.units = HID_USAGE_SENSOR_UNITS_MILLISECOND;
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
|
|
|
+ u32 usage_id,
|
|
|
|
+ struct hid_sensor_common *st)
|
|
|
|
+{
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ hid_sensor_get_reporting_interval(hsdev, usage_id, st);
|
|
|
|
|
|
sensor_hub_input_get_attribute_info(hsdev,
|
|
sensor_hub_input_get_attribute_info(hsdev,
|
|
HID_FEATURE_REPORT, usage_id,
|
|
HID_FEATURE_REPORT, usage_id,
|