Lines Matching refs:hsdev
40 struct hid_sensor_hub_device *hsdev; member
187 power_val = hid_sensor_get_usage_index(sensor_inst->hsdev, in set_power_report_state()
192 report_val = hid_sensor_get_usage_index(sensor_inst->hsdev, in set_power_report_state()
200 ret = sensor_hub_set_feature(sensor_inst->hsdev, in set_power_report_state()
206 hid_err(sensor_inst->hsdev->hdev, in set_power_report_state()
215 ret = sensor_hub_set_feature(sensor_inst->hsdev, in set_power_report_state()
221 hid_err(sensor_inst->hsdev->hdev, in set_power_report_state()
243 ret = sensor_hub_device_open(sensor_inst->hsdev); in enable_sensor_store()
249 sensor_hub_device_close(sensor_inst->hsdev); in enable_sensor_store()
255 sensor_hub_device_close(sensor_inst->hsdev); in enable_sensor_store()
310 ret = sensor_hub_get_feature(sensor_inst->hsdev, in show_value()
350 sensor_inst->hsdev, in show_value()
351 sensor_inst->hsdev->usage, in show_value()
406 ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id, in store_value()
416 static int hid_sensor_capture_sample(struct hid_sensor_hub_device *hsdev, in hid_sensor_capture_sample() argument
425 hid_err(sensor_inst->hsdev->hdev, "Skipped remaining data\n"); in hid_sensor_capture_sample()
429 hid_dbg(sensor_inst->hsdev->hdev, "%s received %d of %d\n", __func__, in hid_sensor_capture_sample()
439 header.usage_id = hsdev->usage; in hid_sensor_capture_sample()
458 static int hid_sensor_send_event(struct hid_sensor_hub_device *hsdev, in hid_sensor_send_event() argument
491 sensor_field->attribute.usage_id = sensor_inst->hsdev->usage; in hid_sensor_custom_add_field()
535 struct hid_sensor_hub_device *hsdev = sensor_inst->hsdev; in hid_sensor_custom_add_fields() local
542 hsdev->start_collection_index) && in hid_sensor_custom_add_fields()
544 hsdev->end_collection_index))) { in hid_sensor_custom_add_fields()
564 struct hid_sensor_hub_device *hsdev = sensor_inst->hsdev; in hid_sensor_custom_add_attributes() local
565 struct hid_device *hdev = hsdev->hdev; in hid_sensor_custom_add_attributes()
769 static int get_known_custom_sensor_index(struct hid_sensor_hub_device *hsdev) in get_known_custom_sensor_index() argument
783 ret = sensor_hub_input_get_attribute_info(hsdev, in get_known_custom_sensor_index()
784 HID_FEATURE_REPORT, hsdev->usage, in get_known_custom_sensor_index()
790 sensor_hub_get_feature(hsdev, sensor_manufacturer.report_id, in get_known_custom_sensor_index()
794 hid_err(hsdev->hdev, in get_known_custom_sensor_index()
812 ret = sensor_hub_input_get_attribute_info(hsdev, in get_known_custom_sensor_index()
813 HID_FEATURE_REPORT, hsdev->usage, in get_known_custom_sensor_index()
818 report_size = sensor_hub_get_feature(hsdev, sensor_luid_info.report_id, in get_known_custom_sensor_index()
822 hid_err(hsdev->hdev, "Failed to get real usage info %d\n", in get_known_custom_sensor_index()
832 hid_err(hsdev->hdev, in get_known_custom_sensor_index()
844 struct hid_sensor_hub_device *hsdev, in hid_sensor_register_platform_device() argument
865 PLATFORM_DEVID_NONE, hsdev, in hid_sensor_register_platform_device()
866 sizeof(*hsdev)); in hid_sensor_register_platform_device()
874 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; in hid_sensor_custom_probe() local
886 sensor_inst->hsdev = hsdev; in hid_sensor_custom_probe()
891 index = get_known_custom_sensor_index(hsdev); in hid_sensor_custom_probe()
894 hid_sensor_register_platform_device(pdev, hsdev, index); in hid_sensor_custom_probe()
906 ret = sensor_hub_register_callback(hsdev, hsdev->usage, in hid_sensor_custom_probe()
934 sensor_hub_remove_callback(hsdev, hsdev->usage); in hid_sensor_custom_probe()
942 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; in hid_sensor_custom_remove() local
953 sensor_hub_remove_callback(hsdev, hsdev->usage); in hid_sensor_custom_remove()