linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: [PATCH] phy: core: document calibrate() method
Date: Fri, 19 Jul 2019 11:52:45 +0200	[thread overview]
Message-ID: <20190719095245.17401-1-m.szyprowski@samsung.com> (raw)
In-Reply-To: CGME20190719095254eucas1p29c9e6c7aac20cf89b589fd2f2036c485@eucas1p2.samsung.com

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>
---
 include/linux/phy/phy.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 15032f145063..46775e8b0ed9 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -101,6 +101,18 @@ struct phy_ops {
 	int	(*validate)(struct phy *phy, enum phy_mode mode, int submode,
 			    union phy_configure_opts *opts);
 	int	(*reset)(struct phy *phy);
+
+	/**
+	 * @calibrate:
+	 *
+	 * Optional.
+	 *
+	 * Used to calibrate phy, typically by adjusting some parameters
+	 * in runtime, which are otherwise lost after host controller
+	 * reset and cannot be set in phy_init() and phy_power_on().
+	 *
+	 * Returns: 0 if successful, an negative error code otherwise
+	 */
 	int	(*calibrate)(struct phy *phy);
 	void	(*release)(struct phy *phy);
 	struct module *owner;
-- 
2.17.1


       reply	other threads:[~2019-07-19  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190719095254eucas1p29c9e6c7aac20cf89b589fd2f2036c485@eucas1p2.samsung.com>
2019-07-19  9:52 ` Marek Szyprowski [this message]
2019-07-19 10:04   ` [PATCH] phy: core: document calibrate() method Kishon Vijay Abraham I
2019-07-19 12:21     ` Marek Szyprowski
2019-07-19 12:25       ` Kishon Vijay Abraham I
2019-07-22 16:50         ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190719095245.17401-1-m.szyprowski@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).