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
nexedi
linux
Commits
0d244d10
Commit
0d244d10
authored
Jul 03, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle input-only keyboard interfaces.
Handle slowly responding keyboards.
parent
e3afe966
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
+25
-13
drivers/input/keyboard/atkbd.c
drivers/input/keyboard/atkbd.c
+25
-13
No files found.
drivers/input/keyboard/atkbd.c
View file @
0d244d10
/*
* $Id: atkbd.c,v 1.3
1 2002/01/27 01:48:5
4 vojtech Exp $
* $Id: atkbd.c,v 1.3
3 2002/02/12 09:34:3
4 vojtech Exp $
*
* Copyright (c) 1999-2001 Vojtech Pavlik
*/
...
...
@@ -31,7 +31,6 @@
#include <linux/init.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/tqueue.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"AT and PS/2 keyboard driver"
);
...
...
@@ -204,7 +203,7 @@ static void atkbd_interrupt(struct serio *serio, unsigned char data, unsigned in
static
int
atkbd_sendbyte
(
struct
atkbd
*
atkbd
,
unsigned
char
byte
)
{
int
timeout
=
1000
;
/* 1
0 msec */
int
timeout
=
1000
0
;
/* 10
0 msec */
atkbd
->
ack
=
0
;
#ifdef ATKBD_DEBUG
...
...
@@ -223,7 +222,7 @@ static int atkbd_sendbyte(struct atkbd *atkbd, unsigned char byte)
static
int
atkbd_command
(
struct
atkbd
*
atkbd
,
unsigned
char
*
param
,
int
command
)
{
int
timeout
=
10000
;
/* 1
00 msec */
int
timeout
=
50000
;
/* 5
00 msec */
int
send
=
(
command
>>
12
)
&
0xf
;
int
receive
=
(
command
>>
8
)
&
0xf
;
int
i
;
...
...
@@ -259,6 +258,9 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int co
struct
atkbd
*
atkbd
=
dev
->
private
;
char
param
[
2
];
if
(
!
atkbd
->
serio
->
write
)
return
-
1
;
switch
(
type
)
{
case
EV_LED
:
...
...
@@ -463,8 +465,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
memset
(
atkbd
,
0
,
sizeof
(
struct
atkbd
));
if
(
serio
->
write
)
{
atkbd
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_LED
)
|
BIT
(
EV_REP
);
atkbd
->
dev
.
ledbit
[
0
]
=
BIT
(
LED_NUML
)
|
BIT
(
LED_CAPSL
)
|
BIT
(
LED_SCROLLL
);
}
else
atkbd
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
atkbd
->
serio
=
serio
;
...
...
@@ -482,6 +486,8 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
return
;
}
if
(
serio
->
write
)
{
if
(
atkbd_probe
(
atkbd
))
{
serio_close
(
serio
);
kfree
(
atkbd
);
...
...
@@ -490,6 +496,11 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
atkbd
->
set
=
atkbd_set_3
(
atkbd
);
}
else
{
atkbd
->
set
=
2
;
atkbd
->
id
=
0xab00
;
}
if
(
atkbd
->
set
==
4
)
{
atkbd
->
dev
.
ledbit
[
0
]
|=
BIT
(
LED_COMPOSE
)
|
BIT
(
LED_SUSPEND
)
|
BIT
(
LED_SLEEP
)
|
BIT
(
LED_MUTE
);
sprintf
(
atkbd
->
name
,
"AT Set 2 Extended keyboard
\n
"
);
...
...
@@ -518,6 +529,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
printk
(
KERN_INFO
"input: %s on %s
\n
"
,
atkbd
->
name
,
serio
->
phys
);
if
(
serio
->
write
)
atkbd_initialize
(
atkbd
);
}
...
...
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