Lines Matching full:imu

126 /* SPI storage addresses of IMU factory calibration data */
131 /* SPI storage addresses of IMU user calibration data */
145 /* Under most circumstances IMU reports are pushed every 15ms; use as default */
147 /* How many samples to sum before calculating average IMU report delta */
149 /* Controls how many dropped IMU packets at once trigger a warning message */
536 /* IMU input reports contain 3 samples */
625 /* imu */
629 unsigned int imu_last_pkt_ms; /* used to calc imu report delta */
630 /* the following are used to track the average imu report time delta */
1182 * dependent on the IMU calibration values. They are used when processing the
1183 * IMU input reports.
1207 hid_warn(ctlr->hdev, "inaccurate IMU divisors (%d)\n", divz); in joycon_calc_imu_cal_divisors()
1224 hid_info(ctlr->hdev, "using user cal for IMU\n"); in joycon_request_imu_calibration()
1226 hid_info(ctlr->hdev, "using factory cal for IMU\n"); in joycon_request_imu_calibration()
1229 /* request IMU calibration data */ in joycon_request_imu_calibration()
1230 hid_dbg(ctlr->hdev, "requesting IMU cal data\n"); in joycon_request_imu_calibration()
1235 "Failed to read IMU cal, using defaults; ret=%d\n", in joycon_request_imu_calibration()
1248 /* IMU calibration parsing */ in joycon_request_imu_calibration()
1260 hid_dbg(ctlr->hdev, "IMU calibration:\n" in joycon_request_imu_calibration()
1316 hid_dbg(ctlr->hdev, "enabling IMU\n"); in joycon_enable_imu()
1354 /* point to next imu sample */ in joycon_input_report_parse_imu_data()
1373 * associate with the samples we pass to userspace. The IMU input in joycon_parse_imu_report()
1382 * - The controller samples the IMU every 1.35ms. It then does some of in joycon_parse_imu_report()
1384 * - Each imu input report contains 3 IMU samples, (usually 5ms apart). in joycon_parse_imu_report()
1398 * reports IMU sample batches every 11ms or every 15ms. This rate is in joycon_parse_imu_report()
1405 * time delta between IMU input reports. In testing, this value has in joycon_parse_imu_report()
1413 * samples, so the IMU sampling rate should be avg_time_delta/3. We can in joycon_parse_imu_report()
1429 /* avg imu report delta housekeeping */ in joycon_parse_imu_report()
1443 hid_warn(ctlr->hdev, "calculated avg imu delta of 0\n"); in joycon_parse_imu_report()
1446 /* useful for debugging IMU sample rate */ in joycon_parse_imu_report()
1458 "compensating for %u dropped IMU reports\n", in joycon_parse_imu_report()
1467 /* Each IMU input report contains three samples */ in joycon_parse_imu_report()
1525 * the orientation of the IMU in the controller. We negate those in joycon_parse_imu_report()
1767 /* parse IMU data if present */ in joycon_parse_report()
2062 /* configure the imu input device */ in joycon_imu_input_create()
2074 imu_name = devm_kasprintf(&hdev->dev, GFP_KERNEL, "%s (IMU)", ctlr->input->name); in joycon_imu_input_create()
2082 /* configure imu axes */ in joycon_imu_input_create()
2516 /* get IMU calibration data, and parse it */ in joycon_init()
2523 hid_warn(hdev, "Unable to read IMU calibration data\n"); in joycon_init()
2526 /* Enable the IMU */ in joycon_init()
2529 hid_err(hdev, "Failed to enable the IMU; ret=%d\n", ret); in joycon_init()