Lines Matching refs:hsdev
41 struct hid_sensor_hub_device *hsdev; member
188 power_val = hid_sensor_get_usage_index(sensor_inst->hsdev, in set_power_report_state()
193 report_val = hid_sensor_get_usage_index(sensor_inst->hsdev, in set_power_report_state()
201 ret = sensor_hub_set_feature(sensor_inst->hsdev, in set_power_report_state()
207 hid_err(sensor_inst->hsdev->hdev, in set_power_report_state()
216 ret = sensor_hub_set_feature(sensor_inst->hsdev, in set_power_report_state()
222 hid_err(sensor_inst->hsdev->hdev, in set_power_report_state()
244 ret = sensor_hub_device_open(sensor_inst->hsdev); in enable_sensor_store()
250 sensor_hub_device_close(sensor_inst->hsdev); in enable_sensor_store()
256 sensor_hub_device_close(sensor_inst->hsdev); in enable_sensor_store()
311 ret = sensor_hub_get_feature(sensor_inst->hsdev, in show_value()
351 sensor_inst->hsdev, in show_value()
352 sensor_inst->hsdev->usage, in show_value()
407 ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id, in store_value()
417 static int hid_sensor_capture_sample(struct hid_sensor_hub_device *hsdev, in hid_sensor_capture_sample() argument
426 hid_err(sensor_inst->hsdev->hdev, "Skipped remaining data\n"); in hid_sensor_capture_sample()
430 hid_dbg(sensor_inst->hsdev->hdev, "%s received %d of %d\n", __func__, in hid_sensor_capture_sample()
440 header.usage_id = hsdev->usage; in hid_sensor_capture_sample()
459 static int hid_sensor_send_event(struct hid_sensor_hub_device *hsdev, in hid_sensor_send_event() argument
492 sensor_field->attribute.usage_id = sensor_inst->hsdev->usage; in hid_sensor_custom_add_field()
536 struct hid_sensor_hub_device *hsdev = sensor_inst->hsdev; in hid_sensor_custom_add_fields() local
543 hsdev->start_collection_index) && in hid_sensor_custom_add_fields()
545 hsdev->end_collection_index))) { in hid_sensor_custom_add_fields()
565 struct hid_sensor_hub_device *hsdev = sensor_inst->hsdev; in hid_sensor_custom_add_attributes() local
566 struct hid_device *hdev = hsdev->hdev; in hid_sensor_custom_add_attributes()
824 static int hid_sensor_custom_get_prop(struct hid_sensor_hub_device *hsdev, in hid_sensor_custom_get_prop() argument
833 ret = sensor_hub_input_get_attribute_info(hsdev, HID_FEATURE_REPORT, in hid_sensor_custom_get_prop()
834 hsdev->usage, prop_usage_id, in hid_sensor_custom_get_prop()
839 ret = sensor_hub_get_feature(hsdev, prop_attr.report_id, in hid_sensor_custom_get_prop()
842 hid_err(hsdev->hdev, "Failed to get sensor property %08x %d\n", in hid_sensor_custom_get_prop()
851 hid_sensor_custom_do_match(struct hid_sensor_hub_device *hsdev, in hid_sensor_custom_do_match() argument
879 hid_sensor_custom_properties_get(struct hid_sensor_hub_device *hsdev, in hid_sensor_custom_properties_get() argument
884 ret = hid_sensor_custom_get_prop(hsdev, in hid_sensor_custom_properties_get()
896 hid_sensor_custom_get_prop(hsdev, HID_USAGE_SENSOR_PROP_MODEL, in hid_sensor_custom_properties_get()
900 hid_sensor_custom_get_prop(hsdev, HID_USAGE_SENSOR_PROP_MANUFACTURER, in hid_sensor_custom_properties_get()
908 hid_sensor_custom_get_known(struct hid_sensor_hub_device *hsdev, in hid_sensor_custom_get_known() argument
920 ret = hid_sensor_custom_properties_get(hsdev, prop); in hid_sensor_custom_get_known()
925 if (hid_sensor_custom_do_match(hsdev, match, prop)) { in hid_sensor_custom_get_known()
940 struct hid_sensor_hub_device *hsdev, in hid_sensor_register_platform_device() argument
961 PLATFORM_DEVID_AUTO, hsdev, in hid_sensor_register_platform_device()
962 sizeof(*hsdev)); in hid_sensor_register_platform_device()
970 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; in hid_sensor_custom_probe() local
982 sensor_inst->hsdev = hsdev; in hid_sensor_custom_probe()
987 ret = hid_sensor_custom_get_known(hsdev, &match); in hid_sensor_custom_probe()
990 hid_sensor_register_platform_device(pdev, hsdev, match); in hid_sensor_custom_probe()
1002 ret = sensor_hub_register_callback(hsdev, hsdev->usage, in hid_sensor_custom_probe()
1030 sensor_hub_remove_callback(hsdev, hsdev->usage); in hid_sensor_custom_probe()
1038 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; in hid_sensor_custom_remove() local
1049 sensor_hub_remove_callback(hsdev, hsdev->usage); in hid_sensor_custom_remove()