Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: mscc: add HW timestamp configuration reporting

The driver stores HW configuration and can technically report it.
Add callback to do it.

Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20251124181151.277256-6-vadim.fedorenko@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vadim Fedorenko and committed by
Jakub Kicinski
ab95392a 036bb4a5

+13
+13
drivers/net/phy/mscc/mscc_ptp.c
··· 1051 1051 val); 1052 1052 } 1053 1053 1054 + static int vsc85xx_hwtstamp_get(struct mii_timestamper *mii_ts, 1055 + struct kernel_hwtstamp_config *cfg) 1056 + { 1057 + struct vsc8531_private *vsc8531 = 1058 + container_of(mii_ts, struct vsc8531_private, mii_ts); 1059 + 1060 + cfg->tx_type = vsc8531->ptp->tx_type; 1061 + cfg->rx_filter = vsc8531->ptp->rx_filter; 1062 + 1063 + return 0; 1064 + } 1065 + 1054 1066 static int vsc85xx_hwtstamp_set(struct mii_timestamper *mii_ts, 1055 1067 struct kernel_hwtstamp_config *cfg, 1056 1068 struct netlink_ext_ack *extack) ··· 1624 1612 vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp; 1625 1613 vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp; 1626 1614 vsc8531->mii_ts.hwtstamp_set = vsc85xx_hwtstamp_set; 1615 + vsc8531->mii_ts.hwtstamp_get = vsc85xx_hwtstamp_get; 1627 1616 vsc8531->mii_ts.ts_info = vsc85xx_ts_info; 1628 1617 phydev->mii_ts = &vsc8531->mii_ts; 1629 1618