Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Emit initial lid switch state event...
details: https://anonhg.NetBSD.org/src/rev/31173bec3277
branches: trunk
changeset: 318958:31173bec3277
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu May 10 13:05:18 2018 +0000
description:
Emit initial lid switch state event at startup
diffstat:
sys/dev/fdt/gpiokeys.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 92ca3b141716 -r 31173bec3277 sys/dev/fdt/gpiokeys.c
--- a/sys/dev/fdt/gpiokeys.c Thu May 10 11:06:13 2018 +0000
+++ b/sys/dev/fdt/gpiokeys.c Thu May 10 13:05:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiokeys.c,v 1.7 2018/04/28 11:49:06 jmcneill Exp $ */
+/* $NetBSD: gpiokeys.c,v 1.8 2018/05/10 13:05:18 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpiokeys.c,v 1.7 2018/04/28 11:49:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpiokeys.c,v 1.8 2018/05/10 13:05:18 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -84,7 +84,7 @@
u_int key_code;
struct sysmon_pswitch key_pswitch;
uint8_t key_usbcode;
- u_int key_state;
+ int key_state;
struct gpiokeys_key *key_next;
};
@@ -219,6 +219,7 @@
key->key_pswitch.smpsw_name = key->key_label;
switch (code) {
case SW_LID:
+ key->key_state = -1; /* Send notification on attach */
key->key_pswitch.smpsw_type = PSWITCH_TYPE_LID;
break;
default:
Home |
Main Index |
Thread Index |
Old Index