diff options
author | yokota <yokota@FreeBSD.org> | 2001-09-23 08:42:06 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 2001-09-23 08:42:06 +0000 |
commit | 28287d86fce9a62fc773c31554342b154fd5af16 (patch) | |
tree | 94f5542a18dfe503cd56fc3fbd8473d83dcdee7d /sys/dev/atkbdc/atkbd_atkbdc.c | |
parent | fb7e435d4ddd00ae0f3381c4f56336c99bf0e1c9 (diff) | |
download | FreeBSD-src-28287d86fce9a62fc773c31554342b154fd5af16.zip FreeBSD-src-28287d86fce9a62fc773c31554342b154fd5af16.tar.gz |
Reinitialize the keyboard after the ACPI resume event.
I am not sure if this is absolutely necessary on all systems. Yet,
there certainly are motherboards and notebook systems which require
this, although there are other systems which just don't. I hope we
shall know when to do this on which systems, as the development of our
ACPI subsystem progresses... (I know we didn't need this for the APM
resume.)
Diffstat (limited to 'sys/dev/atkbdc/atkbd_atkbdc.c')
-rw-r--r-- | sys/dev/atkbdc/atkbd_atkbdc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c index 5300d2f..0e505dad 100644 --- a/sys/dev/atkbdc/atkbd_atkbdc.c +++ b/sys/dev/atkbdc/atkbd_atkbdc.c @@ -148,12 +148,21 @@ atkbdattach(device_t dev) static int atkbdresume(device_t dev) { + atkbd_softc_t *sc; keyboard_t *kbd; + int args[2]; + sc = device_get_softc(dev); kbd = kbd_get_keyboard(kbd_find_keyboard(ATKBD_DRIVER_NAME, device_get_unit(dev))); - if (kbd) + if (kbd) { + kbd->kb_flags &= ~KB_INITIALIZED; + args[0] = device_get_unit(device_get_parent(dev)); + args[1] = rman_get_start(sc->intr); + (*kbdsw[kbd->kb_index]->init)(device_get_unit(dev), &kbd, + args, device_get_flags(dev)); (*kbdsw[kbd->kb_index]->clear_state)(kbd); + } return 0; } |