mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
036bb4a537
commit
ab95392ab5
@@ -1051,6 +1051,18 @@ static void vsc85xx_ts_reset_fifo(struct phy_device *phydev)
|
||||
val);
|
||||
}
|
||||
|
||||
static int vsc85xx_hwtstamp_get(struct mii_timestamper *mii_ts,
|
||||
struct kernel_hwtstamp_config *cfg)
|
||||
{
|
||||
struct vsc8531_private *vsc8531 =
|
||||
container_of(mii_ts, struct vsc8531_private, mii_ts);
|
||||
|
||||
cfg->tx_type = vsc8531->ptp->tx_type;
|
||||
cfg->rx_filter = vsc8531->ptp->rx_filter;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vsc85xx_hwtstamp_set(struct mii_timestamper *mii_ts,
|
||||
struct kernel_hwtstamp_config *cfg,
|
||||
struct netlink_ext_ack *extack)
|
||||
@@ -1612,6 +1624,7 @@ int vsc8584_ptp_probe(struct phy_device *phydev)
|
||||
vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp;
|
||||
vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp;
|
||||
vsc8531->mii_ts.hwtstamp_set = vsc85xx_hwtstamp_set;
|
||||
vsc8531->mii_ts.hwtstamp_get = vsc85xx_hwtstamp_get;
|
||||
vsc8531->mii_ts.ts_info = vsc85xx_ts_info;
|
||||
phydev->mii_ts = &vsc8531->mii_ts;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user