diff options
author | Jonathan Lemon <jonathan.lemon@gmail.com> | 2022-06-22 08:04:52 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-24 06:49:02 +0300 |
commit | 15acf89e1286b91fc46aebf56d9334b33e5ca847 (patch) | |
tree | 950fcba35c31deb5528ca2e0abdd04b8bd6303b1 /drivers/net/phy/bcm-phy-lib.h | |
parent | 0aeaaa8d9769393e9b76efce2bf051ae28d59ee7 (diff) | |
download | linux-15acf89e1286b91fc46aebf56d9334b33e5ca847.tar.xz |
net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib
Add 'struct bcm_ptp_private' to bcm54xx_phy_priv which points to
an optional PTP structure attached to the PHY. This is allocated
on probe if PHY PTP support is configured, and if the driver supports
PTP for the specified PHY.
Add the bcm_ptp_probe(), bcm_ptp_config_init() and bcn_ptp_stop()
API functions to the bcm-phy library.
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/bcm-phy-lib.h')
-rw-r--r-- | drivers/net/phy/bcm-phy-lib.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/phy/bcm-phy-lib.h b/drivers/net/phy/bcm-phy-lib.h index c3842f87c33b..9902fb182099 100644 --- a/drivers/net/phy/bcm-phy-lib.h +++ b/drivers/net/phy/bcm-phy-lib.h @@ -87,4 +87,23 @@ int bcm_phy_cable_test_start_rdb(struct phy_device *phydev); int bcm_phy_cable_test_start(struct phy_device *phydev); int bcm_phy_cable_test_get_status(struct phy_device *phydev, bool *finished); +#if IS_ENABLED(CONFIG_BCM_NET_PHYPTP) +struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev); +void bcm_ptp_config_init(struct phy_device *phydev); +void bcm_ptp_stop(struct bcm_ptp_private *priv); +#else +static inline struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev) +{ + return NULL; +} + +static inline void bcm_ptp_config_init(struct phy_device *phydev) +{ +} + +static inline void bcm_ptp_stop(struct bcm_ptp_private *priv) +{ +} +#endif + #endif /* _LINUX_BCM_PHY_LIB_H */ |