blob: 0e4bc8b9329dd2e2c08ceb033000a822c065105a [file] [log] [blame]
Thomas Gleixner74ba9202019-05-20 09:19:02 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Richard Cochrand94ba802011-04-22 12:03:08 +02002/*
3 * PTP 1588 clock support
4 *
5 * Copyright (C) 2010 OMICRON electronics GmbH
Richard Cochrand94ba802011-04-22 12:03:08 +02006 */
Jiri Benc7356a762013-04-12 00:56:15 +00007#include <linux/idr.h>
Richard Cochrand94ba802011-04-22 12:03:08 +02008#include <linux/device.h>
9#include <linux/err.h>
10#include <linux/init.h>
11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/posix-clock.h>
14#include <linux/pps_kernel.h>
15#include <linux/slab.h>
16#include <linux/syscalls.h>
17#include <linux/uaccess.h>
Grygorii Strashkod9535cb2017-07-28 17:30:02 -050018#include <uapi/linux/sched/types.h>
Richard Cochrand94ba802011-04-22 12:03:08 +020019
20#include "ptp_private.h"
21
22#define PTP_MAX_ALARMS 4
Richard Cochrand94ba802011-04-22 12:03:08 +020023#define PTP_PPS_DEFAULTS (PPS_CAPTUREASSERT | PPS_OFFSETASSERT)
24#define PTP_PPS_EVENT PPS_CAPTUREASSERT
25#define PTP_PPS_MODE (PTP_PPS_DEFAULTS | PPS_CANWAIT | PPS_TSFMT_TSPEC)
26
Yangbo Luacb288e2021-06-30 16:11:55 +080027struct class *ptp_class;
28
Richard Cochrand94ba802011-04-22 12:03:08 +020029/* private globals */
30
31static dev_t ptp_devt;
Richard Cochrand94ba802011-04-22 12:03:08 +020032
Jiri Benc7356a762013-04-12 00:56:15 +000033static DEFINE_IDA(ptp_clocks_map);
Richard Cochrand94ba802011-04-22 12:03:08 +020034
35/* time stamp event queue operations */
36
37static inline int queue_free(struct timestamp_event_queue *q)
38{
39 return PTP_MAX_TIMESTAMPS - queue_cnt(q) - 1;
40}
41
42static void enqueue_external_timestamp(struct timestamp_event_queue *queue,
43 struct ptp_clock_event *src)
44{
45 struct ptp_extts_event *dst;
46 unsigned long flags;
47 s64 seconds;
48 u32 remainder;
49
50 seconds = div_u64_rem(src->timestamp, 1000000000, &remainder);
51
52 spin_lock_irqsave(&queue->lock, flags);
53
54 dst = &queue->buf[queue->tail];
55 dst->index = src->index;
56 dst->t.sec = seconds;
57 dst->t.nsec = remainder;
58
59 if (!queue_free(queue))
60 queue->head = (queue->head + 1) % PTP_MAX_TIMESTAMPS;
61
62 queue->tail = (queue->tail + 1) % PTP_MAX_TIMESTAMPS;
63
64 spin_unlock_irqrestore(&queue->lock, flags);
65}
66
Richard Cochrand94ba802011-04-22 12:03:08 +020067/* posix clock implementation */
68
Deepa Dinamanid340266e2017-03-26 12:04:13 -070069static int ptp_clock_getres(struct posix_clock *pc, struct timespec64 *tp)
Richard Cochrand94ba802011-04-22 12:03:08 +020070{
Thomas Gleixnerd68fb112011-12-05 21:16:06 +010071 tp->tv_sec = 0;
72 tp->tv_nsec = 1;
73 return 0;
Richard Cochrand94ba802011-04-22 12:03:08 +020074}
75
Deepa Dinamanid340266e2017-03-26 12:04:13 -070076static int ptp_clock_settime(struct posix_clock *pc, const struct timespec64 *tp)
Richard Cochrand94ba802011-04-22 12:03:08 +020077{
78 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
Richard Cochrand7d38f52015-03-29 23:11:53 +020079
Yangbo Lu73f37062021-06-30 16:11:53 +080080 if (ptp_vclock_in_use(ptp)) {
81 pr_err("ptp: virtual clock in use\n");
82 return -EBUSY;
83 }
84
Deepa Dinamanid340266e2017-03-26 12:04:13 -070085 return ptp->info->settime64(ptp->info, tp);
Richard Cochrand94ba802011-04-22 12:03:08 +020086}
87
Deepa Dinamanid340266e2017-03-26 12:04:13 -070088static int ptp_clock_gettime(struct posix_clock *pc, struct timespec64 *tp)
Richard Cochrand94ba802011-04-22 12:03:08 +020089{
90 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
Richard Cochrand7d38f52015-03-29 23:11:53 +020091 int err;
92
Miroslav Lichvar916444d2018-11-09 11:14:45 +010093 if (ptp->info->gettimex64)
94 err = ptp->info->gettimex64(ptp->info, tp, NULL);
95 else
96 err = ptp->info->gettime64(ptp->info, tp);
Richard Cochrand7d38f52015-03-29 23:11:53 +020097 return err;
Richard Cochrand94ba802011-04-22 12:03:08 +020098}
99
Deepa Dinamaniead25412018-07-02 22:44:21 -0700100static int ptp_clock_adjtime(struct posix_clock *pc, struct __kernel_timex *tx)
Richard Cochrand94ba802011-04-22 12:03:08 +0200101{
102 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
103 struct ptp_clock_info *ops;
104 int err = -EOPNOTSUPP;
105
Yangbo Lu73f37062021-06-30 16:11:53 +0800106 if (ptp_vclock_in_use(ptp)) {
107 pr_err("ptp: virtual clock in use\n");
108 return -EBUSY;
109 }
110
Richard Cochrand94ba802011-04-22 12:03:08 +0200111 ops = ptp->info;
112
113 if (tx->modes & ADJ_SETOFFSET) {
Deepa Dinamanid340266e2017-03-26 12:04:13 -0700114 struct timespec64 ts;
Richard Cochrand94ba802011-04-22 12:03:08 +0200115 ktime_t kt;
116 s64 delta;
117
118 ts.tv_sec = tx->time.tv_sec;
119 ts.tv_nsec = tx->time.tv_usec;
120
121 if (!(tx->modes & ADJ_NANO))
122 ts.tv_nsec *= 1000;
123
124 if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC)
125 return -EINVAL;
126
Deepa Dinamanid340266e2017-03-26 12:04:13 -0700127 kt = timespec64_to_ktime(ts);
Richard Cochrand94ba802011-04-22 12:03:08 +0200128 delta = ktime_to_ns(kt);
129 err = ops->adjtime(ops, delta);
Richard Cochrand94ba802011-04-22 12:03:08 +0200130 } else if (tx->modes & ADJ_FREQUENCY) {
Jakub Kicinski475b92f2021-06-14 15:24:05 -0700131 long ppb = scaled_ppm_to_ppb(tx->freq);
Richard Cochrand39a7432014-04-27 15:01:27 +0200132 if (ppb > ops->max_adj || ppb < -ops->max_adj)
133 return -ERANGE;
Richard Cochrand8d26352016-11-08 22:49:16 +0100134 if (ops->adjfine)
135 err = ops->adjfine(ops, tx->freq);
136 else
137 err = ops->adjfreq(ops, ppb);
Richard Cochran39a8cbd2012-09-22 07:02:01 +0000138 ptp->dialed_frequency = tx->freq;
Vincent Cheng184ecc92020-05-01 23:35:36 -0400139 } else if (tx->modes & ADJ_OFFSET) {
Richard Cochraneabd5c92020-05-24 11:27:10 -0700140 if (ops->adjphase) {
141 s32 offset = tx->offset;
142
143 if (!(tx->modes & ADJ_NANO))
144 offset *= NSEC_PER_USEC;
145
146 err = ops->adjphase(ops, offset);
147 }
Richard Cochran5c35bad2012-09-22 07:02:02 +0000148 } else if (tx->modes == 0) {
149 tx->freq = ptp->dialed_frequency;
150 err = 0;
Richard Cochrand94ba802011-04-22 12:03:08 +0200151 }
152
153 return err;
154}
155
156static struct posix_clock_operations ptp_clock_ops = {
157 .owner = THIS_MODULE,
158 .clock_adjtime = ptp_clock_adjtime,
159 .clock_gettime = ptp_clock_gettime,
160 .clock_getres = ptp_clock_getres,
161 .clock_settime = ptp_clock_settime,
162 .ioctl = ptp_ioctl,
163 .open = ptp_open,
164 .poll = ptp_poll,
165 .read = ptp_read,
166};
167
Vladis Dronova33121e2019-12-27 03:26:27 +0100168static void ptp_clock_release(struct device *dev)
Richard Cochrand94ba802011-04-22 12:03:08 +0200169{
Vladis Dronova33121e2019-12-27 03:26:27 +0100170 struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev);
Richard Cochrand94ba802011-04-22 12:03:08 +0200171
Vladis Dronov75718582020-01-13 14:00:09 +0100172 ptp_cleanup_pin_groups(ptp);
Yang Yingliangb6b19a72021-10-21 17:13:53 +0800173 kfree(ptp->vclock_index);
Richard Cochrand94ba802011-04-22 12:03:08 +0200174 mutex_destroy(&ptp->tsevq_mux);
Richard Cochran60923152014-03-20 22:21:52 +0100175 mutex_destroy(&ptp->pincfg_mux);
Yangbo Lu73f37062021-06-30 16:11:53 +0800176 mutex_destroy(&ptp->n_vclocks_mux);
Jiri Benc7356a762013-04-12 00:56:15 +0000177 ida_simple_remove(&ptp_clocks_map, ptp->index);
Richard Cochrand94ba802011-04-22 12:03:08 +0200178 kfree(ptp);
179}
180
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500181static void ptp_aux_kworker(struct kthread_work *work)
182{
183 struct ptp_clock *ptp = container_of(work, struct ptp_clock,
184 aux_work.work);
185 struct ptp_clock_info *info = ptp->info;
186 long delay;
187
188 delay = info->do_aux_work(info);
189
190 if (delay >= 0)
191 kthread_queue_delayed_work(ptp->kworker, &ptp->aux_work, delay);
192}
193
Richard Cochrand94ba802011-04-22 12:03:08 +0200194/* public interface */
195
Richard Cochran1ef76152012-09-22 07:02:03 +0000196struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
197 struct device *parent)
Richard Cochrand94ba802011-04-22 12:03:08 +0200198{
199 struct ptp_clock *ptp;
200 int err = 0, index, major = MAJOR(ptp_devt);
Yangbo Lu44c494c2021-06-30 16:11:54 +0800201 size_t size;
Richard Cochrand94ba802011-04-22 12:03:08 +0200202
203 if (info->n_alarm > PTP_MAX_ALARMS)
204 return ERR_PTR(-EINVAL);
205
Richard Cochrand94ba802011-04-22 12:03:08 +0200206 /* Initialize a clock structure. */
207 err = -ENOMEM;
208 ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL);
209 if (ptp == NULL)
210 goto no_memory;
211
Jiri Benc7356a762013-04-12 00:56:15 +0000212 index = ida_simple_get(&ptp_clocks_map, 0, MINORMASK + 1, GFP_KERNEL);
213 if (index < 0) {
214 err = index;
215 goto no_slot;
216 }
217
Richard Cochrand94ba802011-04-22 12:03:08 +0200218 ptp->clock.ops = ptp_clock_ops;
Richard Cochrand94ba802011-04-22 12:03:08 +0200219 ptp->info = info;
220 ptp->devid = MKDEV(major, index);
221 ptp->index = index;
222 spin_lock_init(&ptp->tsevq.lock);
223 mutex_init(&ptp->tsevq_mux);
Richard Cochran60923152014-03-20 22:21:52 +0100224 mutex_init(&ptp->pincfg_mux);
Yangbo Lu73f37062021-06-30 16:11:53 +0800225 mutex_init(&ptp->n_vclocks_mux);
Richard Cochrand94ba802011-04-22 12:03:08 +0200226 init_waitqueue_head(&ptp->tsev_wq);
227
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500228 if (ptp->info->do_aux_work) {
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500229 kthread_init_delayed_work(&ptp->aux_work, ptp_aux_kworker);
Rasmus Villemoes822c5f72018-10-26 23:22:59 +0200230 ptp->kworker = kthread_create_worker(0, "ptp%d", ptp->index);
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500231 if (IS_ERR(ptp->kworker)) {
232 err = PTR_ERR(ptp->kworker);
233 pr_err("failed to create ptp aux_worker %d\n", err);
234 goto kworker_err;
235 }
236 }
237
Yangbo Lu73f37062021-06-30 16:11:53 +0800238 /* PTP virtual clock is being registered under physical clock */
Yangbo Lu55eac202021-07-05 16:53:06 +0800239 if (parent && parent->class && parent->class->name &&
Yangbo Lu73f37062021-06-30 16:11:53 +0800240 strcmp(parent->class->name, "ptp") == 0)
241 ptp->is_virtual_clock = true;
242
Yangbo Lu44c494c2021-06-30 16:11:54 +0800243 if (!ptp->is_virtual_clock) {
Yangbo Lu73f37062021-06-30 16:11:53 +0800244 ptp->max_vclocks = PTP_DEFAULT_MAX_VCLOCKS;
245
Yangbo Lu44c494c2021-06-30 16:11:54 +0800246 size = sizeof(int) * ptp->max_vclocks;
247 ptp->vclock_index = kzalloc(size, GFP_KERNEL);
248 if (!ptp->vclock_index) {
249 err = -ENOMEM;
250 goto no_mem_for_vclocks;
251 }
252 }
253
Dmitry Torokhov85a66e52017-02-14 10:23:34 -0800254 err = ptp_populate_pin_groups(ptp);
255 if (err)
256 goto no_pin_groups;
257
Richard Cochrand94ba802011-04-22 12:03:08 +0200258 /* Register a new PPS source. */
259 if (info->pps) {
260 struct pps_source_info pps;
261 memset(&pps, 0, sizeof(pps));
262 snprintf(pps.name, PPS_MAX_NAME_LEN, "ptp%d", index);
263 pps.mode = PTP_PPS_MODE;
264 pps.owner = info->owner;
265 ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS);
Dan Carpenterb9d93592018-12-07 09:00:46 +0300266 if (IS_ERR(ptp->pps_source)) {
267 err = PTR_ERR(ptp->pps_source);
Richard Cochrand94ba802011-04-22 12:03:08 +0200268 pr_err("failed to register pps source\n");
269 goto no_pps;
270 }
Jonathan Lemondebdd8e2021-07-08 11:04:08 -0700271 ptp->pps_source->lookup_cookie = ptp;
Richard Cochrand94ba802011-04-22 12:03:08 +0200272 }
273
Vladis Dronova33121e2019-12-27 03:26:27 +0100274 /* Initialize a new device of our class in our clock structure. */
275 device_initialize(&ptp->dev);
276 ptp->dev.devt = ptp->devid;
277 ptp->dev.class = ptp_class;
278 ptp->dev.parent = parent;
279 ptp->dev.groups = ptp->pin_attr_groups;
280 ptp->dev.release = ptp_clock_release;
281 dev_set_drvdata(&ptp->dev, ptp);
282 dev_set_name(&ptp->dev, "ptp%d", ptp->index);
283
284 /* Create a posix clock and link it to the device. */
285 err = posix_clock_register(&ptp->clock, &ptp->dev);
Richard Cochrand94ba802011-04-22 12:03:08 +0200286 if (err) {
Carlos Llamas11195bf2021-10-27 23:18:02 +0000287 if (ptp->pps_source)
288 pps_unregister_source(ptp->pps_source);
Yang Yingliang4225fea2021-10-20 16:18:34 +0800289
Yang Yingliang4225fea2021-10-20 16:18:34 +0800290 if (ptp->kworker)
Carlos Llamas11195bf2021-10-27 23:18:02 +0000291 kthread_destroy_worker(ptp->kworker);
Yang Yingliang4225fea2021-10-20 16:18:34 +0800292
293 put_device(&ptp->dev);
294
Richard Cochrand94ba802011-04-22 12:03:08 +0200295 pr_err("failed to create posix clock\n");
Yang Yingliang4225fea2021-10-20 16:18:34 +0800296 return ERR_PTR(err);
Richard Cochrand94ba802011-04-22 12:03:08 +0200297 }
298
Richard Cochrand94ba802011-04-22 12:03:08 +0200299 return ptp;
300
Richard Cochrand94ba802011-04-22 12:03:08 +0200301no_pps:
Dmitry Torokhov85a66e52017-02-14 10:23:34 -0800302 ptp_cleanup_pin_groups(ptp);
303no_pin_groups:
Yangbo Lu44c494c2021-06-30 16:11:54 +0800304 kfree(ptp->vclock_index);
305no_mem_for_vclocks:
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500306 if (ptp->kworker)
307 kthread_destroy_worker(ptp->kworker);
308kworker_err:
Richard Cochrand94ba802011-04-22 12:03:08 +0200309 mutex_destroy(&ptp->tsevq_mux);
Richard Cochran60923152014-03-20 22:21:52 +0100310 mutex_destroy(&ptp->pincfg_mux);
Yangbo Lu73f37062021-06-30 16:11:53 +0800311 mutex_destroy(&ptp->n_vclocks_mux);
Christophe Jailletb9118b72016-10-02 09:04:16 +0200312 ida_simple_remove(&ptp_clocks_map, index);
Jiri Benc7356a762013-04-12 00:56:15 +0000313no_slot:
Richard Cochrand94ba802011-04-22 12:03:08 +0200314 kfree(ptp);
315no_memory:
Richard Cochrand94ba802011-04-22 12:03:08 +0200316 return ERR_PTR(err);
317}
318EXPORT_SYMBOL(ptp_clock_register);
319
320int ptp_clock_unregister(struct ptp_clock *ptp)
321{
Yangbo Lu73f37062021-06-30 16:11:53 +0800322 if (ptp_vclock_in_use(ptp)) {
323 pr_err("ptp: virtual clock in use\n");
324 return -EBUSY;
325 }
326
Richard Cochrand94ba802011-04-22 12:03:08 +0200327 ptp->defunct = 1;
328 wake_up_interruptible(&ptp->tsev_wq);
329
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500330 if (ptp->kworker) {
331 kthread_cancel_delayed_work_sync(&ptp->aux_work);
332 kthread_destroy_worker(ptp->kworker);
333 }
334
Richard Cochrand94ba802011-04-22 12:03:08 +0200335 /* Release the clock's resources. */
336 if (ptp->pps_source)
337 pps_unregister_source(ptp->pps_source);
Dmitry Torokhov85a66e52017-02-14 10:23:34 -0800338
Richard Cochrand94ba802011-04-22 12:03:08 +0200339 posix_clock_unregister(&ptp->clock);
Vladis Dronov75718582020-01-13 14:00:09 +0100340
Richard Cochrand94ba802011-04-22 12:03:08 +0200341 return 0;
342}
343EXPORT_SYMBOL(ptp_clock_unregister);
344
345void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event)
346{
347 struct pps_event_time evt;
348
349 switch (event->type) {
350
351 case PTP_CLOCK_ALARM:
352 break;
353
354 case PTP_CLOCK_EXTTS:
355 enqueue_external_timestamp(&ptp->tsevq, event);
356 wake_up_interruptible(&ptp->tsev_wq);
357 break;
358
359 case PTP_CLOCK_PPS:
360 pps_get_ts(&evt);
361 pps_event(ptp->pps_source, &evt, PTP_PPS_EVENT, NULL);
362 break;
Ben Hutchings220a60a2012-09-03 11:34:58 +0100363
364 case PTP_CLOCK_PPSUSR:
365 pps_event(ptp->pps_source, &event->pps_times,
366 PTP_PPS_EVENT, NULL);
367 break;
Richard Cochrand94ba802011-04-22 12:03:08 +0200368 }
369}
370EXPORT_SYMBOL(ptp_clock_event);
371
Richard Cochran995a9092012-04-03 22:59:16 +0000372int ptp_clock_index(struct ptp_clock *ptp)
373{
374 return ptp->index;
375}
376EXPORT_SYMBOL(ptp_clock_index);
377
Richard Cochran60923152014-03-20 22:21:52 +0100378int ptp_find_pin(struct ptp_clock *ptp,
379 enum ptp_pin_function func, unsigned int chan)
380{
381 struct ptp_pin_desc *pin = NULL;
382 int i;
383
Richard Cochran60923152014-03-20 22:21:52 +0100384 for (i = 0; i < ptp->info->n_pins; i++) {
385 if (ptp->info->pin_config[i].func == func &&
386 ptp->info->pin_config[i].chan == chan) {
387 pin = &ptp->info->pin_config[i];
388 break;
389 }
390 }
Richard Cochran60923152014-03-20 22:21:52 +0100391
392 return pin ? i : -1;
393}
394EXPORT_SYMBOL(ptp_find_pin);
395
Richard Cochran62582a72020-03-29 07:55:10 -0700396int ptp_find_pin_unlocked(struct ptp_clock *ptp,
397 enum ptp_pin_function func, unsigned int chan)
398{
399 int result;
400
401 mutex_lock(&ptp->pincfg_mux);
402
403 result = ptp_find_pin(ptp, func, chan);
404
405 mutex_unlock(&ptp->pincfg_mux);
406
407 return result;
408}
409EXPORT_SYMBOL(ptp_find_pin_unlocked);
410
Grygorii Strashkod9535cb2017-07-28 17:30:02 -0500411int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay)
412{
413 return kthread_mod_delayed_work(ptp->kworker, &ptp->aux_work, delay);
414}
415EXPORT_SYMBOL(ptp_schedule_worker);
416
Vladimir Oltean544fed42019-12-27 15:02:28 +0200417void ptp_cancel_worker_sync(struct ptp_clock *ptp)
418{
419 kthread_cancel_delayed_work_sync(&ptp->aux_work);
420}
421EXPORT_SYMBOL(ptp_cancel_worker_sync);
422
Richard Cochrand94ba802011-04-22 12:03:08 +0200423/* module operations */
424
425static void __exit ptp_exit(void)
426{
427 class_destroy(ptp_class);
Jiri Benc7356a762013-04-12 00:56:15 +0000428 unregister_chrdev_region(ptp_devt, MINORMASK + 1);
429 ida_destroy(&ptp_clocks_map);
Richard Cochrand94ba802011-04-22 12:03:08 +0200430}
431
432static int __init ptp_init(void)
433{
434 int err;
435
436 ptp_class = class_create(THIS_MODULE, "ptp");
437 if (IS_ERR(ptp_class)) {
438 pr_err("ptp: failed to allocate class\n");
439 return PTR_ERR(ptp_class);
440 }
441
Jiri Benc7356a762013-04-12 00:56:15 +0000442 err = alloc_chrdev_region(&ptp_devt, 0, MINORMASK + 1, "ptp");
Richard Cochrand94ba802011-04-22 12:03:08 +0200443 if (err < 0) {
444 pr_err("ptp: failed to allocate device region\n");
445 goto no_region;
446 }
447
Greg Kroah-Hartman34991162013-07-24 15:05:20 -0700448 ptp_class->dev_groups = ptp_groups;
Richard Cochrand94ba802011-04-22 12:03:08 +0200449 pr_info("PTP clock support registered\n");
450 return 0;
451
452no_region:
453 class_destroy(ptp_class);
454 return err;
455}
456
457subsys_initcall(ptp_init);
458module_exit(ptp_exit);
459
Richard Cochranc2ec3ff2012-03-16 22:39:29 +0000460MODULE_AUTHOR("Richard Cochran <richardcochran@gmail.com>");
Richard Cochrand94ba802011-04-22 12:03:08 +0200461MODULE_DESCRIPTION("PTP clocks support");
462MODULE_LICENSE("GPL");