Commit 8c273033 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

USB: px2xx_udc bugfix, missing check for gpio_pullup

git commit b2bbb20b added direct
support for PXA GPIO D+ pullup as alternative to the older udc_command
ops method.  This was done by introduction of the pxa2xx_udc_mach_info
member "gpio_pullup" which, if initialized, is now used in (almost)
all places where udc_command used to be called.

This patch fixes two places where checks for availability of D+ pullup
control still only honor udc_command.
Signed-off-by: default avatarUli Luckas <u.luckas@road.de>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 74e8f346
...@@ -967,7 +967,7 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active) ...@@ -967,7 +967,7 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active)
udc = container_of(_gadget, struct pxa2xx_udc, gadget); udc = container_of(_gadget, struct pxa2xx_udc, gadget);
/* not all boards support pullup control */ /* not all boards support pullup control */
if (!udc->mach->udc_command) if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
return -EOPNOTSUPP; return -EOPNOTSUPP;
is_active = (is_active != 0); is_active = (is_active != 0);
...@@ -2309,7 +2309,7 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state) ...@@ -2309,7 +2309,7 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
{ {
struct pxa2xx_udc *udc = platform_get_drvdata(dev); struct pxa2xx_udc *udc = platform_get_drvdata(dev);
if (!udc->mach->udc_command) if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
WARN("USB host won't detect disconnect!\n"); WARN("USB host won't detect disconnect!\n");
pullup(udc, 0); pullup(udc, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment