Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d9fbd888
Commit
d9fbd888
authored
Jan 18, 2004
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Plain Diff
Merge twilight:bk/input into ucw.cz:/home/vojtech/bk/input
parents
2874b013
53f5dc3f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
9 deletions
+136
-9
drivers/input/keyboard/atkbd.c
drivers/input/keyboard/atkbd.c
+17
-5
drivers/input/keyboard/hpps2atkbd.h
drivers/input/keyboard/hpps2atkbd.h
+105
-0
drivers/input/mouse/psmouse-base.c
drivers/input/mouse/psmouse-base.c
+11
-3
drivers/usb/input/hid.h
drivers/usb/input/hid.h
+1
-0
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+1
-0
include/linux/input.h
include/linux/input.h
+1
-1
No files found.
drivers/input/keyboard/atkbd.c
View file @
d9fbd888
...
...
@@ -35,7 +35,7 @@ MODULE_PARM(atkbd_softrepeat, "1i");
MODULE_LICENSE
(
"GPL"
);
static
int
atkbd_set
=
2
;
#if defined(__i386__) || defined
(__x86_64
__)
#if defined(__i386__) || defined
(__x86_64__) || defined(__hppa
__)
static
int
atkbd_reset
;
#else
static
int
atkbd_reset
=
1
;
...
...
@@ -47,6 +47,10 @@ static int atkbd_softrepeat;
* are loadable via an userland utility.
*/
#if defined(__hppa__)
#include "hpps2atkbd.h"
#else
static
unsigned
char
atkbd_set2_keycode
[
512
]
=
{
0
,
67
,
65
,
63
,
61
,
59
,
60
,
88
,
0
,
68
,
66
,
64
,
62
,
15
,
41
,
117
,
...
...
@@ -70,6 +74,8 @@ static unsigned char atkbd_set2_keycode[512] = {
0
,
0
,
0
,
65
,
99
,
};
#endif
static
unsigned
char
atkbd_set3_keycode
[
512
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
59
,
1
,
138
,
128
,
129
,
130
,
15
,
41
,
60
,
...
...
@@ -333,6 +339,10 @@ static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
if
(
command
==
ATKBD_CMD_RESET_BAT
)
timeout
=
2000000
;
/* 2 sec */
if
(
receive
&&
param
)
for
(
i
=
0
;
i
<
receive
;
i
++
)
atkbd
->
cmdbuf
[(
receive
-
1
)
-
i
]
=
param
[
i
];
if
(
command
&
0xff
)
if
(
atkbd_sendbyte
(
atkbd
,
command
&
0xff
))
...
...
@@ -385,7 +395,7 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int co
133
,
149
,
167
,
182
,
200
,
217
,
232
,
250
,
270
,
303
,
333
,
370
,
400
,
435
,
470
,
500
};
const
short
delay
[
4
]
=
{
250
,
500
,
750
,
1000
};
char
param
[
2
];
unsigned
char
param
[
2
];
int
i
,
j
;
if
(
!
atkbd
->
write
)
...
...
@@ -395,9 +405,9 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int co
case
EV_LED
:
*
param
=
(
test_bit
(
LED_SCROLLL
,
dev
->
led
)
?
1
:
0
)
|
(
test_bit
(
LED_NUML
,
dev
->
led
)
?
2
:
0
)
|
(
test_bit
(
LED_CAPSL
,
dev
->
led
)
?
4
:
0
);
param
[
0
]
=
(
test_bit
(
LED_SCROLLL
,
dev
->
led
)
?
1
:
0
)
|
(
test_bit
(
LED_NUML
,
dev
->
led
)
?
2
:
0
)
|
(
test_bit
(
LED_CAPSL
,
dev
->
led
)
?
4
:
0
);
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_SETLEDS
);
if
(
atkbd
->
set
==
4
)
{
...
...
@@ -456,6 +466,7 @@ static int atkbd_probe(struct atkbd *atkbd)
* should make sure we don't try to set the LEDs on it.
*/
param
[
0
]
=
param
[
1
]
=
0xa5
;
/* initialize with invalid values */
if
(
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_GETID
))
{
/*
...
...
@@ -662,6 +673,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
if
(
atkbd_probe
(
atkbd
))
{
serio_close
(
serio
);
serio
->
private
=
NULL
;
kfree
(
atkbd
);
return
;
}
...
...
drivers/input/keyboard/hpps2atkbd.h
0 → 100644
View file @
d9fbd888
/*
* drivers/input/keyboard/hpps2atkbd.h
*
* Copyright (c) 2004 Helge Deller <deller@gmx.de>
* Copyright (c) 2002 Laurent Canet <canetl@esiee.fr>
* Copyright (c) 2002 Thibaut Varene <varenet@esiee.fr>
*
* based on linux-2.4's hp_mouse.c & hp_keyb.c
* Copyright (c) 1999 Alex deVries <adevries@thepuffingroup.com>
* Copyright (c) 1999-2000 Philipp Rumpf <prumpf@tux.org>
* Copyright (c) 2000 Xavier Debacker <debackex@esiee.fr>
* Copyright (c) 2000-2001 Thomas Marteau <marteaut@esiee.fr>
*
* HP PS/2 AT-compatible Keyboard, found in PA/RISC Workstations
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#define KBD_UNKNOWN 0
/* Raw SET 2 scancode table */
#if 0
/* conflicting keys between a RDI Precisionbook keyboard and a normal HP keyboard */
keytable[0x07] = KEY_F1; /* KEY_F12 */
keytable[0x11] = KEY_LEFTCTRL; /* KEY_LEFTALT */
keytable[0x14] = KEY_CAPSLOCK; /* KEY_LEFTCTRL */
keytable[0x61] = KEY_LEFT; /* KEY_102ND */
#endif
static
unsigned
char
atkbd_set2_keycode
[
512
]
=
{
/* 00 */
KBD_UNKNOWN
,
KEY_F9
,
KBD_UNKNOWN
,
KEY_F5
,
KEY_F3
,
KEY_F1
,
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*psmouse, unsigned char *param, int command)
if
(
command
==
PSMOUSE_CMD_RESET_BAT
)
timeout
=
4000000
;
/* 4 sec */
/* initialize cmdbuf with preset values from param */
if
(
receive
)
for
(
i
=
0
;
i
<
receive
;
i
++
)
psmouse
->
cmdbuf
[(
receive
-
1
)
-
i
]
=
param
[
i
];
if
(
command
&
0xff
)
if
(
psmouse_sendbyte
(
psmouse
,
command
&
0xff
))
return
(
psmouse
->
cmdcnt
=
0
)
-
1
;
...
...
@@ -245,8 +250,9 @@ int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command)
while
(
psmouse
->
cmdcnt
&&
timeout
--
)
{
if
(
psmouse
->
cmdcnt
==
1
&&
command
==
PSMOUSE_CMD_RESET_BAT
)
timeout
=
100000
;
if
(
psmouse
->
cmdcnt
==
1
&&
command
==
PSMOUSE_CMD_RESET_BAT
&&
timeout
>
100000
)
/* do not run in a endless loop */
timeout
=
100000
;
/* 1 sec */
if
(
psmouse
->
cmdcnt
==
1
&&
command
==
PSMOUSE_CMD_GETID
&&
psmouse
->
cmdbuf
[
1
]
!=
0xab
&&
psmouse
->
cmdbuf
[
1
]
!=
0xac
)
{
...
...
@@ -414,7 +420,7 @@ static int psmouse_probe(struct psmouse *psmouse)
* in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer.
*/
param
[
0
]
=
param
[
1
]
=
0xa5
;
param
[
0
]
=
0xa5
;
if
(
psmouse_command
(
psmouse
,
param
,
PSMOUSE_CMD_GETID
))
return
-
1
;
...
...
@@ -578,12 +584,14 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
serio
->
private
=
psmouse
;
if
(
serio_open
(
serio
,
dev
))
{
kfree
(
psmouse
);
serio
->
private
=
NULL
;
return
;
}
if
(
psmouse_probe
(
psmouse
)
<=
0
)
{
serio_close
(
serio
);
kfree
(
psmouse
);
serio
->
private
=
NULL
;
return
;
}
...
...
drivers/usb/input/hid.h
View file @
d9fbd888
...
...
@@ -448,6 +448,7 @@ int hid_set_field(struct hid_field *, unsigned, __s32);
void
hid_submit_report
(
struct
hid_device
*
,
struct
hid_report
*
,
unsigned
char
dir
);
void
hid_init_reports
(
struct
hid_device
*
hid
);
int
hid_find_report_by_usage
(
struct
hid_device
*
hid
,
__u32
wanted_usage
,
struct
hid_report
**
report
,
int
type
);
int
hid_wait_io
(
struct
hid_device
*
hid
);
#ifdef CONFIG_HID_FF
...
...
drivers/usb/input/hiddev.c
View file @
d9fbd888
...
...
@@ -509,6 +509,7 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
return
-
EINVAL
;
hid_submit_report
(
hid
,
report
,
USB_DIR_IN
);
hid_wait_io
(
hid
);
return
0
;
...
...
include/linux/input.h
View file @
d9fbd888
...
...
@@ -194,7 +194,7 @@ struct input_absinfo {
#define KEY_102ND 86
#define KEY_F11 87
#define KEY_F12 88
#define KEY_RO
MAJI
89
#define KEY_RO
89
#define KEY_KATAKANA 90
#define KEY_HIRAGANA 91
#define KEY_HENKAN 92
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment