summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/uss820dci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/controller/uss820dci.c')
-rw-r--r--sys/dev/usb/controller/uss820dci.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/uss820dci.c b/sys/dev/usb/controller/uss820dci.c
index b98043e..612bc81 100644
--- a/sys/dev/usb/controller/uss820dci.c
+++ b/sys/dev/usb/controller/uss820dci.c
@@ -1513,16 +1513,16 @@ uss820dci_uninit(struct uss820dci_softc *sc)
USB_BUS_UNLOCK(&sc->sc_bus);
}
-void
+static void
uss820dci_suspend(struct uss820dci_softc *sc)
{
- return;
+ /* TODO */
}
-void
+static void
uss820dci_resume(struct uss820dci_softc *sc)
{
- return;
+ /* TODO */
}
static void
@@ -2360,6 +2360,26 @@ uss820dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc
}
}
+static void
+uss820dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state)
+{
+ struct uss820dci_softc *sc = USS820_DCI_BUS2SC(bus);
+
+ switch (state) {
+ case USB_HW_POWER_SUSPEND:
+ uss820dci_suspend(sc);
+ break;
+ case USB_HW_POWER_SHUTDOWN:
+ uss820dci_uninit(sc);
+ break;
+ case USB_HW_POWER_RESUME:
+ uss820dci_resume(sc);
+ break;
+ default:
+ break;
+ }
+}
+
struct usb_bus_methods uss820dci_bus_methods =
{
.endpoint_init = &uss820dci_ep_init,
@@ -2370,4 +2390,5 @@ struct usb_bus_methods uss820dci_bus_methods =
.clear_stall = &uss820dci_clear_stall,
.roothub_exec = &uss820dci_roothub_exec,
.xfer_poll = &uss820dci_do_poll,
+ .set_hw_power_sleep = uss820dci_set_hw_power_sleep,
};
OpenPOWER on IntegriCloud