Message ID | 20220504224356.1128644-2-jonathan.lemon@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Broadcom PTP PHY support | expand |
On 5/4/22 15:43, Jonathan Lemon wrote: > Add the public bcm_ptp_probe() and bcm_ptp_config_init() functions > to the bcm-phy library. The PTP functions are contained in a separate > file for clarity, and also to simplify the PTP clock dependencies. > > Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> This could really be squashed into the next patch since you do not introduce the ability to build that code until patch #3. I would also re-order patches #2 and #3 thus making it ultimately a 2 patch series only.
On Fri, May 06, 2022 at 10:17:29AM -0700, Florian Fainelli wrote: > On 5/4/22 15:43, Jonathan Lemon wrote: > > Add the public bcm_ptp_probe() and bcm_ptp_config_init() functions > > to the bcm-phy library. The PTP functions are contained in a separate > > file for clarity, and also to simplify the PTP clock dependencies. > > > > Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> > > This could really be squashed into the next patch since you do not introduce > the ability to build that code until patch #3. > > I would also re-order patches #2 and #3 thus making it ultimately a 2 patch > series only. Okay, squash #1 and #2 into one patch, then swap ordering so the main patch comes first. Will repost in a bit.
diff --git a/drivers/net/phy/bcm-phy-lib.h b/drivers/net/phy/bcm-phy-lib.h index c3842f87c33b..c2cc3c2766a1 100644 --- a/drivers/net/phy/bcm-phy-lib.h +++ b/drivers/net/phy/bcm-phy-lib.h @@ -87,4 +87,18 @@ 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); +#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) +{ +} +#endif + #endif /* _LINUX_BCM_PHY_LIB_H */
Add the public bcm_ptp_probe() and bcm_ptp_config_init() functions to the bcm-phy library. The PTP functions are contained in a separate file for clarity, and also to simplify the PTP clock dependencies. Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> --- drivers/net/phy/bcm-phy-lib.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)