From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 151] M68k keyboard
Date: Mon, 22 Mar 2004 11:00:17 +0100 [thread overview]
Message-ID: <200403221000.i2MA0Hgt004133@callisto.of.borg> (raw)
M68k: Add missing definitions for pc_keyb.c, which is used on Mac if the input
core is enabled (from Joshua Thompson, Ray Knight, and David D. Kilzer), and
fix up a resulting conflict with the Q40/Q60 keyboard driver.
--- linux-2.4.26-pre5/include/asm-m68k/keyboard.h 2003-08-26 12:22:41.000000000 +0200
+++ linux-m68k-2.4.26-pre5/include/asm-m68k/keyboard.h 2004-02-09 20:27:38.000000000 +0100
@@ -117,6 +117,11 @@
#define kbd_request_region()
#define kbd_request_irq(handler)
+/* How to access the keyboard macros on this platform. */
+#define kbd_read_input() in_8(KBD_DATA_REG)
+#define kbd_read_status() in_8(KBD_STATUS_REG)
+#define kbd_write_output(val) out_8(KBD_DATA_REG, val)
+#define kbd_write_command(val) out_8(KBD_CNTL_REG, val)
extern unsigned int SYSRQ_KEY;
#endif /* !CONFIG_TEKXP */
--- linux-2.4.26-pre5/drivers/char/q40_keyb.c 2002-09-13 10:16:02.000000000 +0200
+++ linux-m68k-2.4.26-pre5/drivers/char/q40_keyb.c 2004-02-27 10:09:39.000000000 +0100
@@ -400,7 +400,7 @@
#define KBD_NO_DATA (-1) /* No data */
#define KBD_BAD_DATA (-2) /* Parity or other error */
-static int __init kbd_read_input(void)
+static int __init q40kbd_read_input(void)
{
int retval = KBD_NO_DATA;
unsigned char status;
@@ -421,7 +421,7 @@
int maxread = 100; /* Random number */
do {
- if (kbd_read_input() == KBD_NO_DATA)
+ if (q40kbd_read_input() == KBD_NO_DATA)
break;
} while (--maxread);
}
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
reply other threads:[~2004-03-22 10:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200403221000.i2MA0Hgt004133@callisto.of.borg \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®