The reset_gpio member of the usb_phy_gen_xceiv_platform_data
structure needs the have negative value or phy-generic's
probe will fail unless DT is used. 0 is a valid gpio number.

This fixes an issue where phy-generic fails to probe with
message: "usb_phy_gen_xceiv.0: Error requesting RESET GPIO 0".

Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com>
---
 drivers/usb/dwc3/dwc3-exynos.c | 1 +
 drivers/usb/dwc3/dwc3-pci.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index 8b20c70..28c8ad7 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -50,6 +50,7 @@ static int dwc3_exynos_register_phys(struct dwc3_exynos 
*exynos)
 
        exynos->usb2_phy = pdev;
        pdata.type = USB_PHY_TYPE_USB2;
+       pdata.gpio_reset = -1;
 
        ret = platform_device_add_data(exynos->usb2_phy, &pdata, sizeof(pdata));
        if (ret)
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 665686e..f393c18 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -52,6 +52,7 @@ static int dwc3_pci_register_phys(struct dwc3_pci *glue)
 
        glue->usb2_phy = pdev;
        pdata.type = USB_PHY_TYPE_USB2;
+       pdata.gpio_reset = -1;
 
        ret = platform_device_add_data(glue->usb2_phy, &pdata, sizeof(pdata));
        if (ret)
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to