#include <linux/spi/spi.h>
#include "sja1105.h"
#define SJA1105_MAX_ADJ_PPB …
#define SJA1105_SIZE_PTP_CMD …
#define SJA1105_EXTTS_INTERVAL …
#define SJA1105_CC_MULT_NUM …
#define SJA1105_CC_MULT_DEM …
#define SJA1105_CC_MULT …
enum sja1105_ptp_clk_mode { … };
#define extts_to_data(t) …
#define ptp_caps_to_data(d) …
#define ptp_data_to_sja1105(d) …
int sja1105_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr)
{ … }
int sja1105_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr)
{ … }
int sja1105_get_ts_info(struct dsa_switch *ds, int port,
struct kernel_ethtool_ts_info *info)
{ … }
void sja1105et_ptp_cmd_packing(u8 *buf, struct sja1105_ptp_cmd *cmd,
enum packing_op op)
{ … }
void sja1105pqrs_ptp_cmd_packing(u8 *buf, struct sja1105_ptp_cmd *cmd,
enum packing_op op)
{ … }
int sja1105_ptp_commit(struct dsa_switch *ds, struct sja1105_ptp_cmd *cmd,
sja1105_spi_rw_mode_t rw)
{ … }
static u64 sja1105_tstamp_reconstruct(struct dsa_switch *ds, u64 now,
u64 ts_partial)
{ … }
static int sja1105_ptpegr_ts_poll(struct dsa_switch *ds, int port, u64 *ts)
{ … }
static int sja1105_ptpclkval_read(struct sja1105_private *priv, u64 *ticks,
struct ptp_system_timestamp *ptp_sts)
{ … }
static int sja1105_ptpclkval_write(struct sja1105_private *priv, u64 ticks,
struct ptp_system_timestamp *ptp_sts)
{ … }
static void sja1105_extts_poll(struct sja1105_private *priv)
{ … }
static long sja1105_rxtstamp_work(struct ptp_clock_info *ptp)
{ … }
bool sja1105_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
{ … }
bool sja1110_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
{ … }
bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
struct sk_buff *skb, unsigned int type)
{ … }
void sja1110_process_meta_tstamp(struct dsa_switch *ds, int port, u8 ts_id,
enum sja1110_meta_tstamp dir, u64 tstamp)
{ … }
void sja1110_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
{ … }
void sja1105_port_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
{ … }
static int sja1105_ptp_reset(struct dsa_switch *ds)
{ … }
int __sja1105_ptp_gettimex(struct dsa_switch *ds, u64 *ns,
struct ptp_system_timestamp *ptp_sts)
{ … }
static int sja1105_ptp_gettimex(struct ptp_clock_info *ptp,
struct timespec64 *ts,
struct ptp_system_timestamp *ptp_sts)
{ … }
static int sja1105_ptp_mode_set(struct sja1105_private *priv,
enum sja1105_ptp_clk_mode mode)
{ … }
int __sja1105_ptp_settime(struct dsa_switch *ds, u64 ns,
struct ptp_system_timestamp *ptp_sts)
{ … }
static int sja1105_ptp_settime(struct ptp_clock_info *ptp,
const struct timespec64 *ts)
{ … }
static int sja1105_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{ … }
int __sja1105_ptp_adjtime(struct dsa_switch *ds, s64 delta)
{ … }
static int sja1105_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ … }
static void sja1105_ptp_extts_setup_timer(struct sja1105_ptp_data *ptp_data)
{ … }
static void sja1105_ptp_extts_timer(struct timer_list *t)
{ … }
static int sja1105_change_ptp_clk_pin_func(struct sja1105_private *priv,
enum ptp_pin_function func)
{ … }
static int sja1105_per_out_enable(struct sja1105_private *priv,
struct ptp_perout_request *perout,
bool on)
{ … }
static int sja1105_extts_enable(struct sja1105_private *priv,
struct ptp_extts_request *extts,
bool on)
{ … }
static int sja1105_ptp_enable(struct ptp_clock_info *ptp,
struct ptp_clock_request *req, int on)
{ … }
static int sja1105_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,
enum ptp_pin_function func, unsigned int chan)
{ … }
static struct ptp_pin_desc sja1105_ptp_pin = …;
int sja1105_ptp_clock_register(struct dsa_switch *ds)
{ … }
void sja1105_ptp_clock_unregister(struct dsa_switch *ds)
{ … }
void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int port,
struct sk_buff *skb)
{ … }