On Tue, 27 Jan 2015, Peter Chen wrote: > The gadget power property will be used at get_status request. > > Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx> > --- > drivers/usb/chipidea/udc.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c > index 540db0e..45914ba 100644 > --- a/drivers/usb/chipidea/udc.c > +++ b/drivers/usb/chipidea/udc.c > @@ -841,6 +841,7 @@ __acquires(hwep->lock) > if ((setup->bRequestType & USB_RECIP_MASK) == USB_RECIP_DEVICE) { > /* Assume that device is bus powered for now. */ > *(u16 *)req->buf = ci->remote_wakeup << 1; > + *(u16 *)req->buf |= ci->gadget.is_selfpowered << 1; > } else if ((setup->bRequestType & USB_RECIP_MASK) \ When you add this line, don't you want to remove the comment two lines above? Also, you can simplify the code slightly by writing it like this: *(u16 *) req->buf = (ci->remote_wakeup << 1) | ci->gadget.is_selfpowered; Note that is_selfpowered should not be bit-shifted; USB_DEVICE_SELF_POWERED is 0. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html