Lines Matching defs:report

48 	int (*parse_report)(struct ps_device *dev, struct hid_report *report, u8 *data, int size);
69 /* Seed values for DualShock4 / DualSense CRC32 for different report types. */
90 /* Button masks for DualSense input report. */
108 /* Status field of DualSense input report. */
113 /* Feature version from DualSense Firmware Info report. */
123 /* Magic value required in tag field of Bluetooth output report. */
125 /* Flags for DualSense output report. */
190 uint8_t output_seq; /* Sequence number for output report. */
201 /* Main DualSense input report excluding any BT/USB specific headers. */
223 /* Common input report size shared equals the size of the USB report minus 1 byte for ReportID. */
226 /* Common data between DualSense BT/USB main output report. */
272 * The DualSense has a main output report used to control most features. It is
278 uint8_t len; /* Size of output report */
280 /* Points to Bluetooth data payload in case for a Bluetooth report else NULL. */
282 /* Points to USB data payload in case for a USB report else NULL. */
284 /* Points to common section of report, so past any headers. */
313 /* Status field of DualShock4 input report. */
324 /* The lower 6 bits of hw_control of the Bluetooth main output report
338 /* Flags for DualShock4 output report. */
417 /* Main DualShock4 input report excluding any BT/USB specific headers. */
491 * The DualShock4 has a main output report used to control most features. It is
497 uint8_t len; /* Size of output report */
499 /* Points to Bluetooth data payload in case for a Bluetooth report else NULL. */
501 /* Points to USB data payload in case for a USB report else NULL. */
503 /* Points to common section of report, so past any headers. */
1015 * during report handling of virtual, clone or broken devices not implementing
1052 * during report handling of virtual, clone or broken devices not implementing calibration
1188 * every report. Lowest 4-bit is tag and can be zero for now.
1224 * Helper function to send DualSense output reports. Applies a CRC at the end of a report
1228 struct dualsense_output_report *report)
1233 if (report->bt) {
1238 crc = ~crc32_le(crc, report->data, report->len - 4);
1240 report->bt->crc32 = cpu_to_le32(crc);
1243 hid_hw_output_report(hdev, report->data, report->len);
1249 struct dualsense_output_report report;
1253 dualsense_init_output_report(ds, &report, ds->output_report_dmabuf);
1254 common = report.common;
1305 dualsense_send_output_report(ds, &report);
1308 static int dualsense_parse_report(struct ps_device *ps_dev, struct hid_report *report,
1322 * DualSense in USB uses the full HID report for reportID 1, but
1323 * Bluetooth uses a minimal HID report for reportID 1 and reports
1324 * the full report using reportID 49.
1326 if (hdev->bus == BUS_USB && report->id == DS_INPUT_REPORT_USB &&
1329 } else if (hdev->bus == BUS_BLUETOOTH && report->id == DS_INPUT_REPORT_BT &&
1331 /* Last 4 bytes of input report contain crc32 */
1341 hid_err(hdev, "Unhandled reportID=%d\n", report->id);
1518 struct dualsense_output_report report;
1525 dualsense_init_output_report(ds, &report, buf);
1533 report.common->valid_flag2 = DS_OUTPUT_VALID_FLAG2_LIGHTBAR_SETUP_CONTROL_ENABLE;
1534 report.common->lightbar_setup = DS_OUTPUT_LIGHTBAR_SETUP_LIGHT_OUT; /* Fade light out. */
1535 dualsense_send_output_report(ds, &report);
1784 /* We should normally receive the feature report data we asked
1788 * data for a different HID report, so retry a few times.
1795 hid_warn(hdev, "Retrying DualShock 4 get calibration report (0x02) request\n");
1872 * during report handling of virtual, clone or broken devices not implementing
1909 * during report handling of virtual, clone or broken devices not implementing calibration
1936 /* Note USB and BT support the same feature report, but this report
2112 struct dualshock4_output_report report;
2116 dualshock4_init_output_report(ds4, &report, ds4->output_report_dmabuf);
2117 common = report.common;
2151 if (report.bt) {
2158 report.bt->hw_control = DS4_OUTPUT_HWCTL_HID | DS4_OUTPUT_HWCTL_CRC32;
2161 report.bt->hw_control |= ds4->bt_poll_interval;
2166 crc = ~crc32_le(crc, report.data, report.len - 4);
2168 report.bt->crc32 = cpu_to_le32(crc);
2171 hid_hw_output_report(ds4->base.hdev, report.data, report.len);
2174 static int dualshock4_parse_report(struct ps_device *ps_dev, struct hid_report *report,
2187 * DualShock4 in USB uses the full HID report for reportID 1, but
2188 * Bluetooth uses a minimal HID report for reportID 1 and reports
2189 * the full report using reportID 17.
2191 if (hdev->bus == BUS_USB && report->id == DS4_INPUT_REPORT_USB &&
2198 } else if (hdev->bus == BUS_BLUETOOTH && report->id == DS4_INPUT_REPORT_BT &&
2203 /* Last 4 bytes of input report contains CRC. */
2213 hid_err(hdev, "Unhandled reportID=%d\n", report->id);
2355 static int dualshock4_dongle_parse_report(struct ps_device *ps_dev, struct hid_report *report,
2361 /* The dongle reports data using the main USB report (0x1) no matter whether a controller
2362 * is connected with mostly zeros. The report does contain dongle status, which we use to
2383 /* Don't process the report since we don't have
2395 /* Return 0, so hidraw can get the report. */
2400 /* Return 0, so hidraw can get the report. */
2406 return dualshock4_parse_report(ps_dev, report, data, size);
2540 /* Override parse report for dongle specific hotplug handling. */
2624 static int ps_raw_event(struct hid_device *hdev, struct hid_report *report,
2630 return dev->parse_report(dev, report, data, size);