From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>,
Minas Harutyunyan <hminas@synopsys.com>,
linux-usb@vger.kernel.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
linux-usb@vger.kernel.org, Jules Maselbas <jmaselbas@kalray.eu>
Subject: Correct ordering of phy_init and phy_power_on
Date: Mon, 21 Dec 2020 00:06:39 +0100 [thread overview]
Message-ID: <6cd01e79-fdc0-3bd4-32b5-a85142533f8a@pengutronix.de> (raw)
Hello,
I just noticed that USB controller drivers differ in the order in which they
do phy_init and phy_power_on. For example:
__dwc2_lowlevel_hw_enable():
ret = phy_power_on(hsotg->phy);
if (ret == 0)
ret = phy_init(hsotg->phy);
dwc3_core_init():
ret = dwc3_core_soft_reset(dwc); // internally does phy_init(dwc->usb2_generic_phy);
/* [snip] */
ret = phy_power_on(dwc->usb2_generic_phy);
My initial assumption has been init -> power_on, but at least the phy-stm32-usbphyc
(used with dwc2) is written with the assumption that exit -> power_off (and therefore
power_on -> init). If they are swapped, disabling fails.
So how was it meant to be?
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next reply other threads:[~2020-12-20 23:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 23:06 Ahmad Fatoum [this message]
2020-12-21 3:15 ` Kishon Vijay Abraham I
2020-12-22 9:08 ` Ahmad Fatoum
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=6cd01e79-fdc0-3bd4-32b5-a85142533f8a@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=hminas@synopsys.com \
--cc=jmaselbas@kalray.eu \
--cc=kernel@pengutronix.de \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=vkoul@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
all inboxes | Powered by JetHome®