#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/posix-clock.h>
#include <linux/pps_kernel.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include <linux/debugfs.h>
#include <linux/xarray.h>
#include <uapi/linux/sched/types.h>
#include "ptp_private.h"
#define PTP_MAX_ALARMS …
#define PTP_PPS_DEFAULTS …
#define PTP_PPS_EVENT …
#define PTP_PPS_MODE …
const struct class ptp_class = …;
static dev_t ptp_devt;
static DEFINE_XARRAY_ALLOC(ptp_clocks_map);
static inline int queue_free(struct timestamp_event_queue *q)
{ … }
static void enqueue_external_timestamp(struct timestamp_event_queue *queue,
struct ptp_clock_event *src)
{ … }
static int ptp_clock_getres(struct posix_clock *pc, struct timespec64 *tp)
{ … }
static int ptp_clock_settime(struct posix_clock *pc, const struct timespec64 *tp)
{ … }
static int ptp_clock_gettime(struct posix_clock *pc, struct timespec64 *tp)
{ … }
static int ptp_clock_adjtime(struct posix_clock *pc, struct __kernel_timex *tx)
{ … }
static struct posix_clock_operations ptp_clock_ops = …;
static void ptp_clock_release(struct device *dev)
{ … }
static int ptp_getcycles64(struct ptp_clock_info *info, struct timespec64 *ts)
{ … }
static void ptp_aux_kworker(struct kthread_work *work)
{ … }
struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
struct device *parent)
{ … }
EXPORT_SYMBOL(…);
static int unregister_vclock(struct device *dev, void *data)
{ … }
int ptp_clock_unregister(struct ptp_clock *ptp)
{ … }
EXPORT_SYMBOL(…);
void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event)
{ … }
EXPORT_SYMBOL(…);
int ptp_clock_index(struct ptp_clock *ptp)
{ … }
EXPORT_SYMBOL(…);
int ptp_find_pin(struct ptp_clock *ptp,
enum ptp_pin_function func, unsigned int chan)
{ … }
EXPORT_SYMBOL(…);
int ptp_find_pin_unlocked(struct ptp_clock *ptp,
enum ptp_pin_function func, unsigned int chan)
{ … }
EXPORT_SYMBOL(…);
int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay)
{ … }
EXPORT_SYMBOL(…);
void ptp_cancel_worker_sync(struct ptp_clock *ptp)
{ … }
EXPORT_SYMBOL(…);
static void __exit ptp_exit(void)
{ … }
static int __init ptp_init(void)
{ … }
subsys_initcall(ptp_init);
module_exit(ptp_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;