]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Add a helper to return the index for of the internal delay
authorDan Murphy <dmurphy@ti.com>
Wed, 24 Jun 2020 12:16:02 +0000 (07:16 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:05:21 +0000 (16:05 -0700)
commitafec2ca352bd9fa058c5b42ccd49aa1ff43e4a4e
tree5f45dec84e66a4e15d56c12c7a19567a3c4c2982
parent74bc33152bf32cf1bc6f786d25d5558911072b78
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.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
include/linux/phy.h