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
126fb686
Commit
126fb686
authored
Aug 27, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mouse model reporting into psmouse.c.
parent
4213a1d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/input/mouse/psmouse.c
drivers/input/mouse/psmouse.c
+8
-8
No files found.
drivers/input/mouse/psmouse.c
View file @
126fb686
...
@@ -62,6 +62,7 @@ struct psmouse {
...
@@ -62,6 +62,7 @@ struct psmouse {
unsigned
char
cmdcnt
;
unsigned
char
cmdcnt
;
unsigned
char
pktcnt
;
unsigned
char
pktcnt
;
unsigned
char
type
;
unsigned
char
type
;
unsigned
char
model
;
unsigned
long
last
;
unsigned
long
last
;
char
acking
;
char
acking
;
char
ack
;
char
ack
;
...
@@ -312,6 +313,7 @@ static int psmouse_extensions(struct psmouse *psmouse)
...
@@ -312,6 +313,7 @@ static int psmouse_extensions(struct psmouse *psmouse)
param
[
0
]
=
0
;
param
[
0
]
=
0
;
psmouse
->
vendor
=
"Generic"
;
psmouse
->
vendor
=
"Generic"
;
psmouse
->
name
=
"Mouse"
;
psmouse
->
name
=
"Mouse"
;
psmouse
->
model
=
2
;
/*
/*
* Try Genius NetMouse magic init.
* Try Genius NetMouse magic init.
...
@@ -353,11 +355,9 @@ static int psmouse_extensions(struct psmouse *psmouse)
...
@@ -353,11 +355,9 @@ static int psmouse_extensions(struct psmouse *psmouse)
static
int
logitech_wheel
[]
=
{
75
,
76
,
80
,
81
,
83
,
88
,
-
1
};
static
int
logitech_wheel
[]
=
{
75
,
76
,
80
,
81
,
83
,
88
,
-
1
};
static
int
logitech_ps2pp
[]
=
{
12
,
13
,
40
,
41
,
42
,
43
,
50
,
51
,
52
,
53
,
73
,
75
,
static
int
logitech_ps2pp
[]
=
{
12
,
13
,
40
,
41
,
42
,
43
,
50
,
51
,
52
,
53
,
73
,
75
,
76
,
80
,
81
,
83
,
88
,
96
,
97
,
-
1
};
76
,
80
,
81
,
83
,
88
,
96
,
97
,
-
1
};
int
devicetype
=
((
param
[
0
]
>>
4
)
&
0x07
)
|
((
param
[
0
]
<<
3
)
&
0x78
);
psmouse
->
vendor
=
"Logitech"
;
psmouse
->
vendor
=
"Logitech"
;
psmouse
->
name
=
"Mouse"
;
psmouse
->
name
=
"Mouse"
;
psmouse
->
model
=
((
param
[
0
]
>>
4
)
&
0x07
)
|
((
param
[
0
]
<<
3
)
&
0x78
);
if
(
param
[
1
]
<
3
)
if
(
param
[
1
]
<
3
)
clear_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
clear_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
...
@@ -367,21 +367,21 @@ static int psmouse_extensions(struct psmouse *psmouse)
...
@@ -367,21 +367,21 @@ static int psmouse_extensions(struct psmouse *psmouse)
psmouse
->
type
=
PSMOUSE_PS2
;
psmouse
->
type
=
PSMOUSE_PS2
;
for
(
i
=
0
;
logitech_ps2pp
[
i
]
!=
-
1
;
i
++
)
for
(
i
=
0
;
logitech_ps2pp
[
i
]
!=
-
1
;
i
++
)
if
(
logitech_ps2pp
[
i
]
==
devicetype
)
psmouse
->
type
=
PSMOUSE_PS2PP
;
if
(
logitech_ps2pp
[
i
]
==
psmouse
->
model
)
psmouse
->
type
=
PSMOUSE_PS2PP
;
if
(
psmouse
->
type
!=
PSMOUSE_PS2PP
)
return
PSMOUSE_PS2
;
if
(
psmouse
->
type
!=
PSMOUSE_PS2PP
)
return
PSMOUSE_PS2
;
for
(
i
=
0
;
logitech_4btn
[
i
]
!=
-
1
;
i
++
)
for
(
i
=
0
;
logitech_4btn
[
i
]
!=
-
1
;
i
++
)
if
(
logitech_4btn
[
i
]
==
devicetype
)
set_bit
(
BTN_SIDE
,
psmouse
->
dev
.
keybit
);
if
(
logitech_4btn
[
i
]
==
psmouse
->
model
)
set_bit
(
BTN_SIDE
,
psmouse
->
dev
.
keybit
);
for
(
i
=
0
;
logitech_wheel
[
i
]
!=
-
1
;
i
++
)
for
(
i
=
0
;
logitech_wheel
[
i
]
!=
-
1
;
i
++
)
if
(
logitech_wheel
[
i
]
==
devicetype
)
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
if
(
logitech_wheel
[
i
]
==
psmouse
->
model
)
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
/*
/*
* Do Logitech PS2++ / PS2T++ magic init.
* Do Logitech PS2++ / PS2T++ magic init.
*/
*/
if
(
devicetype
==
97
)
{
/* TouchPad 3 */
if
(
psmouse
->
model
==
97
)
{
/* TouchPad 3 */
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
REL_HWHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
REL_HWHEEL
,
psmouse
->
dev
.
relbit
);
...
@@ -603,7 +603,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -603,7 +603,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse
->
dev
.
phys
=
psmouse
->
phys
;
psmouse
->
dev
.
phys
=
psmouse
->
phys
;
psmouse
->
dev
.
id
.
bustype
=
BUS_I8042
;
psmouse
->
dev
.
id
.
bustype
=
BUS_I8042
;
psmouse
->
dev
.
id
.
vendor
=
psmouse
->
type
;
psmouse
->
dev
.
id
.
vendor
=
psmouse
->
type
;
psmouse
->
dev
.
id
.
product
=
0x0002
;
psmouse
->
dev
.
id
.
product
=
psmouse
->
model
;
psmouse
->
dev
.
id
.
version
=
0x0100
;
psmouse
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
psmouse
->
dev
);
input_register_device
(
&
psmouse
->
dev
);
...
...
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