From nobody Sat Feb 25 06:26:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PNxbY0Tn6z3vT8f; Sat, 25 Feb 2023 06:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PNxbX7497z3sg2; Sat, 25 Feb 2023 06:26:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677306361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ybN7JjCMBeHwociBFuQSoc3upzeuPpLNEZlcMAa+fg=; b=LFLuQn4ucomghfockQH1YgnAV++5u2hPJhndRKDZp0BBvC7f8dnpgqVW6NQCvHI1Sdj5Al LKhRfIO/5bzsBVxJY+isN98q1+hdaLTscOH1xHb+utrPXp/l/VnM+KDDo799HpMH9LbgGq jNXFsjSzrKip9IVV8f3gF7o/+x1xm/hErOKeBE2YLP6WXIt8KluPgwwW01UkL3u36CiMeW ws6sYbEjqYY3QaX9mdyrH3NuMp1e+NjSCHeKWeDSbeUJ4YF6C1J4JH3Fpl1lH7ZF3gZlHz BJ8kyOYBMQmyEsxgrf+xeFX6FkIDONVVsBimiIakJGoTiZppSTHAt0WKbwsrKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677306361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ybN7JjCMBeHwociBFuQSoc3upzeuPpLNEZlcMAa+fg=; b=tK7c2LtfU7vjaQ6rDcitxz9MHwTZP/8EKuaQJ6C5qTqfe5ee0Ddnlk8dvDtS8tOriyY97g YFRELwGj98mJFMRi0NndUYGfauDyacuMU5OXYA1IK77yPhAPBrLniKNsukLs9cPaZTsXm1 EbTKysVSLkBUIKC6t65s9UD6fiR92rqNQ3N9c06eeLm4yq17XKdSEHh1sfG5w94xrpm6q0 Ibp0wdl46s82Z/wof67jgh0MfwqfALJAZR+ogS8nxAmPBD9RdpRw4hJ00D0SrH9FmVtGj8 LA5tdAgIb4ytAwTIWFBUbycXkVGxETN8kIpsiBpqe4PxvD9Vkktc/LYcH3kwdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677306361; a=rsa-sha256; cv=none; b=nsD9M7DxXo838zxl3g1vJnD9WlGmvOfdBQJ7fl4h+/E9l7tNEm43oVb4R09VSiEtWwW3ds cPjBOeO6lCz2sBeC6gCvsG35Ym/YSgqVca4OtYIqqY8NfIkPE/uo59D4tl0KTIw8T3+mcy u0S92x1pHYG4pt79uZoYJenrlXnoLURwdbkzOoZs/ox8Xc13C0d1AL5bgX/tRQxcpqgtta Pqe1etSYfyuWVrEa6GV4AwZ1okdtW0bdvhjzwVYIRNhynlfHfgR35JmVQVIi/nmfn5khve /mCT4L5GxaRqf4U4u/dtTvjzDBSjvzOl9H7Al0gEMspBOmr882XhxJ7vL7R27w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PNxbX67C9zv2y; Sat, 25 Feb 2023 06:26:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31P6Q0JF011041; Sat, 25 Feb 2023 06:26:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31P6Q00o011040; Sat, 25 Feb 2023 06:26:00 GMT (envelope-from git) Date: Sat, 25 Feb 2023 06:26:00 GMT Message-Id: <202302250626.31P6Q00o011040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c51978f4b2f0 - main - kbd: add KBD_DELAY1 and KBD_DELAY2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c51978f4b2f080c80ddc891c24b151d35acb8ba4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c51978f4b2f080c80ddc891c24b151d35acb8ba4 commit c51978f4b2f080c80ddc891c24b151d35acb8ba4 Author: Michael Paepcke AuthorDate: 2023-02-18 09:11:37 +0000 Commit: Warner Losh CommitDate: 2023-02-25 06:19:05 +0000 kbd: add KBD_DELAY1 and KBD_DELAY2 Allow to configure KBD_DELAY* via KERNCONF for user-land less embedded and security appliances Reviewed by: imp (folded) Pull Request: https://github.com/freebsd/freebsd-src/pull/649 --- sys/conf/options | 3 ++- sys/dev/kbd/kbd.c | 4 ++-- sys/dev/kbd/kbdreg.h | 8 ++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/conf/options b/sys/conf/options index 7855a2f3f20e..42529a90a54e 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -803,8 +803,9 @@ KBD_INSTALL_CDEV opt_kbd.h KBD_MAXRETRY opt_kbd.h KBD_MAXWAIT opt_kbd.h KBD_RESETDELAY opt_kbd.h +KBD_DELAY1 opt_kbd.h +KBD_DELAY2 opt_kbd.h KBDIO_DEBUG opt_kbd.h - KBDMUX_DFLT_KEYMAP opt_kbdmux.h # options for the Atheros driver diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c index 205d76639e0f..ebc779de4073 100644 --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -143,8 +143,8 @@ kbd_init_struct(keyboard_t *kbd, char *name, int type, int unit, int config, kbd->kb_accentmap = NULL; kbd->kb_fkeytab = NULL; kbd->kb_fkeytab_size = 0; - kbd->kb_delay1 = KB_DELAY1; /* these values are advisory only */ - kbd->kb_delay2 = KB_DELAY2; + kbd->kb_delay1 = KBD_DELAY1; /* these values are advisory only */ + kbd->kb_delay2 = KBD_DELAY2; kbd->kb_count = 0L; bzero(kbd->kb_lastact, sizeof(kbd->kb_lastact)); } diff --git a/sys/dev/kbd/kbdreg.h b/sys/dev/kbd/kbdreg.h index 15b7e5183f35..2839e259420d 100644 --- a/sys/dev/kbd/kbdreg.h +++ b/sys/dev/kbd/kbdreg.h @@ -151,8 +151,12 @@ struct keyboard { void *kb_data; /* the driver's private data */ int kb_delay1; int kb_delay2; -#define KB_DELAY1 500 -#define KB_DELAY2 100 +#ifndef KBD_DELAY1 +#define KBD_DELAY1 500 +#endif +#ifndef KBD_DELAY2 +#define KBD_DELAY2 100 +#endif unsigned long kb_count; /* # of processed key strokes */ u_char kb_lastact[NUM_KEYS/2]; struct cdev *kb_dev;