Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10799
b: refs/heads/master
c: 4e67185
h: refs/heads/master
i:
  10797: f32a2a8
  10795: f2b0aef
  10791: 93843de
  10783: ffc12a2
v: v3
  • Loading branch information
Juha Yrj?l? authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent 231757d commit 65334af
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f37be9b9be3ebc02d2d075d7f53f7802f3e005db
refs/heads/master: 4e67185a7ac3ecb1710e636e2f7e318e99298c7a
4 changes: 4 additions & 0 deletions trunk/drivers/usb/gadget/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1788,8 +1788,12 @@ static void devstate_irq(struct omap_udc *udc, u16 irq_src)
udc->driver->suspend(&udc->gadget);
spin_lock(&udc->lock);
}
if (udc->transceiver)
otg_set_suspend(udc->transceiver, 1);
} else {
VDBG("resume\n");
if (udc->transceiver)
otg_set_suspend(udc->transceiver, 0);
if (udc->gadget.speed == USB_SPEED_FULL
&& udc->driver->resume) {
spin_unlock(&udc->lock);
Expand Down
13 changes: 13 additions & 0 deletions trunk/include/linux/usb_otg.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ struct otg_transceiver {
int (*set_power)(struct otg_transceiver *otg,
unsigned mA);

/* for non-OTG B devices: set transceiver into suspend mode */
int (*set_suspend)(struct otg_transceiver *otg,
int suspend);

/* for B devices only: start session with A-Host */
int (*start_srp)(struct otg_transceiver *otg);

Expand Down Expand Up @@ -107,6 +111,15 @@ otg_set_power(struct otg_transceiver *otg, unsigned mA)
return otg->set_power(otg, mA);
}

static inline int
otg_set_suspend(struct otg_transceiver *otg, int suspend)
{
if (otg->set_suspend != NULL)
return otg->set_suspend(otg, suspend);
else
return 0;
}

static inline int
otg_start_srp(struct otg_transceiver *otg)
{
Expand Down

0 comments on commit 65334af

Please sign in to comment.