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
84c12b24
Commit
84c12b24
authored
Dec 11, 2005
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: mousedev - make module parameters visible in sysfs
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
3a51f7c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/input/mousedev.c
drivers/input/mousedev.c
+5
-5
No files found.
drivers/input/mousedev.c
View file @
84c12b24
...
@@ -40,15 +40,15 @@ MODULE_LICENSE("GPL");
...
@@ -40,15 +40,15 @@ MODULE_LICENSE("GPL");
#endif
#endif
static
int
xres
=
CONFIG_INPUT_MOUSEDEV_SCREEN_X
;
static
int
xres
=
CONFIG_INPUT_MOUSEDEV_SCREEN_X
;
module_param
(
xres
,
uint
,
0
);
module_param
(
xres
,
uint
,
0
644
);
MODULE_PARM_DESC
(
xres
,
"Horizontal screen resolution"
);
MODULE_PARM_DESC
(
xres
,
"Horizontal screen resolution"
);
static
int
yres
=
CONFIG_INPUT_MOUSEDEV_SCREEN_Y
;
static
int
yres
=
CONFIG_INPUT_MOUSEDEV_SCREEN_Y
;
module_param
(
yres
,
uint
,
0
);
module_param
(
yres
,
uint
,
0
644
);
MODULE_PARM_DESC
(
yres
,
"Vertical screen resolution"
);
MODULE_PARM_DESC
(
yres
,
"Vertical screen resolution"
);
static
unsigned
tap_time
=
200
;
static
unsigned
tap_time
=
200
;
module_param
(
tap_time
,
uint
,
0
);
module_param
(
tap_time
,
uint
,
0
644
);
MODULE_PARM_DESC
(
tap_time
,
"Tap time for touchpads in absolute mode (msecs)"
);
MODULE_PARM_DESC
(
tap_time
,
"Tap time for touchpads in absolute mode (msecs)"
);
struct
mousedev_hw_data
{
struct
mousedev_hw_data
{
...
@@ -155,7 +155,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev,
...
@@ -155,7 +155,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev,
switch
(
code
)
{
switch
(
code
)
{
case
ABS_X
:
case
ABS_X
:
size
=
dev
->
absmax
[
ABS_X
]
-
dev
->
absmin
[
ABS_X
];
size
=
dev
->
absmax
[
ABS_X
]
-
dev
->
absmin
[
ABS_X
];
if
(
size
==
0
)
size
=
xres
;
if
(
size
==
0
)
size
=
xres
?
:
1
;
if
(
value
>
dev
->
absmax
[
ABS_X
])
value
=
dev
->
absmax
[
ABS_X
];
if
(
value
>
dev
->
absmax
[
ABS_X
])
value
=
dev
->
absmax
[
ABS_X
];
if
(
value
<
dev
->
absmin
[
ABS_X
])
value
=
dev
->
absmin
[
ABS_X
];
if
(
value
<
dev
->
absmin
[
ABS_X
])
value
=
dev
->
absmin
[
ABS_X
];
mousedev
->
packet
.
x
=
((
value
-
dev
->
absmin
[
ABS_X
])
*
xres
)
/
size
;
mousedev
->
packet
.
x
=
((
value
-
dev
->
absmin
[
ABS_X
])
*
xres
)
/
size
;
...
@@ -164,7 +164,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev,
...
@@ -164,7 +164,7 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev,
case
ABS_Y
:
case
ABS_Y
:
size
=
dev
->
absmax
[
ABS_Y
]
-
dev
->
absmin
[
ABS_Y
];
size
=
dev
->
absmax
[
ABS_Y
]
-
dev
->
absmin
[
ABS_Y
];
if
(
size
==
0
)
size
=
yres
;
if
(
size
==
0
)
size
=
yres
?
:
1
;
if
(
value
>
dev
->
absmax
[
ABS_Y
])
value
=
dev
->
absmax
[
ABS_Y
];
if
(
value
>
dev
->
absmax
[
ABS_Y
])
value
=
dev
->
absmax
[
ABS_Y
];
if
(
value
<
dev
->
absmin
[
ABS_Y
])
value
=
dev
->
absmin
[
ABS_Y
];
if
(
value
<
dev
->
absmin
[
ABS_Y
])
value
=
dev
->
absmin
[
ABS_Y
];
mousedev
->
packet
.
y
=
yres
-
((
value
-
dev
->
absmin
[
ABS_Y
])
*
yres
)
/
size
;
mousedev
->
packet
.
y
=
yres
-
((
value
-
dev
->
absmin
[
ABS_Y
])
*
yres
)
/
size
;
...
...
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