Lines Matching refs:st
150 s32 hid_sensor_read_poll_value(struct hid_sensor_common *st) in hid_sensor_read_poll_value() argument
155 ret = sensor_hub_get_feature(st->hsdev, in hid_sensor_read_poll_value()
156 st->poll.report_id, in hid_sensor_read_poll_value()
157 st->poll.index, sizeof(value), &value); in hid_sensor_read_poll_value()
162 if (st->poll.units == HID_USAGE_SENSOR_UNITS_SECOND) in hid_sensor_read_poll_value()
170 int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st, in hid_sensor_read_samp_freq_value() argument
176 ret = sensor_hub_get_feature(st->hsdev, in hid_sensor_read_samp_freq_value()
177 st->poll.report_id, in hid_sensor_read_samp_freq_value()
178 st->poll.index, sizeof(value), &value); in hid_sensor_read_samp_freq_value()
183 if (st->poll.units == HID_USAGE_SENSOR_UNITS_MILLISECOND) in hid_sensor_read_samp_freq_value()
185 else if (st->poll.units == HID_USAGE_SENSOR_UNITS_SECOND) in hid_sensor_read_samp_freq_value()
197 int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st, in hid_sensor_write_samp_freq_value() argument
208 if (st->poll.units == HID_USAGE_SENSOR_UNITS_MILLISECOND) in hid_sensor_write_samp_freq_value()
210 else if (st->poll.units == HID_USAGE_SENSOR_UNITS_SECOND) in hid_sensor_write_samp_freq_value()
215 ret = sensor_hub_set_feature(st->hsdev, st->poll.report_id, in hid_sensor_write_samp_freq_value()
216 st->poll.index, sizeof(value), &value); in hid_sensor_write_samp_freq_value()
224 int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st, in hid_sensor_read_raw_hyst_value() argument
230 ret = sensor_hub_get_feature(st->hsdev, in hid_sensor_read_raw_hyst_value()
231 st->sensitivity.report_id, in hid_sensor_read_raw_hyst_value()
232 st->sensitivity.index, sizeof(value), in hid_sensor_read_raw_hyst_value()
238 convert_from_vtf_format(value, st->sensitivity.size, in hid_sensor_read_raw_hyst_value()
239 st->sensitivity.unit_expo, in hid_sensor_read_raw_hyst_value()
247 int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st, in hid_sensor_write_raw_hyst_value() argument
253 value = convert_to_vtf_format(st->sensitivity.size, in hid_sensor_write_raw_hyst_value()
254 st->sensitivity.unit_expo, in hid_sensor_write_raw_hyst_value()
256 ret = sensor_hub_set_feature(st->hsdev, st->sensitivity.report_id, in hid_sensor_write_raw_hyst_value()
257 st->sensitivity.index, sizeof(value), in hid_sensor_write_raw_hyst_value()
349 struct hid_sensor_common *st) in hid_sensor_get_reporting_interval() argument
354 &st->poll); in hid_sensor_get_reporting_interval()
356 if (st->poll.units == 0) in hid_sensor_get_reporting_interval()
357 st->poll.units = HID_USAGE_SENSOR_UNITS_MILLISECOND; in hid_sensor_get_reporting_interval()
364 struct hid_sensor_common *st) in hid_sensor_parse_common_attributes() argument
368 hid_sensor_get_reporting_interval(hsdev, usage_id, st); in hid_sensor_parse_common_attributes()
373 &st->report_state); in hid_sensor_parse_common_attributes()
378 &st->power_state); in hid_sensor_parse_common_attributes()
383 &st->sensitivity); in hid_sensor_parse_common_attributes()
386 st->poll.index, st->poll.report_id, in hid_sensor_parse_common_attributes()
387 st->report_state.index, st->report_state.report_id, in hid_sensor_parse_common_attributes()
388 st->power_state.index, st->power_state.report_id, in hid_sensor_parse_common_attributes()
389 st->sensitivity.index, st->sensitivity.report_id); in hid_sensor_parse_common_attributes()