Linux Audio

Check our new training course

Loading...
Note: File does not exist in v3.1.
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright (c) 2019, Vladimir Oltean <olteanv@gmail.com>
 3 */
 4#ifndef _SJA1105_PTP_H
 5#define _SJA1105_PTP_H
 6
 7#if IS_ENABLED(CONFIG_NET_DSA_SJA1105_PTP)
 8
 9int sja1105_ptp_clock_register(struct sja1105_private *priv);
10
11void sja1105_ptp_clock_unregister(struct sja1105_private *priv);
12
13int sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts);
14
15int sja1105et_ptp_cmd(const void *ctx, const void *data);
16
17int sja1105pqrs_ptp_cmd(const void *ctx, const void *data);
18
19int sja1105_get_ts_info(struct dsa_switch *ds, int port,
20			struct ethtool_ts_info *ts);
21
22u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv, u64 now,
23			       u64 ts_partial);
24
25int sja1105_ptp_reset(struct sja1105_private *priv);
26
27#else
28
29static inline int sja1105_ptp_clock_register(struct sja1105_private *priv)
30{
31	return 0;
32}
33
34static inline void sja1105_ptp_clock_unregister(struct sja1105_private *priv)
35{
36	return;
37}
38
39static inline int
40sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts)
41{
42	return 0;
43}
44
45static inline u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv,
46					     u64 now, u64 ts_partial)
47{
48	return 0;
49}
50
51static inline int sja1105_ptp_reset(struct sja1105_private *priv)
52{
53	return 0;
54}
55
56#define sja1105et_ptp_cmd NULL
57
58#define sja1105pqrs_ptp_cmd NULL
59
60#define sja1105_get_ts_info NULL
61
62#endif /* IS_ENABLED(CONFIG_NET_DSA_SJA1105_PTP) */
63
64#endif /* _SJA1105_PTP_H */