]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"
authorStephan Gerhold <stephan@gerhold.net>
Thu, 6 Dec 2018 18:42:28 +0000 (19:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:45:53 +0000 (17:45 +0100)
commit685689d4f2c6d11441545cdcf9a8b2f84a141761
treec46a09702ed824a51e00f3a49ca91867f2da73ae
parent95ea323a41b5e8e2259ffcfb51d26add24d1f16f
Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

commit 3004cfd6204927c1294060b849029cf0c2651074 upstream.

Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get
the phy GPIOs") changed the code to claim the PHY GPIOs permanently
for Intel Baytrail devices.

This causes issues when the actual PHY driver attempts to claim the
same GPIO descriptors. For example, tusb1210 now fails to probe with:

  tusb1210: probe of dwc3.0.auto.ulpi failed with error -16 (EBUSY)

dwc3-pci needs to turn on the PHY once before dwc3 is loaded, but
usually the PHY driver will then hold the GPIOs to turn off the
PHY when requested (e.g. during suspend).

To fix the problem, this reverts the commit to restore the old
behavior to put the GPIOs immediately after usage.

Link: https://www.spinics.net/lists/linux-usb/msg174681.html
Cc: stable@vger.kernel.org
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-pci.c