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
fee8b5b3
Commit
fee8b5b3
authored
Jul 31, 2003
by
Alan Cox
Committed by
Linus Torvalds
Jul 31, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] work around tosh keyboards
These produce double ups sometimes (Chris Heath)
parent
204ba349
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
drivers/input/serio/i8042.c
drivers/input/serio/i8042.c
+8
-0
No files found.
drivers/input/serio/i8042.c
View file @
fee8b5b3
...
...
@@ -59,6 +59,7 @@ static struct serio i8042_aux_port;
static
unsigned
char
i8042_initial_ctr
;
static
unsigned
char
i8042_ctr
;
static
unsigned
char
i8042_last_e0
;
static
unsigned
char
i8042_last_release
;
static
unsigned
char
i8042_mux_open
;
struct
timer_list
i8042_timer
;
...
...
@@ -406,15 +407,22 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if
(
data
>
0x7f
)
{
unsigned
char
index
=
(
data
&
0x7f
)
|
(
i8042_last_e0
<<
7
);
/* work around hardware that doubles key releases */
if
(
index
==
i8042_last_release
)
{
dbg
(
"i8042 skipped double release (%d)
\n
"
,
index
);
continue
;
}
if
(
index
==
0xaa
||
index
==
0xb6
)
set_bit
(
index
,
i8042_unxlate_seen
);
if
(
test_and_clear_bit
(
index
,
i8042_unxlate_seen
))
{
serio_interrupt
(
&
i8042_kbd_port
,
0xf0
,
dfl
,
regs
);
data
=
i8042_unxlate_table
[
data
&
0x7f
];
i8042_last_release
=
index
;
}
}
else
{
set_bit
(
data
|
(
i8042_last_e0
<<
7
),
i8042_unxlate_seen
);
data
=
i8042_unxlate_table
[
data
];
i8042_last_release
=
0
;
}
i8042_last_e0
=
(
data
==
0xe0
);
...
...
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