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
c6a2a035
Commit
c6a2a035
authored
Oct 20, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atkbd.c: Only issue the set LED command during probe when absolutely needed.
parent
16f3374d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
drivers/input/keyboard/atkbd.c
drivers/input/keyboard/atkbd.c
+18
-9
No files found.
drivers/input/keyboard/atkbd.c
View file @
c6a2a035
...
@@ -379,15 +379,6 @@ static int atkbd_probe(struct atkbd *atkbd)
...
@@ -379,15 +379,6 @@ static int atkbd_probe(struct atkbd *atkbd)
if
(
atkbd_command
(
atkbd
,
NULL
,
ATKBD_CMD_RESET_BAT
))
if
(
atkbd_command
(
atkbd
,
NULL
,
ATKBD_CMD_RESET_BAT
))
printk
(
KERN_WARNING
"atkbd.c: keyboard reset failed
\n
"
);
printk
(
KERN_WARNING
"atkbd.c: keyboard reset failed
\n
"
);
/*
* Next we check we can set LEDs on the keyboard. This should work on every
* keyboard out there. It also turns the LEDs off, which we want anyway.
*/
param
[
0
]
=
0
;
if
(
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_SETLEDS
))
return
-
1
;
/*
/*
* Then we check the keyboard ID. We should get 0xab83 under normal conditions.
* Then we check the keyboard ID. We should get 0xab83 under normal conditions.
* Some keyboards report different values, but the first byte is always 0xab or
* Some keyboards report different values, but the first byte is always 0xab or
...
@@ -395,9 +386,19 @@ static int atkbd_probe(struct atkbd *atkbd)
...
@@ -395,9 +386,19 @@ static int atkbd_probe(struct atkbd *atkbd)
*/
*/
if
(
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_GETID
))
{
if
(
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_GETID
))
{
/*
* If the get ID command failed, we check if we can at least set the LEDs on
* the keyboard. This should work on every keyboard out there. It also turns
* the LEDs off, which we want anyway.
*/
param
[
0
]
=
0
;
if
(
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_SETLEDS
))
return
-
1
;
atkbd
->
id
=
0xabba
;
atkbd
->
id
=
0xabba
;
return
0
;
return
0
;
}
}
if
(
param
[
0
]
!=
0xab
&&
param
[
0
]
!=
0xac
)
if
(
param
[
0
]
!=
0xab
&&
param
[
0
]
!=
0xac
)
return
-
1
;
return
-
1
;
atkbd
->
id
=
param
[
0
]
<<
8
;
atkbd
->
id
=
param
[
0
]
<<
8
;
...
@@ -405,6 +406,14 @@ static int atkbd_probe(struct atkbd *atkbd)
...
@@ -405,6 +406,14 @@ static int atkbd_probe(struct atkbd *atkbd)
return
-
1
;
return
-
1
;
atkbd
->
id
|=
param
[
0
];
atkbd
->
id
|=
param
[
0
];
/*
* Set the LEDs to a defined state.
*/
param
[
0
]
=
0
;
if
(
atkbd_command
(
atkbd
,
param
,
ATKBD_CMD_SETLEDS
))
return
-
1
;
/*
/*
* Disable autorepeat. We don't need it, as we do it in software anyway,
* Disable autorepeat. We don't need it, as we do it in software anyway,
* because that way can get faster repeat, and have less system load (less
* because that way can get faster repeat, and have less system load (less
...
...
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