[parisc-linux-cvs] kernel 2.6.0-test2-pa4: HIL PgUp/Down & auto-repeat

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


--Boundary-00=_c62K/B7Eb8RhBLg
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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


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

Index: linux-2.5/Makefile
===================================================================
RCS file: /var/cvs/linux-2.5/Makefile,v
retrieving revision 1.142
diff -u -p -r1.142 Makefile
--- linux-2.5/Makefile	1 Aug 2003 23:24:27 -0000	1.142
+++ linux-2.5/Makefile	2 Aug 2003 07:52:35 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 0
-EXTRAVERSION = -test2-pa3
+EXTRAVERSION = -test2-pa4
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
Index: linux-2.5/drivers/input/keyboard/hil_kbd.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/input/keyboard/hil_kbd.c,v
retrieving revision 1.6
diff -u -p -r1.6 hil_kbd.c
--- linux-2.5/drivers/input/keyboard/hil_kbd.c	21 Jun 2003 01:07:15 -0000	1.6
+++ linux-2.5/drivers/input/keyboard/hil_kbd.c	2 Aug 2003 07:52:36 -0000
@@ -81,9 +81,9 @@ static unsigned int hil_kbd_set1[KBD_TBL
    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_SELECT,	KEY_RESERVED,	KEY_NEXT,
+   KEY_RESERVED,	KEY_SELECT,	KEY_RESERVED,	KEY_PAGEDOWN,
    KEY_N,		KEY_SPACE,	KEY_NEXT,	KEY_RESERVED,
    KEY_LEFT,		KEY_DOWN,	KEY_UP,		KEY_RIGHT
 };
@@ -379,13 +379,15 @@ static void hil_kbd_connect(struct serio
 	}
 
 
-	kbd->dev.evbit[0]	= BIT(EV_KEY);
+	kbd->dev.evbit[0]	= BIT(EV_KEY) | BIT(EV_REP);
 	kbd->dev.ledbit[0]	= BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
 	kbd->dev.keycodemax	= KBD_TBLSIZE;
 	kbd->dev.keycodesize	= sizeof(hil_kbd_set1[0]);
 	kbd->dev.keycode	= hil_kbd_set1;
 	kbd->dev.name		= strlen(kbd->rnm) ? kbd->rnm : HIL_GENERIC_NAME;
 	kbd->dev.phys		= "hpkbd/input0";	/* XXX */
+	kbd->dev.rep[REP_DELAY]  = HZ/4; /* auto-repeat values */
+	kbd->dev.rep[REP_PERIOD] = HZ/8;
 
 	kbd->dev.id.bustype	= BUS_HIL;
 	kbd->dev.id.vendor	= PCI_VENDOR_ID_HP;
Index: linux-2.5/drivers/input/keyboard/hilkbd.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/input/keyboard/hilkbd.c,v
retrieving revision 1.5
diff -u -p -r1.5 hilkbd.c
--- linux-2.5/drivers/input/keyboard/hilkbd.c	21 Jun 2003 01:07:15 -0000	1.5
+++ linux-2.5/drivers/input/keyboard/hilkbd.c	2 Aug 2003 07:52:36 -0000
@@ -115,9 +115,9 @@ static unsigned int hphilkeyb_keycode[KB
    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_SELECT,	KEY_RESERVED,	KEY_NEXT,
+   KEY_RESERVED,	KEY_SELECT,	KEY_RESERVED,	KEY_PAGEDOWN,
    KEY_N,		KEY_SPACE,	KEY_NEXT,	KEY_RESERVED,
    KEY_LEFT,		KEY_DOWN,	KEY_UP,		KEY_RIGHT
 };
@@ -288,13 +288,15 @@ hil_keyb_init(void)
 		if (hphilkeyb_keycode[i] != KEY_RESERVED)
 			set_bit(hphilkeyb_keycode[i], hil_dev.dev.keybit);
 
-	hil_dev.dev.evbit[0]    = BIT(EV_KEY);
+	hil_dev.dev.evbit[0]    = BIT(EV_KEY) | BIT(EV_REP);
 	hil_dev.dev.ledbit[0]   = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);
 	hil_dev.dev.keycodemax  = KBD_TBLSIZE;
         hil_dev.dev.keycodesize = sizeof(hphilkeyb_keycode[0]);
 	hil_dev.dev.keycode     = hphilkeyb_keycode;
 	hil_dev.dev.name 	= "HIL keyboard";
 	hil_dev.dev.phys 	= "hpkbd/input0";
+	hil_dev.dev.rep[REP_DELAY]  = HZ/4; /* auto-repeat values */
+	hil_dev.dev.rep[REP_PERIOD] = HZ/8;
 
 	hil_dev.dev.id.bustype	= BUS_HIL;
 	hil_dev.dev.id.vendor	= PCI_VENDOR_ID_HP;

--Boundary-00=_c62K/B7Eb8RhBLg--