summaryrefslogtreecommitdiff
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2023-01-24 19:37:21 +0100
committerVinod Koul <vkoul@kernel.org>2023-02-03 10:52:49 +0530
commit59c3d3d00d60b6d75ef3faf3b24e6aac037c1085 (patch)
tree2a316c99a19c573351d388931c0dde846188f80f /Documentation/driver-api
parent1bd9a7b4afd5e0b938868a90b16d514c19808e6c (diff)
downloadlinux-59c3d3d00d60b6d75ef3faf3b24e6aac037c1085.tar.gz
doc: phy: Document devm_of_phy_get()
Add the missing documentation for devm_of_phy_get(), which was forgotten when the function was introduced. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/768d5845668f081620098a0b4479d1481e212bac.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/phy/phy.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/driver-api/phy/phy.rst b/Documentation/driver-api/phy/phy.rst
index 26467dd4f291..6cadc58f4ce0 100644
--- a/Documentation/driver-api/phy/phy.rst
+++ b/Documentation/driver-api/phy/phy.rst
@@ -106,6 +106,8 @@ it. This framework provides the following APIs to get a reference to the PHY.
struct phy *devm_phy_get(struct device *dev, const char *string);
struct phy *devm_phy_optional_get(struct device *dev,
const char *string);
+ struct phy *devm_of_phy_get(struct device *dev, struct device_node *np,
+ const char *con_id);
struct phy *devm_of_phy_get_by_index(struct device *dev,
struct device_node *np,
int index);
@@ -119,10 +121,10 @@ successful PHY get. On driver detach, release function is invoked on
the devres data and devres data is freed.
devm_phy_optional_get should be used when the phy is optional. This
function will never return -ENODEV, but instead returns NULL when
-the phy cannot be found.Some generic drivers, such as ehci, may use multiple
-phys and for such drivers referencing phy(s) by name(s) does not make sense. In
-this case, devm_of_phy_get_by_index can be used to get a phy reference based on
-the index.
+the phy cannot be found.
+Some generic drivers, such as ehci, may use multiple phys. In this case,
+devm_of_phy_get or devm_of_phy_get_by_index can be used to get a phy
+reference based on name or index.
It should be noted that NULL is a valid phy reference. All phy
consumer calls on the NULL phy become NOPs. That is the release calls,