dwc3-pci.c (cf48305de0c6b556ff6af64e93295cc54c4fe246) | dwc3-pci.c (e6fe66fe08cdf9c5d0eb6a6e209621f74f7ee60b) |
---|---|
1/** 2 * dwc3-pci.c - PCI Specific glue layer 3 * 4 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com 5 * 6 * Authors: Felipe Balbi <balbi@ti.com>, 7 * Sebastian Andrzej Siewior <bigeasy@linutronix.de> 8 * --- 62 unchanged lines hidden (view full) --- 71 PROPERTY_ENTRY_BOOL("snps,dis_u3_susphy_quirk"), 72 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"), 73 { }, 74 }; 75 76 return platform_device_add_properties(dwc3, properties); 77 } 78 | 1/** 2 * dwc3-pci.c - PCI Specific glue layer 3 * 4 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com 5 * 6 * Authors: Felipe Balbi <balbi@ti.com>, 7 * Sebastian Andrzej Siewior <bigeasy@linutronix.de> 8 * --- 62 unchanged lines hidden (view full) --- 71 PROPERTY_ENTRY_BOOL("snps,dis_u3_susphy_quirk"), 72 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"), 73 { }, 74 }; 75 76 return platform_device_add_properties(dwc3, properties); 77 } 78 |
79 if (pdev->vendor == PCI_VENDOR_ID_INTEL && 80 pdev->device == PCI_DEVICE_ID_INTEL_BYT) { 81 struct gpio_desc *gpio; | 79 if (pdev->vendor == PCI_VENDOR_ID_INTEL) { 80 int ret; |
82 | 81 |
83 acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev), 84 acpi_dwc3_byt_gpios); | 82 struct property_entry properties[] = { 83 PROPERTY_ENTRY_STRING("dr-mode", "peripheral"), 84 { } 85 }; |
85 | 86 |
86 /* 87 * These GPIOs will turn on the USB2 PHY. Note that we have to 88 * put the gpio descriptors again here because the phy driver 89 * might want to grab them, too. 90 */ 91 gpio = gpiod_get_optional(&pdev->dev, "cs", GPIOD_OUT_LOW); 92 if (IS_ERR(gpio)) 93 return PTR_ERR(gpio); | 87 ret = platform_device_add_properties(dwc3, properties); 88 if (ret < 0) 89 return ret; |
94 | 90 |
95 gpiod_set_value_cansleep(gpio, 1); 96 gpiod_put(gpio); | 91 if (pdev->device == PCI_DEVICE_ID_INTEL_BYT) { 92 struct gpio_desc *gpio; |
97 | 93 |
98 gpio = gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW); 99 if (IS_ERR(gpio)) 100 return PTR_ERR(gpio); | 94 acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev), 95 acpi_dwc3_byt_gpios); |
101 | 96 |
102 if (gpio) { | 97 /* 98 * These GPIOs will turn on the USB2 PHY. Note that we have to 99 * put the gpio descriptors again here because the phy driver 100 * might want to grab them, too. 101 */ 102 gpio = gpiod_get_optional(&pdev->dev, "cs", GPIOD_OUT_LOW); 103 if (IS_ERR(gpio)) 104 return PTR_ERR(gpio); 105 |
103 gpiod_set_value_cansleep(gpio, 1); 104 gpiod_put(gpio); | 106 gpiod_set_value_cansleep(gpio, 1); 107 gpiod_put(gpio); |
105 usleep_range(10000, 11000); | 108 109 gpio = gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW); 110 if (IS_ERR(gpio)) 111 return PTR_ERR(gpio); 112 113 if (gpio) { 114 gpiod_set_value_cansleep(gpio, 1); 115 gpiod_put(gpio); 116 usleep_range(10000, 11000); 117 } |
106 } 107 } 108 109 if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS && 110 (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 || 111 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI || 112 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) { 113 struct property_entry properties[] = { --- 153 unchanged lines hidden --- | 118 } 119 } 120 121 if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS && 122 (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 || 123 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI || 124 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) { 125 struct property_entry properties[] = { --- 153 unchanged lines hidden --- |