History

net: phy: Add a helper to return the index for of the internal delay

Add a helper function that will return the index in the array for the passed in internal delay value. The helper requires the array, size and delay value. The helper will then return the index for the exact match or return the index for the index to the closest smaller value.

Dan Murphy committed 6 years ago

Commit 92252ee1 parent 91500692 files · +103 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/phy.h+4−0
@@ -1443,6 +1443,10 @@ void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx); · 1442 unmodified lines
14431443 bool phy_validate_pause(struct phy_device *phydev,
14441444 struct ethtool_pauseparam *pp);
14451445 void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause);
1446+
1447+s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
1448+ const int *delay_values, int size, bool is_rx);
1449+
14461450 void phy_resolve_pause(unsigned long *local_adv, unsigned long *partner_adv,
14471451 bool *tx_pause, bool *rx_pause);
14481452