File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2355,18 +2355,19 @@ static int pxa_udc_probe(struct platform_device *pdev)
2355
2355
struct pxa_udc * udc = & memory ;
2356
2356
int retval = 0 , gpio ;
2357
2357
struct pxa2xx_udc_mach_info * mach = dev_get_platdata (& pdev -> dev );
2358
- unsigned long gpio_flags ;
2359
2358
2360
2359
if (mach ) {
2361
- gpio_flags = mach -> gpio_pullup_inverted ? GPIOF_ACTIVE_LOW : 0 ;
2362
2360
gpio = mach -> gpio_pullup ;
2363
2361
if (gpio_is_valid (gpio )) {
2364
2362
retval = devm_gpio_request_one (& pdev -> dev , gpio ,
2365
- gpio_flags ,
2363
+ GPIOF_OUT_INIT_LOW ,
2366
2364
"USB D+ pullup" );
2367
2365
if (retval )
2368
2366
return retval ;
2369
2367
udc -> gpiod = gpio_to_desc (mach -> gpio_pullup );
2368
+
2369
+ if (mach -> gpio_pullup_inverted ^ gpiod_is_active_low (udc -> gpiod ))
2370
+ gpiod_toggle_active_low (udc -> gpiod );
2370
2371
}
2371
2372
udc -> udc_command = mach -> udc_command ;
2372
2373
} else {
You can’t perform that action at this time.
0 commit comments