|
@@ -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) {
|
|
if ((request_type & USB_RECIP_MASK) == USB_RECIP_DEVICE) {
|
|
|
/* Get device status */
|
|
/* Get device status */
|
|
|
- tmp = 1 << USB_DEVICE_SELF_POWERED;
|
|
|
|
|
|
|
+ tmp = udc->gadget.is_selfpowered;
|
|
|
tmp |= udc->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP;
|
|
tmp |= udc->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP;
|
|
|
} else if ((request_type & USB_RECIP_MASK) == USB_RECIP_INTERFACE) {
|
|
} else if ((request_type & USB_RECIP_MASK) == USB_RECIP_INTERFACE) {
|
|
|
/* Get interface status */
|
|
/* Get interface status */
|
|
@@ -1948,6 +1948,7 @@ static int fsl_udc_start(struct usb_gadget *g,
|
|
|
/* hook up the driver */
|
|
/* hook up the driver */
|
|
|
udc_controller->driver = driver;
|
|
udc_controller->driver = driver;
|
|
|
spin_unlock_irqrestore(&udc_controller->lock, flags);
|
|
spin_unlock_irqrestore(&udc_controller->lock, flags);
|
|
|
|
|
+ g->is_selfpowered = 1;
|
|
|
|
|
|
|
|
if (!IS_ERR_OR_NULL(udc_controller->transceiver)) {
|
|
if (!IS_ERR_OR_NULL(udc_controller->transceiver)) {
|
|
|
/* Suspend the controller until OTG enable it */
|
|
/* Suspend the controller until OTG enable it */
|