diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-01-28 16:32:32 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-29 10:34:25 -0600 |
commit | 4651fcf3294eaa018c63dfdae0b1fb65e432f727 (patch) | |
tree | 07d430fe19813a4173361575bedb63be0ca49872 /drivers/usb/gadget | |
parent | d60d939221dc16dfc0589f4fbb730aab1aa4daeb (diff) | |
download | linux-4651fcf3294eaa018c63dfdae0b1fb65e432f727.tar.bz2 |
usb: gadget: fsl_udc_core: set value for common is_selfpowered
fsl udc core assumes itself always self powered, so set is_selfpowered
is 1.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/fsl_udc_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index c3830ad68edf..55fcb930f92e 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -1337,7 +1337,7 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value, if ((request_type & USB_RECIP_MASK) == USB_RECIP_DEVICE) { /* Get device status */ - tmp = 1 << USB_DEVICE_SELF_POWERED; + tmp = udc->gadget.is_selfpowered; tmp |= udc->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP; } else if ((request_type & USB_RECIP_MASK) == USB_RECIP_INTERFACE) { /* Get interface status */ @@ -1948,6 +1948,7 @@ static int fsl_udc_start(struct usb_gadget *g, /* hook up the driver */ udc_controller->driver = driver; spin_unlock_irqrestore(&udc_controller->lock, flags); + g->is_selfpowered = 1; if (!IS_ERR_OR_NULL(udc_controller->transceiver)) { /* Suspend the controller until OTG enable it */ |