Lines Matching full:report
73 u8 report; /* CP2112_SMBUS_CONFIG */ member
84 u8 report; /* CP2112_USB_CONFIG */ member
97 u8 report; /* CP2112_DATA_READ_REQUEST */ member
103 u8 report; /* CP2112_DATA_WRITE_READ_REQUEST */ member
111 u8 report; /* CP2112_DATA_WRITE_REQUEST */ member
118 u8 report; /* CP2112_DATA_READ_FORCE_SEND */ member
123 u8 report; /* CP2112_TRANSFER_STATUS_RESPONSE */ member
132 u8 report; /* CP2112_*_STRING */ member
133 u8 length; /* length in bytes of everyting after .report */
406 struct cp2112_force_read_report report; in cp2112_read() local
411 report.report = CP2112_DATA_READ_FORCE_SEND; in cp2112_read()
412 report.length = cpu_to_be16(size); in cp2112_read()
416 ret = cp2112_hid_output(hdev, &report.report, sizeof(report), in cp2112_read()
439 struct cp2112_read_req_report *report = buf; in cp2112_read_req() local
444 report->report = CP2112_DATA_READ_REQUEST; in cp2112_read_req()
445 report->slave_address = slave_address << 1; in cp2112_read_req()
446 report->length = cpu_to_be16(length); in cp2112_read_req()
447 return sizeof(*report); in cp2112_read_req()
453 struct cp2112_write_read_req_report *report = buf; in cp2112_write_read_req() local
456 || data_length > sizeof(report->target_address) - 1) in cp2112_write_read_req()
459 report->report = CP2112_DATA_WRITE_READ_REQUEST; in cp2112_write_read_req()
460 report->slave_address = slave_address << 1; in cp2112_write_read_req()
461 report->length = cpu_to_be16(length); in cp2112_write_read_req()
462 report->target_address_length = data_length + 1; in cp2112_write_read_req()
463 report->target_address[0] = command; in cp2112_write_read_req()
464 memcpy(&report->target_address[1], data, data_length); in cp2112_write_read_req()
471 struct cp2112_write_req_report *report = buf; in cp2112_write_req() local
473 if (data_length > sizeof(report->data) - 1) in cp2112_write_req()
476 report->report = CP2112_DATA_WRITE_REQUEST; in cp2112_write_req()
477 report->slave_address = slave_address << 1; in cp2112_write_req()
478 report->length = data_length + 1; in cp2112_write_req()
479 report->data[0] = command; in cp2112_write_req()
480 memcpy(&report->data[1], data, data_length); in cp2112_write_req()
487 struct cp2112_write_req_report *report = buf; in cp2112_i2c_write_req() local
489 if (data_length > sizeof(report->data)) in cp2112_i2c_write_req()
492 report->report = CP2112_DATA_WRITE_REQUEST; in cp2112_i2c_write_req()
493 report->slave_address = slave_address << 1; in cp2112_i2c_write_req()
494 report->length = data_length; in cp2112_i2c_write_req()
495 memcpy(report->data, data, data_length); in cp2112_i2c_write_req()
503 struct cp2112_write_read_req_report *report = buf; in cp2112_i2c_write_read_req() local
506 addr_length > sizeof(report->target_address)) in cp2112_i2c_write_read_req()
509 report->report = CP2112_DATA_WRITE_READ_REQUEST; in cp2112_i2c_write_read_req()
510 report->slave_address = slave_address << 1; in cp2112_i2c_write_read_req()
511 report->length = cpu_to_be16(read_length); in cp2112_i2c_write_read_req()
512 report->target_address_length = addr_length; in cp2112_i2c_write_read_req()
513 memcpy(report->target_address, addr, addr_length); in cp2112_i2c_write_read_req()
849 BUG_ON(cfg->report != CP2112_USB_CONFIG); in cp2112_set_usb_config()
943 unsigned char report; member
953 struct cp2112_string_report report; in pstr_store() local
956 memset(&report, 0, sizeof(report)); in pstr_store()
959 report.string, ARRAY_SIZE(report.string)); in pstr_store()
960 report.report = attr->report; in pstr_store()
961 report.length = ret * sizeof(report.string[0]) + 2; in pstr_store()
962 report.type = USB_DT_STRING; in pstr_store()
964 ret = cp2112_hid_output(hdev, &report.report, report.length + 1, in pstr_store()
966 if (ret != report.length + 1) { in pstr_store()
984 struct cp2112_string_report report; in pstr_show() local
988 ret = cp2112_hid_get(hdev, attr->report, &report.report, in pstr_show()
989 sizeof(report) - 1, HID_FEATURE_REPORT); in pstr_show()
998 if (report.length < 2) { in pstr_show()
1000 kattr->attr.name, report.length); in pstr_show()
1004 length = report.length > ret - 1 ? ret - 1 : report.length; in pstr_show()
1005 length = (length - 2) / sizeof(report.string[0]); in pstr_show()
1006 ret = utf16s_to_utf8s(report.string, length, UTF16_LITTLE_ENDIAN, buf, in pstr_show()
1015 .report = _report, \
1410 static int cp2112_raw_event(struct hid_device *hdev, struct hid_report *report, in cp2112_raw_event() argument
1461 hid_err(hdev, "unknown report\n"); in cp2112_raw_event()