#include <linux/dsa/ksz_common.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
#include <linux/ptp_classify.h>
#include <linux/ptp_clock_kernel.h>
#include "ksz_common.h"
#include "ksz_ptp.h"
#include "ksz_ptp_reg.h"
#define ptp_caps_to_data(d) …
#define ptp_data_to_ksz_dev(d) …
#define work_to_xmit_work(w) …
#define KSZ_MAX_DRIFT_CORR …
#define KSZ_MAX_PULSE_WIDTH …
#define KSZ_PTP_INC_NS …
#define KSZ_PTP_SUBNS_BITS …
#define KSZ_PTP_INT_START …
static int ksz_ptp_tou_gpio(struct ksz_device *dev)
{ … }
static int ksz_ptp_tou_reset(struct ksz_device *dev, u8 unit)
{ … }
static int ksz_ptp_tou_pulse_verify(u64 pulse_ns)
{ … }
static int ksz_ptp_tou_target_time_set(struct ksz_device *dev,
struct timespec64 const *ts)
{ … }
static int ksz_ptp_tou_start(struct ksz_device *dev, u8 unit)
{ … }
static int ksz_ptp_configure_perout(struct ksz_device *dev,
u32 cycle_width_ns, u32 pulse_width_ns,
struct timespec64 const *target_time,
u8 index)
{ … }
static int ksz_ptp_enable_perout(struct ksz_device *dev,
struct ptp_perout_request const *request,
int on)
{ … }
static int ksz_ptp_enable_mode(struct ksz_device *dev)
{ … }
int ksz_get_ts_info(struct dsa_switch *ds, int port, struct kernel_ethtool_ts_info *ts)
{ … }
int ksz_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr)
{ … }
static int ksz_set_hwtstamp_config(struct ksz_device *dev,
struct ksz_port *prt,
struct hwtstamp_config *config)
{ … }
int ksz_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr)
{ … }
static ktime_t ksz_tstamp_reconstruct(struct ksz_device *dev, ktime_t tstamp)
{ … }
bool ksz_port_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb,
unsigned int type)
{ … }
void ksz_port_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
{ … }
static void ksz_ptp_txtstamp_skb(struct ksz_device *dev,
struct ksz_port *prt, struct sk_buff *skb)
{ … }
void ksz_port_deferred_xmit(struct kthread_work *work)
{ … }
static int _ksz_ptp_gettime(struct ksz_device *dev, struct timespec64 *ts)
{ … }
static int ksz_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
{ … }
static int ksz_ptp_restart_perout(struct ksz_device *dev)
{ … }
static int ksz_ptp_settime(struct ptp_clock_info *ptp,
const struct timespec64 *ts)
{ … }
static int ksz_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{ … }
static int ksz_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ … }
static int ksz_ptp_enable(struct ptp_clock_info *ptp,
struct ptp_clock_request *req, int on)
{ … }
static int ksz_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
enum ptp_pin_function func, unsigned int chan)
{ … }
static long ksz_ptp_do_aux_work(struct ptp_clock_info *ptp)
{ … }
static int ksz_ptp_start_clock(struct ksz_device *dev)
{ … }
int ksz_ptp_clock_register(struct dsa_switch *ds)
{ … }
void ksz_ptp_clock_unregister(struct dsa_switch *ds)
{ … }
static irqreturn_t ksz_ptp_msg_thread_fn(int irq, void *dev_id)
{ … }
static irqreturn_t ksz_ptp_irq_thread_fn(int irq, void *dev_id)
{ … }
static void ksz_ptp_irq_mask(struct irq_data *d)
{ … }
static void ksz_ptp_irq_unmask(struct irq_data *d)
{ … }
static void ksz_ptp_irq_bus_lock(struct irq_data *d)
{ … }
static void ksz_ptp_irq_bus_sync_unlock(struct irq_data *d)
{ … }
static const struct irq_chip ksz_ptp_irq_chip = …;
static int ksz_ptp_irq_domain_map(struct irq_domain *d,
unsigned int irq, irq_hw_number_t hwirq)
{ … }
static const struct irq_domain_ops ksz_ptp_irq_domain_ops = …;
static void ksz_ptp_msg_irq_free(struct ksz_port *port, u8 n)
{ … }
static int ksz_ptp_msg_irq_setup(struct ksz_port *port, u8 n)
{ … }
int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)
{ … }
void ksz_ptp_irq_free(struct dsa_switch *ds, u8 p)
{ … }
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;