summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz_ptp.h
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@arri.de>2023-01-10 11:49:19 +0300
committerDavid S. Miller <davem@davemloft.net>2023-01-13 11:40:40 +0300
commitc59e12a140fbfbef0fae72be71b47cdb05f25713 (patch)
tree5ace2f4f9dd0d0a77a4b783ccc0a153d0300c34a /drivers/net/dsa/microchip/ksz_ptp.h
parenteac1ea20261e1fac8ffbfb3b7da2d5e6b7c159e3 (diff)
downloadlinux-c59e12a140fbfbef0fae72be71b47cdb05f25713.tar.xz
net: dsa: microchip: ptp: Initial hardware time stamping support
This patch adds the routine for get_ts_info, hwstamp_get, set. This enables the PTP support towards userspace applications such as linuxptp. Signed-off-by: Christian Eggers <ceggers@arri.de> Co-developed-by: Arun Ramadoss <arun.ramadoss@microchip.com> Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_ptp.h')
-rw-r--r--drivers/net/dsa/microchip/ksz_ptp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_ptp.h b/drivers/net/dsa/microchip/ksz_ptp.h
index 8930047da764..7bb3fde2dd14 100644
--- a/drivers/net/dsa/microchip/ksz_ptp.h
+++ b/drivers/net/dsa/microchip/ksz_ptp.h
@@ -23,6 +23,11 @@ int ksz_ptp_clock_register(struct dsa_switch *ds);
void ksz_ptp_clock_unregister(struct dsa_switch *ds);
+int ksz_get_ts_info(struct dsa_switch *ds, int port,
+ struct ethtool_ts_info *ts);
+int ksz_hwtstamp_get(struct dsa_switch *ds, int port, struct ifreq *ifr);
+int ksz_hwtstamp_set(struct dsa_switch *ds, int port, struct ifreq *ifr);
+
#else
struct ksz_ptp_data {
@@ -37,6 +42,12 @@ static inline int ksz_ptp_clock_register(struct dsa_switch *ds)
static inline void ksz_ptp_clock_unregister(struct dsa_switch *ds) { }
+#define ksz_get_ts_info NULL
+
+#define ksz_hwtstamp_get NULL
+
+#define ksz_hwtstamp_set NULL
+
#endif /* End of CONFIG_NET_DSA_MICROCHIP_KSZ_PTP */
#endif