Lines Matching +full:clock +full:- +full:accuracy
1 // SPDX-License-Identifier: GPL-2.0-only
58 delta_us = timespec_to_us(&ts2) - timespec_to_us(&ts1); in measure_clock()
59 } while (delta_us > MEASURE_CLOCK_DELTA_THRESHOLD_US && --tries); in measure_clock()
62 dev_err(&GET_DEV(accel_dev), "Excessive clock measure delay\n"); in measure_clock()
63 return -ETIMEDOUT; in measure_clock()
74 return -EIO; in measure_clock()
77 delta_us = timespec_to_us(&ts4) - timespec_to_us(&ts3); in measure_clock()
78 } while (delta_us > MEASURE_CLOCK_DELTA_THRESHOLD_US && --tries); in measure_clock()
81 dev_err(&GET_DEV(accel_dev), "Excessive clock measure delay\n"); in measure_clock()
82 return -ETIMEDOUT; in measure_clock()
85 delta_us = timespec_to_us(&ts3) - timespec_to_us(&ts1); in measure_clock()
87 return -EINVAL; in measure_clock()
89 temp = (timestamp2 - timestamp1) * ME_CLK_DIVIDER * 10; in measure_clock()
93 * and avoid promoting r-value to 64-bit before division. in measure_clock()
101 * adf_dev_measure_clock() - measures device clock frequency
111 * timestamp. So we can't expect too high accuracy from this measurement.
114 * * 0 - measurement succeed
115 * * -ETIMEDOUT - measurement failed
131 "Measured clock %d Hz is out of range, assuming %d\n", in adf_dev_measure_clock()