aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ptp_clock_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ptp_clock_kernel.h')
-rw-r--r--include/linux/ptp_clock_kernel.h32
1 files changed, 6 insertions, 26 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h
index 38a99350832..dd2e44fba63 100644
--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -21,8 +21,6 @@
21#ifndef _PTP_CLOCK_KERNEL_H_ 21#ifndef _PTP_CLOCK_KERNEL_H_
22#define _PTP_CLOCK_KERNEL_H_ 22#define _PTP_CLOCK_KERNEL_H_
23 23
24#include <linux/device.h>
25#include <linux/pps_kernel.h>
26#include <linux/ptp_clock.h> 24#include <linux/ptp_clock.h>
27 25
28 26
@@ -42,9 +40,7 @@ struct ptp_clock_request {
42 * struct ptp_clock_info - decribes a PTP hardware clock 40 * struct ptp_clock_info - decribes a PTP hardware clock
43 * 41 *
44 * @owner: The clock driver should set to THIS_MODULE. 42 * @owner: The clock driver should set to THIS_MODULE.
45 * @name: A short "friendly name" to identify the clock and to 43 * @name: A short name to identify the clock.
46 * help distinguish PHY based devices from MAC based ones.
47 * The string is not meant to be a unique id.
48 * @max_adj: The maximum possible frequency adjustment, in parts per billon. 44 * @max_adj: The maximum possible frequency adjustment, in parts per billon.
49 * @n_alarm: The number of programmable alarms. 45 * @n_alarm: The number of programmable alarms.
50 * @n_ext_ts: The number of external time stamp channels. 46 * @n_ext_ts: The number of external time stamp channels.
@@ -54,8 +50,7 @@ struct ptp_clock_request {
54 * clock operations 50 * clock operations
55 * 51 *
56 * @adjfreq: Adjusts the frequency of the hardware clock. 52 * @adjfreq: Adjusts the frequency of the hardware clock.
57 * parameter delta: Desired frequency offset from nominal frequency 53 * parameter delta: Desired period change in parts per billion.
58 * in parts per billion
59 * 54 *
60 * @adjtime: Shifts the time of the hardware clock. 55 * @adjtime: Shifts the time of the hardware clock.
61 * parameter delta: Desired change in nanoseconds. 56 * parameter delta: Desired change in nanoseconds.
@@ -97,12 +92,10 @@ struct ptp_clock;
97/** 92/**
98 * ptp_clock_register() - register a PTP hardware clock driver 93 * ptp_clock_register() - register a PTP hardware clock driver
99 * 94 *
100 * @info: Structure describing the new clock. 95 * @info: Structure describing the new clock.
101 * @parent: Pointer to the parent device of the new clock.
102 */ 96 */
103 97
104extern struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, 98extern struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info);
105 struct device *parent);
106 99
107/** 100/**
108 * ptp_clock_unregister() - unregister a PTP hardware clock driver 101 * ptp_clock_unregister() - unregister a PTP hardware clock driver
@@ -117,7 +110,6 @@ enum ptp_clock_events {
117 PTP_CLOCK_ALARM, 110 PTP_CLOCK_ALARM,
118 PTP_CLOCK_EXTTS, 111 PTP_CLOCK_EXTTS,
119 PTP_CLOCK_PPS, 112 PTP_CLOCK_PPS,
120 PTP_CLOCK_PPSUSR,
121}; 113};
122 114
123/** 115/**
@@ -125,17 +117,13 @@ enum ptp_clock_events {
125 * 117 *
126 * @type: One of the ptp_clock_events enumeration values. 118 * @type: One of the ptp_clock_events enumeration values.
127 * @index: Identifies the source of the event. 119 * @index: Identifies the source of the event.
128 * @timestamp: When the event occurred (%PTP_CLOCK_EXTTS only). 120 * @timestamp: When the event occured.
129 * @pps_times: When the event occurred (%PTP_CLOCK_PPSUSR only).
130 */ 121 */
131 122
132struct ptp_clock_event { 123struct ptp_clock_event {
133 int type; 124 int type;
134 int index; 125 int index;
135 union { 126 u64 timestamp;
136 u64 timestamp;
137 struct pps_event_time pps_times;
138 };
139}; 127};
140 128
141/** 129/**
@@ -148,12 +136,4 @@ struct ptp_clock_event {
148extern void ptp_clock_event(struct ptp_clock *ptp, 136extern void ptp_clock_event(struct ptp_clock *ptp,
149 struct ptp_clock_event *event); 137 struct ptp_clock_event *event);
150 138
151/**
152 * ptp_clock_index() - obtain the device index of a PTP clock
153 *
154 * @ptp: The clock obtained from ptp_clock_register().
155 */
156
157extern int ptp_clock_index(struct ptp_clock *ptp);
158
159#endif 139#endif