Lines Matching +full:system +full:- +full:clock +full:- +full:frequency
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * PTP 1588 clock support
19 * struct ptp_clock_request - request PTP clock event
47 * struct ptp_system_timestamp - system time corresponding to a PHC timestamp
48 * @pre_ts: system timestamp before capturing PHC
49 * @post_ts: system timestamp after capturing PHC
50 * @clockid: clock-base used for capturing the system timestamps
59 * struct ptp_clock_info - describes a PTP hardware clock
61 * @owner: The clock driver should set to THIS_MODULE.
62 * @name: A short "friendly name" to identify the clock and to
65 * @max_adj: The maximum possible frequency adjustment, in parts per billon.
70 * @pps: Indicates whether the clock supports a PPS callback.
75 * clock operations
77 * @adjfine: Adjusts the frequency of the hardware clock.
78 * parameter scaled_ppm: Desired frequency offset from
79 * nominal frequency in parts per million, but with a
88 * to the hardware clock's phase control functionality
91 * @adjtime: Shifts the time of the hardware clock.
94 * @gettime64: Reads the current time from the hardware clock.
99 * @gettimex64: Reads the current time from the hardware clock and optionally
100 * also the system clock.
103 * the system clock. The first reading is made right before
107 * @getcrosststamp: Reads the current time from the hardware clock and
108 * system clock simultaneously.
109 * parameter cts: Contains timestamp (device,system) pair,
110 * where system time is realtime and monotonic.
112 * @settime64: Set the current time on the hardware clock.
116 * clock.
123 * hardware clock and optionally also the system clock.
129 * from the system clock. The first reading is made right before
134 * hardware clock and system clock simultaneously.
138 * parameter cts: Contains timestamp (device,system) pair,
139 * where system time is realtime and monotonic.
146 * Hardware Clock subsystem maintains the 'pin_config'
165 * The callbacks must all return zero on success, non-zero otherwise.
211 * struct ptp_clock_event - decribes a PTP hardware clock event
231 * scaled_ppm_to_ppb() - convert scaled ppm to ppb
257 * diff_by_scaled_ppm - Calculate difference using scaled ppm
276 scaled_ppm = -scaled_ppm; in diff_by_scaled_ppm()
285 * adjust_by_scaled_ppm - Adjust a base increment by scaled parts per million
287 * @scaled_ppm: scaled parts per million frequency adjustment
297 return base - diff; in adjust_by_scaled_ppm()
305 * ptp_clock_register() - register a PTP hardware clock driver
307 * @info: Structure describing the new clock.
308 * @parent: Pointer to the parent device of the new clock.
320 * ptp_clock_unregister() - unregister a PTP hardware clock driver
322 * @ptp: The clock to remove from service.
328 * ptp_clock_event() - notify the PTP layer about an event
330 * @ptp: The clock obtained from ptp_clock_register().
338 * ptp_clock_index() - obtain the device index of a PTP clock
340 * @ptp: The clock obtained from ptp_clock_register().
346 * ptp_find_pin() - obtain the pin index of a given auxiliary function
354 * @ptp: The clock obtained from ptp_clock_register().
357 * Return: Pin index in the range of zero to ptp_clock_caps.n_pins - 1,
358 * or -1 if the auxiliary function cannot be found.
365 * ptp_find_pin_unlocked() - wrapper for ptp_find_pin()
372 * @ptp: The clock obtained from ptp_clock_register().
375 * Return: Pin index in the range of zero to ptp_clock_caps.n_pins - 1,
376 * or -1 if the auxiliary function cannot be found.
383 * ptp_schedule_worker() - schedule ptp auxiliary work
385 * @ptp: The clock obtained from ptp_clock_register().
393 * ptp_cancel_worker_sync() - cancel ptp auxiliary clock
395 * @ptp: The clock obtained from ptp_clock_register().
409 { return -1; } in ptp_clock_index()
412 { return -1; } in ptp_find_pin()
416 { return -1; } in ptp_find_pin_unlocked()
419 { return -EOPNOTSUPP; } in ptp_schedule_worker()
431 * ptp_get_vclocks_index() - get all vclocks index on pclock, and
443 * ptp_convert_timestamp() - convert timestamp to a ptp vclock time
463 switch (sts->clockid) { in ptp_read_system_prets()
465 ktime_get_real_ts64(&sts->pre_ts); in ptp_read_system_prets()
468 ktime_get_ts64(&sts->pre_ts); in ptp_read_system_prets()
471 ktime_get_raw_ts64(&sts->pre_ts); in ptp_read_system_prets()
482 switch (sts->clockid) { in ptp_read_system_postts()
484 ktime_get_real_ts64(&sts->post_ts); in ptp_read_system_postts()
487 ktime_get_ts64(&sts->post_ts); in ptp_read_system_postts()
490 ktime_get_raw_ts64(&sts->post_ts); in ptp_read_system_postts()