diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-22 14:27:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-22 14:27:47 +0000 |
commit | 58bbd3eb627989a728fc032f9b1bb22025f780b7 (patch) | |
tree | d9332fb1e78af42417943cdcc3f0038def877301 /sys/dev/isa | |
parent | c6b25e4849e930766e9a0ae294485443d41407cc (diff) |
Reset the keyboard controller on resume, and also alert the children
(pckbd and pms) to do their part
started by mlarkin, cleaned up by me
ok miod
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/pckbc_isa.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/isa/pckbc_isa.c b/sys/dev/isa/pckbc_isa.c index 1edd7150d8b..cc4785385e2 100644 --- a/sys/dev/isa/pckbc_isa.c +++ b/sys/dev/isa/pckbc_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_isa.c,v 1.6 2010/07/21 20:10:17 miod Exp $ */ +/* $OpenBSD: pckbc_isa.c,v 1.7 2010/07/22 14:27:46 deraadt Exp $ */ /* $NetBSD: pckbc_isa.c,v 1.2 2000/03/23 07:01:35 thorpej Exp $ */ /* @@ -46,6 +46,7 @@ int pckbc_isa_match(struct device *, void *, void *); void pckbc_isa_attach(struct device *, struct device *, void *); +int pckbc_isa_activate(struct device *, int); struct pckbc_isa_softc { struct pckbc_softc sc_pckbc; @@ -56,6 +57,7 @@ struct pckbc_isa_softc { struct cfattach pckbc_isa_ca = { sizeof(struct pckbc_isa_softc), pckbc_isa_match, pckbc_isa_attach, + NULL, pckbc_isa_activate }; void pckbc_isa_intr_establish(struct pckbc_softc *, pckbc_slot_t); @@ -112,6 +114,23 @@ pckbc_isa_match(parent, match, aux) return (ok); } +int +pckbc_isa_activate(struct device *self, int act) +{ + struct pckbc_isa_softc *isc = (struct pckbc_isa_softc *)self; + + switch (act) { + case DVACT_SUSPEND: + config_activate_children(self, act); + break; + case DVACT_RESUME: + pckbc_reset(&isc->sc_pckbc); + config_activate_children(self, act); + break; + } + return (0); +} + void pckbc_isa_attach(parent, self, aux) struct device *parent, *self; |