Lines Matching refs: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
407 struct cp2112_force_read_report report; in cp2112_read() local
412 report.report = CP2112_DATA_READ_FORCE_SEND; in cp2112_read()
413 report.length = cpu_to_be16(size); in cp2112_read()
417 ret = cp2112_hid_output(hdev, &report.report, sizeof(report), in cp2112_read()
440 struct cp2112_read_req_report *report = buf; in cp2112_read_req() local
445 report->report = CP2112_DATA_READ_REQUEST; in cp2112_read_req()
446 report->slave_address = slave_address << 1; in cp2112_read_req()
447 report->length = cpu_to_be16(length); in cp2112_read_req()
448 return sizeof(*report); in cp2112_read_req()
454 struct cp2112_write_read_req_report *report = buf; in cp2112_write_read_req() local
457 || data_length > sizeof(report->target_address) - 1) in cp2112_write_read_req()
460 report->report = CP2112_DATA_WRITE_READ_REQUEST; in cp2112_write_read_req()
461 report->slave_address = slave_address << 1; in cp2112_write_read_req()
462 report->length = cpu_to_be16(length); in cp2112_write_read_req()
463 report->target_address_length = data_length + 1; in cp2112_write_read_req()
464 report->target_address[0] = command; in cp2112_write_read_req()
465 memcpy(&report->target_address[1], data, data_length); in cp2112_write_read_req()
472 struct cp2112_write_req_report *report = buf; in cp2112_write_req() local
474 if (data_length > sizeof(report->data) - 1) in cp2112_write_req()
477 report->report = CP2112_DATA_WRITE_REQUEST; in cp2112_write_req()
478 report->slave_address = slave_address << 1; in cp2112_write_req()
479 report->length = data_length + 1; in cp2112_write_req()
480 report->data[0] = command; in cp2112_write_req()
481 memcpy(&report->data[1], data, data_length); in cp2112_write_req()
488 struct cp2112_write_req_report *report = buf; in cp2112_i2c_write_req() local
490 if (data_length > sizeof(report->data)) in cp2112_i2c_write_req()
493 report->report = CP2112_DATA_WRITE_REQUEST; in cp2112_i2c_write_req()
494 report->slave_address = slave_address << 1; in cp2112_i2c_write_req()
495 report->length = data_length; in cp2112_i2c_write_req()
496 memcpy(report->data, data, data_length); in cp2112_i2c_write_req()
504 struct cp2112_write_read_req_report *report = buf; in cp2112_i2c_write_read_req() local
507 addr_length > sizeof(report->target_address)) in cp2112_i2c_write_read_req()
510 report->report = CP2112_DATA_WRITE_READ_REQUEST; in cp2112_i2c_write_read_req()
511 report->slave_address = slave_address << 1; in cp2112_i2c_write_read_req()
512 report->length = cpu_to_be16(read_length); in cp2112_i2c_write_read_req()
513 report->target_address_length = addr_length; in cp2112_i2c_write_read_req()
514 memcpy(report->target_address, addr, addr_length); in cp2112_i2c_write_read_req()
855 BUG_ON(cfg->report != CP2112_USB_CONFIG); in cp2112_set_usb_config()
949 unsigned char report; member
959 struct cp2112_string_report report; in pstr_store() local
962 memset(&report, 0, sizeof(report)); in pstr_store()
965 report.string, ARRAY_SIZE(report.string)); in pstr_store()
966 report.report = attr->report; in pstr_store()
967 report.length = ret * sizeof(report.string[0]) + 2; in pstr_store()
968 report.type = USB_DT_STRING; in pstr_store()
970 ret = cp2112_hid_output(hdev, &report.report, report.length + 1, in pstr_store()
972 if (ret != report.length + 1) { in pstr_store()
990 struct cp2112_string_report report; in pstr_show() local
994 ret = cp2112_hid_get(hdev, attr->report, &report.report, in pstr_show()
995 sizeof(report) - 1, HID_FEATURE_REPORT); in pstr_show()
1004 if (report.length < 2) { in pstr_show()
1006 kattr->attr.name, report.length); in pstr_show()
1010 length = report.length > ret - 1 ? ret - 1 : report.length; in pstr_show()
1011 length = (length - 2) / sizeof(report.string[0]); in pstr_show()
1012 ret = utf16s_to_utf8s(report.string, length, UTF16_LITTLE_ENDIAN, buf, in pstr_show()
1021 .report = _report, \
1416 static int cp2112_raw_event(struct hid_device *hdev, struct hid_report *report, in cp2112_raw_event() argument