[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cd01e79-fdc0-3bd4-32b5-a85142533f8a@pengutronix.de>
Date: Mon, 21 Dec 2020 00:06:39 +0100
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>,
Minas Harutyunyan <hminas@...opsys.com>,
linux-usb@...r.kernel.org
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
linux-usb@...r.kernel.org, Jules Maselbas <jmaselbas@...ray.eu>
Subject: Correct ordering of phy_init and phy_power_on
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 |
Powered by blists - more mailing lists