Skip to content

Commit 62d2a94

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
USB: gadget: pxa27x_udc: Avoid using GPIOF_ACTIVE_LOW
Avoid using GPIOF_ACTIVE_LOW as it's deprecated and subject to remove. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 1599858 commit 62d2a94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/usb/gadget/udc/pxa27x_udc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,18 +2355,19 @@ static int pxa_udc_probe(struct platform_device *pdev)
23552355
struct pxa_udc *udc = &memory;
23562356
int retval = 0, gpio;
23572357
struct pxa2xx_udc_mach_info *mach = dev_get_platdata(&pdev->dev);
2358-
unsigned long gpio_flags;
23592358

23602359
if (mach) {
2361-
gpio_flags = mach->gpio_pullup_inverted ? GPIOF_ACTIVE_LOW : 0;
23622360
gpio = mach->gpio_pullup;
23632361
if (gpio_is_valid(gpio)) {
23642362
retval = devm_gpio_request_one(&pdev->dev, gpio,
2365-
gpio_flags,
2363+
GPIOF_OUT_INIT_LOW,
23662364
"USB D+ pullup");
23672365
if (retval)
23682366
return retval;
23692367
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);
23702371
}
23712372
udc->udc_command = mach->udc_command;
23722373
} else {

0 commit comments

Comments
 (0)