Lines Matching refs:data
48 int (*parse_report)(struct ps_device *dev, struct hid_report *report, u8 *data, int size);
52 /* Calibration data for playstation motion sensors. */
119 * and any associated data is then invalid.
155 /* Calibration data for accelerometer and gyroscope. */
159 /* Timestamp for sensor data */
226 /* Common data between DualSense BT/USB main output report. */
277 uint8_t *data; /* Start of data */
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. */
309 * and any associated data is then invalid.
325 * control the interval at which Dualshock 4 reports data:
365 /* Calibration data for accelerometer and gyroscope. */
374 /* Timestamp for sensor data */
456 /* Common data between Bluetooth and USB DualShock4 output reports. */
496 uint8_t *data; /* Start of data */
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. */
692 /* Compute crc32 of HID data and compare against expected CRC. */
693 static bool ps_check_crc32(uint8_t seed, uint8_t *data, size_t len, uint32_t report_crc)
698 crc = ~crc32_le(crc, data, len);
1014 * Sanity check gyro calibration data. This is needed to prevent crashes
1016 * calibration data properly.
1020 hid_warn(hdev, "Invalid gyro calibration data for axis (%d), disabling calibration.",
1051 * Sanity check accelerometer calibration data. This is needed to prevent crashes
1053 * data properly.
1057 hid_warn(hdev, "Invalid accelerometer calibration data for axis (%d), disabling calibration.",
1194 rp->data = buf;
1205 rp->data = buf;
1238 crc = ~crc32_le(crc, report->data, report->len - 4);
1243 hid_hw_output_report(hdev, report->data, report->len);
1309 u8 *data, int size)
1328 ds_report = (struct dualsense_input_report *)&data[1];
1332 uint32_t report_crc = get_unaligned_le32(&data[size - 4]);
1334 if (!ps_check_crc32(PS_INPUT_CRC32_SEED, data, size - 4, report_crc)) {
1339 ds_report = (struct dualsense_input_report *)&data[2];
1390 /* Parse and calibrate gyroscope data. */
1399 /* Parse and calibrate accelerometer data. */
1452 * Each unit of battery data corresponds to 10%
1485 static int dualsense_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect)
1658 hid_err(hdev, "Failed to get calibration data from DualSense\n");
1784 /* We should normally receive the feature report data we asked
1788 * data for a different HID report, so retry a few times.
1871 * Sanity check gyro calibration data. This is needed to prevent crashes
1873 * calibration data properly.
1877 hid_warn(hdev, "Invalid gyro calibration data for axis (%d), disabling calibration.",
1908 * Sanity check accelerometer calibration data. This is needed to prevent crashes
1910 * data properly.
1914 hid_warn(hdev, "Invalid accelerometer calibration data for axis (%d), disabling calibration.",
2090 rp->data = buf;
2101 rp->data = buf;
2156 * there is HID data as well as CRC.
2166 crc = ~crc32_le(crc, report.data, report.len - 4);
2171 hid_hw_output_report(ds4->base.hdev, report.data, report.len);
2175 u8 *data, int size)
2193 struct dualshock4_input_report_usb *usb = (struct dualshock4_input_report_usb *)data;
2200 struct dualshock4_input_report_bt *bt = (struct dualshock4_input_report_bt *)data;
2204 if (!ps_check_crc32(PS_INPUT_CRC32_SEED, data, size - 4, report_crc)) {
2245 /* Parse and calibrate gyroscope data. */
2254 /* Parse and calibrate accelerometer data. */
2306 * Interpretation of the battery_capacity data depends on the cable state.
2356 u8 *data, int size)
2361 /* The dongle reports data using the main USB report (0x1) no matter whether a controller
2366 if (data[0] == DS4_INPUT_REPORT_USB && size == DS4_INPUT_REPORT_USB_SIZE) {
2367 struct dualshock4_input_report_common *ds4_report = (struct dualshock4_input_report_common *)&data[1];
2384 * calibration data, but let hidraw have it anyway.
2406 return dualshock4_parse_report(ps_dev, report, data, size);
2411 static int dualshock4_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect)
2563 hid_err(hdev, "Failed to get calibration data from DualShock4\n");
2625 u8 *data, int size)
2630 return dev->parse_report(dev, report, data, size);