Lines Matching full:imu
119 /* SPI storage addresses of IMU factory calibration data */
124 /* SPI storage addresses of IMU user calibration data */
138 /* Under most circumstances IMU reports are pushed every 15ms; use as default */
140 /* How many samples to sum before calculating average IMU report delta */
142 /* Controls how many dropped IMU packets at once trigger a warning message */
397 /* IMU input reports contain 3 samples */
473 /* imu */
477 unsigned int imu_last_pkt_ms; /* used to calc imu report delta */
478 /* the following are used to track the average imu report time delta */
894 * dependent on the IMU calibration values. They are used when processing the
895 * IMU input reports.
923 hid_info(ctlr->hdev, "using user cal for IMU\n"); in joycon_request_imu_calibration()
925 hid_info(ctlr->hdev, "using factory cal for IMU\n"); in joycon_request_imu_calibration()
928 /* request IMU calibration data */ in joycon_request_imu_calibration()
929 hid_dbg(ctlr->hdev, "requesting IMU cal data\n"); in joycon_request_imu_calibration()
934 "Failed to read IMU cal, using defaults; ret=%d\n", in joycon_request_imu_calibration()
947 /* IMU calibration parsing */ in joycon_request_imu_calibration()
959 hid_dbg(ctlr->hdev, "IMU calibration:\n" in joycon_request_imu_calibration()
1015 hid_dbg(ctlr->hdev, "enabling IMU\n"); in joycon_enable_imu()
1053 /* point to next imu sample */ in joycon_input_report_parse_imu_data()
1072 * associate with the samples we pass to userspace. The IMU input in joycon_parse_imu_report()
1081 * - The controller samples the IMU every 1.35ms. It then does some of in joycon_parse_imu_report()
1083 * - Each imu input report contains 3 IMU samples, (usually 5ms apart). in joycon_parse_imu_report()
1097 * reports IMU sample batches every 11ms or every 15ms. This rate is in joycon_parse_imu_report()
1104 * time delta between IMU input reports. In testing, this value has in joycon_parse_imu_report()
1112 * samples, so the IMU sampling rate should be avg_time_delta/3. We can in joycon_parse_imu_report()
1128 /* avg imu report delta housekeeping */ in joycon_parse_imu_report()
1139 "calculated avg imu delta of 0\n"); in joycon_parse_imu_report()
1145 /* useful for debugging IMU sample rate */ in joycon_parse_imu_report()
1157 "compensating for %u dropped IMU reports\n", in joycon_parse_imu_report()
1166 /* Each IMU input report contains three samples */ in joycon_parse_imu_report()
1224 * the orientation of the IMU in the controller. We negate those in joycon_parse_imu_report()
1442 /* parse IMU data if present */ in joycon_parse_report()
1688 imu_name = "Nintendo Switch Pro Controller IMU"; in joycon_input_create()
1693 imu_name = "Nintendo Switch Left Joy-Con IMU (Grip)"; in joycon_input_create()
1696 imu_name = "Nintendo Switch Right Joy-Con IMU (Grip)"; in joycon_input_create()
1701 imu_name = "Nintendo Switch Left Joy-Con IMU"; in joycon_input_create()
1705 imu_name = "Nintendo Switch Right Joy-Con IMU"; in joycon_input_create()
1790 /* configure the imu input device */ in joycon_input_create()
1804 /* configure imu axes */ in joycon_input_create()
2165 /* get IMU calibration data, and parse it */ in joycon_init()
2172 hid_warn(hdev, "Unable to read IMU calibration data\n"); in joycon_init()
2189 /* Enable the IMU */ in joycon_init()
2192 hid_err(hdev, "Failed to enable the IMU; ret=%d\n", ret); in joycon_init()