The 06/16/2023 16:53, Radu Pirea (NXP OSS) wrote:
+static void nxp_c45_set_rising_or_falling(struct phy_device *phydev,
+ struct ptp_extts_request *extts)
+{
+ /* Some enable request has only the PTP_ENABLE_FEATURE flag set and in
+ * this case external ts should be enabled on rising edge.
+ */
+ if (extts->flags & PTP_RISING_EDGE ||
+ extts->flags == PTP_ENABLE_FEATURE)
+ phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1,
+ VEND1_PTP_CONFIG, EXT_TRG_EDGE);
With this patch, are you not changing the behaviour for TJA1103?
In the way, before there was not check for extts->flags ==
PTP_ENABLE_FEATURE and now if that is set you configure to trigger on
raising edge. If that is the case, shouldn't be this in a different
patch?
+
+ if (extts->flags & PTP_FALLING_EDGE)
+ phy_set_bits_mmd(phydev, MDIO_MMD_VEND1,
+ VEND1_PTP_CONFIG, EXT_TRG_EDGE);
+}
+
--
/Horatiu