jcs's openbsd hax
openbsd

dwc2: add suspend/resume support

+21 -1
+5 -1
sys/dev/fdt/dwctwo_fdt.c
··· 50 50 void dwctwo_fdt_deferred(void *); 51 51 52 52 const struct cfattach dwctwo_fdt_ca = { 53 - sizeof(struct dwctwo_fdt_softc), dwctwo_fdt_match, dwctwo_fdt_attach, 53 + sizeof(struct dwctwo_fdt_softc), 54 + dwctwo_fdt_match, 55 + dwctwo_fdt_attach, 56 + NULL, 57 + dwc2_activate 54 58 }; 55 59 56 60 struct cfdriver dwctwo_cd = {
+15
sys/dev/usb/dwc2/dwc2.c
··· 1303 1303 } 1304 1304 1305 1305 int 1306 + dwc2_activate(struct device *self, int act) 1307 + { 1308 + struct dwc2_softc *sc = (struct dwc2_softc *)self; 1309 + 1310 + switch (act) { 1311 + case DVACT_RESUME: 1312 + sc->sc_addr = 0; 1313 + sc->sc_conf = 0; 1314 + break; 1315 + } 1316 + 1317 + return config_activate_children(self, act); 1318 + } 1319 + 1320 + int 1306 1321 dwc2_detach(struct dwc2_softc *sc, int flags) 1307 1322 { 1308 1323 int rv = 0;
+1
sys/dev/usb/dwc2/dwc2var.h
··· 107 107 } dwc2_softc_t; 108 108 109 109 int dwc2_init(struct dwc2_softc *); 110 + int dwc2_activate(struct device *, int); 110 111 int dwc2_intr(void *); 111 112 int dwc2_detach(dwc2_softc_t *, int); 112 113