phy: core: document phy_calibrate()
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 22 Jul 2019 17:32:23 +0000 (19:32 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 23 Aug 2019 04:10:57 +0000 (09:40 +0530)
Commit 36914111e682 ("drivers: phy: add calibrate method") added support
for generic phy_calibrate() method, but it didn't explain in detail when
such method is supposed to be called. Add some more documentation directly
to the phy.h to make it clean that it is intended to be called after every
host controller reset.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-core.c

index e3880c4a15f25c8c3efcb93a299eb8013760cf6f..b04f4fe85ac2d7c83f731602aff84e49b36f5ba8 100644 (file)
@@ -394,6 +394,16 @@ int phy_reset(struct phy *phy)
 }
 EXPORT_SYMBOL_GPL(phy_reset);
 
+/**
+ * phy_calibrate() - Tunes the phy hw parameters for current configuration
+ * @phy: the phy returned by phy_get()
+ *
+ * Used to calibrate phy hardware, typically by adjusting some parameters in
+ * runtime, which are otherwise lost after host controller reset and cannot
+ * be applied in phy_init() or phy_power_on().
+ *
+ * Returns: 0 if successful, an negative error code otherwise
+ */
 int phy_calibrate(struct phy *phy)
 {
        int ret;