Lines Matching refs:report
75 u8 report; /* CP2112_SMBUS_CONFIG */ member
86 u8 report; /* CP2112_USB_CONFIG */ member
99 u8 report; /* CP2112_DATA_READ_REQUEST */ member
105 u8 report; /* CP2112_DATA_WRITE_READ_REQUEST */ member
113 u8 report; /* CP2112_DATA_WRITE_REQUEST */ member
120 u8 report; /* CP2112_DATA_READ_FORCE_SEND */ member
125 u8 report; /* CP2112_TRANSFER_STATUS_RESPONSE */ member
135 u8 report; /* CP2112_*_STRING */
409 struct cp2112_force_read_report report; in cp2112_read() local
414 report.report = CP2112_DATA_READ_FORCE_SEND; in cp2112_read()
415 report.length = cpu_to_be16(size); in cp2112_read()
419 ret = cp2112_hid_output(hdev, &report.report, sizeof(report), in cp2112_read()
442 struct cp2112_read_req_report *report = buf; in cp2112_read_req() local
447 report->report = CP2112_DATA_READ_REQUEST; in cp2112_read_req()
448 report->slave_address = slave_address << 1; in cp2112_read_req()
449 report->length = cpu_to_be16(length); in cp2112_read_req()
450 return sizeof(*report); in cp2112_read_req()
456 struct cp2112_write_read_req_report *report = buf; in cp2112_write_read_req() local
459 || data_length > sizeof(report->target_address) - 1) in cp2112_write_read_req()
462 report->report = CP2112_DATA_WRITE_READ_REQUEST; in cp2112_write_read_req()
463 report->slave_address = slave_address << 1; in cp2112_write_read_req()
464 report->length = cpu_to_be16(length); in cp2112_write_read_req()
465 report->target_address_length = data_length + 1; in cp2112_write_read_req()
466 report->target_address[0] = command; in cp2112_write_read_req()
467 memcpy(&report->target_address[1], data, data_length); in cp2112_write_read_req()
474 struct cp2112_write_req_report *report = buf; in cp2112_write_req() local
476 if (data_length > sizeof(report->data) - 1) in cp2112_write_req()
479 report->report = CP2112_DATA_WRITE_REQUEST; in cp2112_write_req()
480 report->slave_address = slave_address << 1; in cp2112_write_req()
481 report->length = data_length + 1; in cp2112_write_req()
482 report->data[0] = command; in cp2112_write_req()
483 memcpy(&report->data[1], data, data_length); in cp2112_write_req()
490 struct cp2112_write_req_report *report = buf; in cp2112_i2c_write_req() local
492 if (data_length > sizeof(report->data)) in cp2112_i2c_write_req()
495 report->report = CP2112_DATA_WRITE_REQUEST; in cp2112_i2c_write_req()
496 report->slave_address = slave_address << 1; in cp2112_i2c_write_req()
497 report->length = data_length; in cp2112_i2c_write_req()
498 memcpy(report->data, data, data_length); in cp2112_i2c_write_req()
506 struct cp2112_write_read_req_report *report = buf; in cp2112_i2c_write_read_req() local
509 addr_length > sizeof(report->target_address)) in cp2112_i2c_write_read_req()
512 report->report = CP2112_DATA_WRITE_READ_REQUEST; in cp2112_i2c_write_read_req()
513 report->slave_address = slave_address << 1; in cp2112_i2c_write_read_req()
514 report->length = cpu_to_be16(read_length); in cp2112_i2c_write_read_req()
515 report->target_address_length = addr_length; in cp2112_i2c_write_read_req()
516 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()
951 struct cp2112_string_report report; in pstr_store() local
954 memset(&report, 0, sizeof(report)); in pstr_store()
957 report.string, ARRAY_SIZE(report.string)); in pstr_store()
958 report.report = number; in pstr_store()
959 report.length = ret * sizeof(report.string[0]) + 2; in pstr_store()
960 report.type = USB_DT_STRING; in pstr_store()
962 ret = cp2112_hid_output(hdev, &report.report, report.length + 1, in pstr_store()
964 if (ret != report.length + 1) { in pstr_store()
980 struct cp2112_string_report report; in pstr_show() local
984 ret = cp2112_hid_get(hdev, number, (u8 *)&report.contents, in pstr_show()
985 sizeof(report.contents), HID_FEATURE_REPORT); in pstr_show()
994 if (report.length < 2) { in pstr_show()
996 kattr->attr.name, report.length); in pstr_show()
1000 length = report.length > ret - 1 ? ret - 1 : report.length; in pstr_show()
1001 length = (length - 2) / sizeof(report.string[0]); in pstr_show()
1002 ret = utf16s_to_utf8s(report.string, length, UTF16_LITTLE_ENDIAN, buf, in pstr_show()
1367 static int cp2112_raw_event(struct hid_device *hdev, struct hid_report *report, in cp2112_raw_event() argument