linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Jules Maselbas <jmaselbas@kalray.eu>, linux-usb@vger.kernel.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Minas Harutyunyan <hminas@synopsys.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Amelie DELAUNAY <amelie.delaunay@foss.st.com>,
	Yann Sionneau <ysionneau@kalray.eu>,
	Michael Grzeschik <mgr@pengutronix.de>
Subject: Re: [PATCH 1/2] phy: core: Add documentation of phy operation order
Date: Tue, 22 Mar 2022 12:46:30 -0700	[thread overview]
Message-ID: <ade1902f-f18c-6495-de09-7bbeb8c825b1@infradead.org> (raw)
In-Reply-To: <20220322143011.16580-2-jmaselbas@kalray.eu>

Hi--

On 3/22/22 07:30, Jules Maselbas wrote:
> Add documentation on phy function usage: init function must be
> called before power_on; power_off must be called before exit.
> 
> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
> CC: Ahmad Fatoum <a.fatoum@pengutronix.de>
> CC: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
> ---
>  drivers/phy/phy-core.c | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index 91e28d6ce450..ed10cbb24b08 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -229,6 +229,17 @@ void phy_pm_runtime_forbid(struct phy *phy)
>  }
>  EXPORT_SYMBOL_GPL(phy_pm_runtime_forbid);
>  
> +/**
> + * phy_init - phy internal initialization before phy operation
> + * @phy: the phy returned by phy_get()
> + *
> + * Used to allow phy's driver to perform phy internal initialization,
> + * such as PLL block powering, clock initialization or anything that's
> + * is required by the phy to perform the start of operation.
> + * Must be called before phy_power_on().
> + *
> + * Returns: 0 if successful, an negative error code otherwise

    * Return: %0 if successful, a negative error code otherwise

(in all 4 functions)

> + */
>  int phy_init(struct phy *phy)

-- 
~Randy

  reply	other threads:[~2022-03-22 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 14:30 [PATCH 0/2] Cleanup the call ordering of phy_init and phy_power_on Jules Maselbas
2022-03-22 14:30 ` [PATCH 1/2] phy: core: Add documentation of phy operation order Jules Maselbas
2022-03-22 19:46   ` Randy Dunlap [this message]
2022-03-22 14:30 ` [PATCH 2/2] phy: core: Warn when phy_power_on is called before phy_init Jules Maselbas

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=ade1902f-f18c-6495-de09-7bbeb8c825b1@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=amelie.delaunay@foss.st.com \
    --cc=hminas@synopsys.com \
    --cc=jmaselbas@kalray.eu \
    --cc=kishon@ti.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mgr@pengutronix.de \
    --cc=ysionneau@kalray.eu \
    /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).