mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 151] M68k keyboard
@ 2004-03-22 10:00 Geert Uytterhoeven
  0 siblings, 0 replies; only message in thread
From: Geert Uytterhoeven @ 2004-03-22 10:00 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Linux Kernel Development, Geert Uytterhoeven

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-22 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-22 10:00 [PATCH 151] M68k keyboard Geert Uytterhoeven

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®