Lines Matching refs:hid

19 #include <linux/hid.h>
145 struct hid_device *hid;
250 hid_dbg(pidff->hid, "attack %u => %d\n",
254 hid_hw_request(pidff->hid, pidff->reports[PID_SET_ENVELOPE],
281 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONSTANT],
316 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT],
348 hid_hw_request(pidff->hid, pidff->reports[PID_SET_PERIODIC],
390 hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION],
431 hid_hw_request(pidff->hid, pidff->reports[PID_SET_RAMP],
456 hid_hw_request(pidff->hid, pidff->reports[PID_CREATE_NEW_EFFECT],
458 hid_dbg(pidff->hid, "create_new_effect sent, type: %d\n", efnum);
462 hid_hw_wait(pidff->hid);
465 hid_dbg(pidff->hid, "pid_block_load requested\n");
466 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_LOAD],
468 hid_hw_wait(pidff->hid);
471 hid_dbg(pidff->hid, "device reported free memory: %d bytes\n",
478 hid_dbg(pidff->hid, "not enough memory free: %d bytes\n",
484 hid_err(pidff->hid, "pid_block_load failed 60 times\n");
504 hid_hw_request(pidff->hid, pidff->reports[PID_EFFECT_OPERATION],
526 hid_hw_request(pidff->hid, pidff->reports[PID_BLOCK_FREE],
538 hid_dbg(pidff->hid, "starting to erase %d/%d\n",
542 hid_hw_wait(pidff->hid);
603 hid_err(pidff->hid, "invalid waveform\n");
694 hid_err(pidff->hid, "invalid type\n");
702 hid_dbg(pidff->hid, "uploaded\n");
715 hid_hw_request(pidff->hid, pidff->reports[PID_DEVICE_GAIN],
741 hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT],
772 if (report->field[i]->usage[j].hid ==
812 static void pidff_find_reports(struct hid_device *hid, int report_type,
819 &hid->report_enum[report_type].report_list, list) {
824 hid_dbg(hid, "found usage 0x%02x from field->logical\n",
839 hid->collection[i - 1].type != HID_COLLECTION_LOGICAL)
841 ret = pidff_check_usage(hid->collection[i - 1].usage);
843 hid_dbg(hid,
860 hid_dbg(pidff->hid, "%d missing\n", i);
903 if (fld->usage[j].hid == (HID_UP_PID | usagetable[i])) {
922 hid_dbg(pidff->hid, "finding special fields\n");
943 hid_dbg(pidff->hid, "search done\n");
946 hid_err(pidff->hid, "effect lists not found\n");
951 hid_err(pidff->hid, "direction field not found\n");
956 hid_err(pidff->hid, "device control field not found\n");
961 hid_err(pidff->hid, "block load status field not found\n");
966 hid_err(pidff->hid, "effect operation field not found\n");
978 hid_err(pidff->hid, "no effect types found\n");
985 hid_err(pidff->hid,
993 hid_err(pidff->hid, "effect operation identifiers not found\n");
1010 if (pidff->set_effect_type->usage[pidff_type].hid !=
1011 pidff->create_new_effect_type->usage[pidff_type].hid) {
1012 hid_err(pidff->hid,
1068 hid_err(pidff->hid, "unknown set_effect report layout\n");
1074 hid_err(pidff->hid, "unknown pid_block_load report layout\n");
1079 hid_err(pidff->hid, "unknown effect_operation report layout\n");
1084 hid_err(pidff->hid, "unknown pid_block_free report layout\n");
1096 hid_warn(pidff->hid,
1099 hid_warn(pidff->hid,
1103 hid_warn(pidff->hid,
1109 hid_warn(pidff->hid, "unknown constant effect layout\n");
1115 hid_warn(pidff->hid, "unknown ramp effect layout\n");
1124 hid_warn(pidff->hid, "unknown condition effect layout\n");
1133 hid_warn(pidff->hid, "unknown periodic effect layout\n");
1150 struct hid_device *hid = pidff->hid;
1155 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT);
1156 hid_hw_wait(hid);
1157 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT);
1158 hid_hw_wait(hid);
1162 hid_hw_request(hid, pidff->reports[PID_DEVICE_CONTROL], HID_REQ_SET_REPORT);
1163 hid_hw_wait(hid);
1166 hid_hw_request(hid, pidff->reports[PID_POOL], HID_REQ_GET_REPORT);
1167 hid_hw_wait(hid);
1172 hid_warn(pidff->hid,
1177 hid_dbg(pidff->hid, "pid_pool requested again\n");
1178 hid_hw_request(hid, pidff->reports[PID_POOL],
1180 hid_hw_wait(hid);
1203 hid_err(pidff->hid, "upload request failed\n");
1212 hid_notice(pidff->hid,
1226 int hid_pidff_init(struct hid_device *hid)
1229 struct hid_input *hidinput = list_entry(hid->inputs.next,
1236 hid_dbg(hid, "starting pid init\n");
1238 if (list_empty(&hid->report_enum[HID_OUTPUT_REPORT].report_list)) {
1239 hid_dbg(hid, "not a PID device, no output report\n");
1247 pidff->hid = hid;
1249 hid_device_io_start(hid);
1251 pidff_find_reports(hid, HID_OUTPUT_REPORT, pidff);
1252 pidff_find_reports(hid, HID_FEATURE_REPORT, pidff);
1255 hid_dbg(hid, "reports not ok, aborting\n");
1268 hid_hw_request(hid, pidff->reports[PID_DEVICE_GAIN],
1280 hid_dbg(hid, "max effects is %d\n", max_effects);
1286 hid_dbg(hid, "max simultaneous effects is %d\n",
1290 hid_dbg(hid, "device memory size is %d bytes\n",
1296 hid_notice(hid,
1315 hid_device_io_stop(hid);
1320 hid_device_io_stop(hid);