Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133479
b: refs/heads/master
c: ee069fb
h: refs/heads/master
i:
  133477: 75e189e
  133475: 2dc0918
  133471: 041b02b
v: v3
  • Loading branch information
Robert Jarzmik authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent dae3d23 commit b1da326
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fec3c25b773883bd50c4078bcccdd23d3dadeac
refs/heads/master: ee069fb1185895e725ad942c7a529f947e25166d
24 changes: 23 additions & 1 deletion trunk/drivers/usb/gadget/pxa27x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,12 +1623,34 @@ static int pxa_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
return 0;
}

/**
* pxa_udc_vbus_draw - Called by gadget driver after SET_CONFIGURATION completed
* @_gadget: usb gadget
* @mA: current drawn
*
* Context: !in_interrupt()
*
* Called after a configuration was chosen by a USB host, to inform how much
* current can be drawn by the device from VBus line.
*
* Returns 0 or -EOPNOTSUPP if no transceiver is handling the udc
*/
static int pxa_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
{
struct pxa_udc *udc;

udc = to_gadget_udc(_gadget);
if (udc->transceiver)
return otg_set_power(udc->transceiver, mA);
return -EOPNOTSUPP;
}

static const struct usb_gadget_ops pxa_udc_ops = {
.get_frame = pxa_udc_get_frame,
.wakeup = pxa_udc_wakeup,
.pullup = pxa_udc_pullup,
.vbus_session = pxa_udc_vbus_session,
/* current versions must always be self-powered */
.vbus_draw = pxa_udc_vbus_draw,
};

/**
Expand Down

0 comments on commit b1da326

Please sign in to comment.