summaryrefslogtreecommitdiff
path: root/sys/dev/adb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/adb')
-rw-r--r--sys/dev/adb/adb.h4
-rw-r--r--sys/dev/adb/akbd.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/adb/adb.h b/sys/dev/adb/adb.h
index 35d0fb0db56..f05eb1eab8a 100644
--- a/sys/dev/adb/adb.h
+++ b/sys/dev/adb/adb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.h,v 1.5 2011/06/16 10:44:33 mpi Exp $ */
+/* $OpenBSD: adb.h,v 1.6 2022/10/21 22:42:36 gkoehler Exp $ */
/* $NetBSD: adbsys.h,v 1.4 2000/12/19 02:59:24 tsubai Exp $ */
/*-
@@ -139,6 +139,8 @@ typedef struct {
} ADBDataBlock;
int adbprint(void *, const char *);
+void adb_lid_closed_intr(void);
+void adb_power_button_intr(void);
int adb_op_sync(Ptr, short);
int set_adb_info(ADBSetInfoBlock *, int);
diff --git a/sys/dev/adb/akbd.c b/sys/dev/adb/akbd.c
index 801f5b7f09a..e2d89cad418 100644
--- a/sys/dev/adb/akbd.c
+++ b/sys/dev/adb/akbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: akbd.c,v 1.15 2022/04/06 18:59:27 naddy Exp $ */
+/* $OpenBSD: akbd.c,v 1.16 2022/10/21 22:42:36 gkoehler Exp $ */
/* $NetBSD: akbd.c,v 1.17 2005/01/15 16:00:59 chs Exp $ */
/*
@@ -467,13 +467,14 @@ akbd_processevent(struct akbd_softc *sc, adb_event_t *event)
case 2:
/*
* The reset (or power) key sends 0x7f7f on press and
- * 0xffff on release, and we ignore it.
+ * 0xffff on release.
*/
if (event->bytes[0] == event->bytes[1] &&
ADBK_KEYVAL(event->bytes[0]) == ADBK_RESET) {
- if (event->bytes[0] == ADBK_KEYDOWN(ADBK_RESET))
+ if (event->bytes[0] == ADBK_KEYDOWN(ADBK_RESET)) {
SET(sc->sc_caps, CL_DOWN_RESET);
- else {
+ adb_power_button_intr();
+ } else {
if (ISSET(sc->sc_caps, CL_DOWN_RESET))
CLR(sc->sc_caps, CL_DOWN_RESET);
else if (ISSET(sc->sc_caps, CL_DOWN_ADB)) {