Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46675
b: refs/heads/master
c: 66e56ce
h: refs/heads/master
i:
  46673: 1aae6cb
  46671: e8a1635
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent a8fb40c commit 673ccdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 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: 57e06c11372eccf5acebdd4664eb025fee76c561
refs/heads/master: 66e56ce75e39210415fb12ceacd5f3580ad72d50
19 changes: 11 additions & 8 deletions trunk/drivers/usb/gadget/at91_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,25 +1807,28 @@ static int at91udc_suspend(struct platform_device *pdev, pm_message_t mesg)
|| !wake
|| at91_suspend_entering_slow_clock()) {
pullup(udc, 0);
disable_irq_wake(udc->udp_irq);
wake = 0;
} else
enable_irq_wake(udc->udp_irq);

if (udc->board.vbus_pin > 0) {
if (wake)
enable_irq_wake(udc->board.vbus_pin);
else
disable_irq_wake(udc->board.vbus_pin);
}
udc->active_suspend = wake;
if (udc->board.vbus_pin > 0 && wake)
enable_irq_wake(udc->board.vbus_pin);
return 0;
}

static int at91udc_resume(struct platform_device *pdev)
{
struct at91_udc *udc = platform_get_drvdata(pdev);

if (udc->board.vbus_pin > 0 && udc->active_suspend)
disable_irq_wake(udc->board.vbus_pin);

/* maybe reconnect to host; if so, clocks on */
pullup(udc, 1);
if (udc->active_suspend)
disable_irq_wake(udc->udp_irq);
else
pullup(udc, 1);
return 0;
}
#else
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/gadget/at91_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ struct at91_udc {
unsigned wait_for_addr_ack:1;
unsigned wait_for_config_ack:1;
unsigned selfpowered:1;
unsigned active_suspend:1;
u8 addr;
struct at91_udc_data board;
struct clk *iclk, *fclk;
Expand Down

0 comments on commit 673ccdc

Please sign in to comment.