Lines Matching refs:hid
157 struct hid_device *hid; member
262 hid_dbg(pidff->hid, "attack %u => %d\n", in pidff_set_envelope_report()
266 hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE], in pidff_set_envelope_report()
293 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT], in pidff_set_constant_force_report()
328 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], in pidff_set_effect_report()
360 hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC], in pidff_set_periodic_report()
402 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION], in pidff_set_condition_report()
443 hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP], in pidff_set_ramp_force_report()
468 hid_hw_request(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT], in pidff_request_effect_upload()
470 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum); in pidff_request_effect_upload()
474 hid_hw_wait(pidff->hid); in pidff_request_effect_upload()
477 hid_dbg(pidff->hid, "pid_block_load requested\n"); in pidff_request_effect_upload()
478 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_LOAD], in pidff_request_effect_upload()
480 hid_hw_wait(pidff->hid); in pidff_request_effect_upload()
483 hid_dbg(pidff->hid, "device reported free memory: %d bytes\n", in pidff_request_effect_upload()
490 hid_dbg(pidff->hid, "not enough memory free: %d bytes\n", in pidff_request_effect_upload()
496 hid_err(pidff->hid, "pid_block_load failed 60 times\n"); in pidff_request_effect_upload()
516 hid_hw_request(pidff->hid, pidff->reports[PID_EFFECT_OPERATION], in pidff_playback_pid()
538 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_FREE], in pidff_erase_pid()
550 hid_dbg(pidff->hid, "starting to erase %d/%d\n", in pidff_erase_effect()
554 hid_hw_wait(pidff->hid); in pidff_erase_effect()
615 hid_err(pidff->hid, "invalid waveform\n"); in pidff_upload_effect()
706 hid_err(pidff->hid, "invalid type\n"); in pidff_upload_effect()
714 hid_dbg(pidff->hid, "uploaded\n"); in pidff_upload_effect()
727 hid_hw_request(pidff->hid, pidff->reports[PID_DEVICE_GAIN], in pidff_set_gain()
753 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT], in pidff_autocenter()
784 if (report->field[i]->usage[j].hid == in pidff_find_fields()
824 static void pidff_find_reports(struct hid_device *hid, int report_type, in pidff_find_reports() argument
831 &hid->report_enum[report_type].report_list, list) { in pidff_find_reports()
836 hid_dbg(hid, "found usage 0x%02x from field->logical\n", in pidff_find_reports()
851 hid->collection[i - 1].type != HID_COLLECTION_LOGICAL) in pidff_find_reports()
853 ret = pidff_check_usage(hid->collection[i - 1].usage); in pidff_find_reports()
855 hid_dbg(hid, in pidff_find_reports()
872 hid_dbg(pidff->hid, "%d missing\n", i); in pidff_reports_ok()
915 if (fld->usage[j].hid == (HID_UP_PID | usagetable[i])) { in pidff_find_special_keys()
934 hid_dbg(pidff->hid, "finding special fields\n"); in pidff_find_special_fields()
955 hid_dbg(pidff->hid, "search done\n"); in pidff_find_special_fields()
958 hid_err(pidff->hid, "effect lists not found\n"); in pidff_find_special_fields()
963 hid_err(pidff->hid, "direction field not found\n"); in pidff_find_special_fields()
968 hid_err(pidff->hid, "device control field not found\n"); in pidff_find_special_fields()
973 hid_err(pidff->hid, "block load status field not found\n"); in pidff_find_special_fields()
978 hid_err(pidff->hid, "effect operation field not found\n"); in pidff_find_special_fields()
990 hid_err(pidff->hid, "no effect types found\n"); in pidff_find_special_fields()
997 hid_err(pidff->hid, in pidff_find_special_fields()
1005 hid_err(pidff->hid, "effect operation identifiers not found\n"); in pidff_find_special_fields()
1022 if (pidff->set_effect_type->usage[pidff_type].hid != in pidff_find_effects()
1023 pidff->create_new_effect_type->usage[pidff_type].hid) { in pidff_find_effects()
1024 hid_err(pidff->hid, in pidff_find_effects()
1080 hid_err(pidff->hid, "unknown set_effect report layout\n"); in pidff_init_fields()
1086 hid_err(pidff->hid, "unknown pid_block_load report layout\n"); in pidff_init_fields()
1091 hid_err(pidff->hid, "unknown effect_operation report layout\n"); in pidff_init_fields()
1096 hid_err(pidff->hid, "unknown pid_block_free report layout\n"); in pidff_init_fields()
1108 hid_warn(pidff->hid, in pidff_init_fields()
1111 hid_warn(pidff->hid, in pidff_init_fields()
1115 hid_warn(pidff->hid, in pidff_init_fields()
1121 hid_warn(pidff->hid, "unknown constant effect layout\n"); in pidff_init_fields()
1127 hid_warn(pidff->hid, "unknown ramp effect layout\n"); in pidff_init_fields()
1136 hid_warn(pidff->hid, "unknown condition effect layout\n"); in pidff_init_fields()
1145 hid_warn(pidff->hid, "unknown periodic effect layout\n"); in pidff_init_fields()
1162 struct hid_device *hid = pidff->hid; in pidff_reset() local
1167 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); in pidff_reset()
1168 hid_hw_wait(hid); in pidff_reset()
1169 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); in pidff_reset()
1170 hid_hw_wait(hid); in pidff_reset()
1174 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT); in pidff_reset()
1175 hid_hw_wait(hid); in pidff_reset()
1178 hid_hw_request(hid, pidff->reports[PID_POOL], HID_REQ_GET_REPORT); in pidff_reset()
1179 hid_hw_wait(hid); in pidff_reset()
1184 hid_warn(pidff->hid, in pidff_reset()
1189 hid_dbg(pidff->hid, "pid_pool requested again\n"); in pidff_reset()
1190 hid_hw_request(hid, pidff->reports[PID_POOL], in pidff_reset()
1192 hid_hw_wait(hid); in pidff_reset()
1215 hid_err(pidff->hid, "upload request failed\n"); in pidff_check_autocenter()
1224 hid_notice(pidff->hid, in pidff_check_autocenter()
1238 int hid_pidff_init(struct hid_device *hid) in hid_pidff_init() argument
1241 struct hid_input *hidinput = list_entry(hid->inputs.next, in hid_pidff_init()
1248 hid_dbg(hid, "starting pid init\n"); in hid_pidff_init()
1250 if (list_empty(&hid->report_enum[HID_OUTPUT_REPORT].report_list)) { in hid_pidff_init()
1251 hid_dbg(hid, "not a PID device, no output report\n"); in hid_pidff_init()
1259 pidff->hid = hid; in hid_pidff_init()
1261 hid_device_io_start(hid); in hid_pidff_init()
1263 pidff_find_reports(hid, HID_OUTPUT_REPORT, pidff); in hid_pidff_init()
1264 pidff_find_reports(hid, HID_FEATURE_REPORT, pidff); in hid_pidff_init()
1267 hid_dbg(hid, "reports not ok, aborting\n"); in hid_pidff_init()
1280 hid_hw_request(hid, pidff->reports[PID_DEVICE_GAIN], in hid_pidff_init()
1292 hid_dbg(hid, "max effects is %d\n", max_effects); in hid_pidff_init()
1298 hid_dbg(hid, "max simultaneous effects is %d\n", in hid_pidff_init()
1302 hid_dbg(hid, "device memory size is %d bytes\n", in hid_pidff_init()
1307 hid_notice(hid, in hid_pidff_init()
1326 hid_device_io_stop(hid); in hid_pidff_init()
1331 hid_device_io_stop(hid); in hid_pidff_init()