#ifndef _PTP_PRIVATE_H_
#define _PTP_PRIVATE_H_
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/posix-clock.h>
#include <linux/ptp_clock.h>
#include <linux/ptp_clock_kernel.h>
#include <linux/time.h>
#include <linux/list.h>
#include <linux/bitmap.h>
#include <linux/debugfs.h>
#define PTP_MAX_TIMESTAMPS …
#define PTP_BUF_TIMESTAMPS …
#define PTP_DEFAULT_MAX_VCLOCKS …
#define PTP_MAX_CHANNELS …
struct timestamp_event_queue { … };
struct ptp_clock { … };
#define info_to_vclock(d) …
#define cc_to_vclock(d) …
#define dw_to_vclock(d) …
struct ptp_vclock { … };
static inline int queue_cnt(const struct timestamp_event_queue *q)
{ … }
static inline bool ptp_vclock_in_use(struct ptp_clock *ptp)
{ … }
static inline bool ptp_clock_freerun(struct ptp_clock *ptp)
{ … }
extern const struct class ptp_class;
int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
enum ptp_pin_function func, unsigned int chan);
long ptp_ioctl(struct posix_clock_context *pccontext, unsigned int cmd,
unsigned long arg);
int ptp_open(struct posix_clock_context *pccontext, fmode_t fmode);
int ptp_release(struct posix_clock_context *pccontext);
ssize_t ptp_read(struct posix_clock_context *pccontext, uint flags, char __user *buf,
size_t cnt);
__poll_t ptp_poll(struct posix_clock_context *pccontext, struct file *fp,
poll_table *wait);
extern const struct attribute_group *ptp_groups[];
int ptp_populate_pin_groups(struct ptp_clock *ptp);
void ptp_cleanup_pin_groups(struct ptp_clock *ptp);
struct ptp_vclock *ptp_vclock_register(struct ptp_clock *pclock);
void ptp_vclock_unregister(struct ptp_vclock *vclock);
#endif