dwc3-pci.c (14a4467a0a5eacb2ebbe3aab1b4e25af3519c76a) dwc3-pci.c (3004cfd6204927c1294060b849029cf0c2651074)
1// SPDX-License-Identifier: GPL-2.0
2/**
3 * dwc3-pci.c - PCI Specific glue layer
4 *
5 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
6 *
7 * Authors: Felipe Balbi <balbi@ti.com>,
8 * Sebastian Andrzej Siewior <bigeasy@linutronix.de>

--- 156 unchanged lines hidden (view full) ---

165 */
166 gpiod_add_lookup_table(&platform_bytcr_gpios);
167
168 /*
169 * These GPIOs will turn on the USB2 PHY. Note that we have to
170 * put the gpio descriptors again here because the phy driver
171 * might want to grab them, too.
172 */
1// SPDX-License-Identifier: GPL-2.0
2/**
3 * dwc3-pci.c - PCI Specific glue layer
4 *
5 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
6 *
7 * Authors: Felipe Balbi <balbi@ti.com>,
8 * Sebastian Andrzej Siewior <bigeasy@linutronix.de>

--- 156 unchanged lines hidden (view full) ---

165 */
166 gpiod_add_lookup_table(&platform_bytcr_gpios);
167
168 /*
169 * These GPIOs will turn on the USB2 PHY. Note that we have to
170 * put the gpio descriptors again here because the phy driver
171 * might want to grab them, too.
172 */
173 gpio = devm_gpiod_get_optional(&pdev->dev, "cs",
174 GPIOD_OUT_LOW);
173 gpio = gpiod_get_optional(&pdev->dev, "cs", GPIOD_OUT_LOW);
175 if (IS_ERR(gpio))
176 return PTR_ERR(gpio);
177
178 gpiod_set_value_cansleep(gpio, 1);
174 if (IS_ERR(gpio))
175 return PTR_ERR(gpio);
176
177 gpiod_set_value_cansleep(gpio, 1);
178 gpiod_put(gpio);
179
179
180 gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
181 GPIOD_OUT_LOW);
180 gpio = gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
182 if (IS_ERR(gpio))
183 return PTR_ERR(gpio);
184
185 if (gpio) {
186 gpiod_set_value_cansleep(gpio, 1);
181 if (IS_ERR(gpio))
182 return PTR_ERR(gpio);
183
184 if (gpio) {
185 gpiod_set_value_cansleep(gpio, 1);
186 gpiod_put(gpio);
187 usleep_range(10000, 11000);
188 }
189 }
190 }
191
192 return 0;
193}
194

--- 238 unchanged lines hidden ---
187 usleep_range(10000, 11000);
188 }
189 }
190 }
191
192 return 0;
193}
194

--- 238 unchanged lines hidden ---