|
@@ -379,6 +379,8 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
|
|
{
|
|
|
|
|
|
struct hid_sensor_hub_attribute_info timestamp;
|
|
|
+ s32 value;
|
|
|
+ int ret;
|
|
|
|
|
|
hid_sensor_get_reporting_interval(hsdev, usage_id, st);
|
|
|
|
|
@@ -417,6 +419,14 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
|
|
|
st->sensitivity.index, st->sensitivity.report_id,
|
|
|
timestamp.index, timestamp.report_id);
|
|
|
|
|
|
+ ret = sensor_hub_get_feature(hsdev,
|
|
|
+ st->power_state.report_id,
|
|
|
+ st->power_state.index, sizeof(value), &value);
|
|
|
+ if (ret < 0)
|
|
|
+ return ret;
|
|
|
+ if (value < 0)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
EXPORT_SYMBOL(hid_sensor_parse_common_attributes);
|