[parisc-linux-cvs] kernel 2.4.21-pa8: HIL PgUp/Down & auto-repeat

Helge Deller deller@gmx.de
Sat, 2 Aug 2003 09:45:47 +0200


--Boundary-00=_rw2K/VMVtdp9L+G
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Saturday 02 August 2003 09:42, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux
> Changes by:	deller	03/08/02 01:42:52
>
> Modified files:
> 	drivers/hil    : hil_kbd.c hilkbd.c
>
> Log message:
> kernel 2.4.21-pa8:
> - fix PageUp/PageDown keycodes on HIL keyboards
> - enable key auto-repeat with input layer (the input layer is really cool!)


--Boundary-00=_rw2K/VMVtdp9L+G
Content-Type: text/plain;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="diff"

Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.405
diff -u -p -r1.405 Makefile
--- Makefile	1 Aug 2003 17:39:37 -0000	1.405
+++ Makefile	2 Aug 2003 07:39:36 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 21
-EXTRAVERSION = -pa7
+EXTRAVERSION = -pa8
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: drivers/hil/hil_kbd.c
===================================================================
RCS file: /var/cvs/linux/drivers/hil/hil_kbd.c,v
retrieving revision 1.7
diff -u -p -r1.7 hil_kbd.c
--- drivers/hil/hil_kbd.c	6 Oct 2002 13:22:33 -0000	1.7
+++ drivers/hil/hil_kbd.c	2 Aug 2003 07:39:37 -0000
@@ -84,9 +84,9 @@ static uint8_t hil_kbd_set1[128] = {
    KEY_I,		KEY_O,		KEY_P,		KEY_LEFTBRACE,
    KEY_RIGHTBRACE,	KEY_BACKSLASH,	KEY_INSERT,	KEY_DELETE,
    KEY_J,		KEY_K,		KEY_L,		KEY_SEMICOLON,
-   KEY_APOSTROPHE,	KEY_ENTER,	KEY_HOME,	KEY_SCROLLUP,
+   KEY_APOSTROPHE,	KEY_ENTER,	KEY_HOME,	KEY_PAGEUP,
    KEY_M,		KEY_COMMA,	KEY_DOT,	KEY_SLASH,
-   KEY_RESERVED,	KEY_OPEN/*Select*/,KEY_RESERVED,KEY_SCROLLDOWN/*KPNEXT*/,
+   KEY_RESERVED,	KEY_OPEN/*Select*/,KEY_RESERVED,KEY_PAGEDOWN,
    KEY_N,		KEY_SPACE,	KEY_SCROLLDOWN/*Next*/, KEY_UNKNOWN,
    KEY_LEFT,		KEY_DOWN,	KEY_UP,		KEY_RIGHT
 };
@@ -389,7 +389,9 @@ static void hil_kbd_connect(struct serio
 	kbd->dev.idproduct	= 0x0001; /* TODO: get from kbd->rsc */
 	kbd->dev.idversion	= 0x0100; /* TODO: get from kbd->rsc */
 
-	kbd->dev.evbit[0] |= BIT(EV_KEY);
+	kbd->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_REP);
+	kbd->dev.rep[REP_DELAY]  = HZ/4; /* auto-repeat values */
+	kbd->dev.rep[REP_PERIOD] = HZ/8;
 
 	for (i = 0; i < 128; i++) {
 		set_bit(hil_kbd_set1[i], kbd->dev.keybit);
Index: drivers/hil/hilkbd.c
===================================================================
RCS file: /var/cvs/linux/drivers/hil/hilkbd.c,v
retrieving revision 1.4
diff -u -p -r1.4 hilkbd.c
--- drivers/hil/hilkbd.c	6 Oct 2002 13:22:33 -0000	1.4
+++ drivers/hil/hilkbd.c	2 Aug 2003 07:39:40 -0000
@@ -123,9 +123,9 @@ static unsigned char hil_kbd_set1[128] =
    KEY_I,		KEY_O,		KEY_P,		KEY_LEFTBRACE,
    KEY_RIGHTBRACE,	KEY_BACKSLASH,	KEY_INSERT,	KEY_DELETE,
    KEY_J,		KEY_K,		KEY_L,		KEY_SEMICOLON,
-   KEY_APOSTROPHE,	KEY_ENTER,	KEY_HOME,	KEY_SCROLLUP,
+   KEY_APOSTROPHE,	KEY_ENTER,	KEY_HOME,	KEY_PAGEUP,
    KEY_M,		KEY_COMMA,	KEY_DOT,	KEY_SLASH,
-   KEY_RESERVED,	KEY_OPEN/*Select*/,KEY_RESERVED,KEY_SCROLLDOWN/*KPNEXT*/,
+   KEY_RESERVED,	KEY_OPEN/*Select*/,KEY_RESERVED,KEY_PAGEDOWN,
    KEY_N,		KEY_SPACE,	KEY_SCROLLDOWN/*Next*/, KEY_UNKNOWN,
    KEY_LEFT,		KEY_DOWN,	KEY_UP,		KEY_RIGHT
 };
@@ -298,7 +298,9 @@ hil_keyb_init(void)
 	hil_dev.dev.idproduct	= 0x0001;
 	hil_dev.dev.idversion	= 0x0100;
 
-	hil_dev.dev.evbit[0] |= BIT(EV_KEY);
+	hil_dev.dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_REP);
+	hil_dev.dev.rep[REP_DELAY]  = HZ/4; /* auto-repeat values */
+	hil_dev.dev.rep[REP_PERIOD] = HZ/8;
 	for (i = 0; i < 128; i++)
 		set_bit(hil_kbd_set1[i], hil_dev.dev.keybit);
 	clear_bit(0, hil_dev.dev.keybit);

--Boundary-00=_rw2K/VMVtdp9L+G--