From 01eacab6e95267fd894d0c1013aa5bf55c320dc8 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 1 Dec 2010 11:32:45 +0100 Subject: usb: add usb_wakeup() + wakeup callback to port ops Add wakeup callback to port ops for remote wakeup handling. Also add a usb_wakeup() function for devices which want trigger a remote wakeup. Signed-off-by: Gerd Hoffmann --- hw/usb.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/usb.c') diff --git a/hw/usb.c b/hw/usb.c index 2eda86a..ba720b4 100644 --- a/hw/usb.c +++ b/hw/usb.c @@ -49,6 +49,13 @@ void usb_attach(USBPort *port, USBDevice *dev) } } +void usb_wakeup(USBDevice *dev) +{ + if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { + dev->port->ops->wakeup(dev); + } +} + /**********************/ /* generic USB device helpers (you are not forced to use them when -- cgit v1.1