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
7f125092
Commit
7f125092
authored
Jul 03, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the gameport drivers to Dave Jones's tree.
parent
f9fc1633
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
drivers/input/gameport/gameport.c
drivers/input/gameport/gameport.c
+24
-4
No files found.
drivers/input/gameport/gameport.c
View file @
7f125092
...
...
@@ -54,16 +54,36 @@ EXPORT_SYMBOL(gameport_cooked_read);
static
struct
gameport
*
gameport_list
;
static
struct
gameport_dev
*
gameport_dev
;
#ifdef __i386__
#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193180/HZ:0))
#define GET_TIME(x) do { x = get_time_pit(); } while (0)
static
unsigned
int
get_time_pit
(
void
)
{
extern
spinlock_t
i8253_lock
;
unsigned
long
flags
;
unsigned
int
count
;
spin_lock_irqsave
(
&
i8253_lock
,
flags
);
outb_p
(
0x00
,
0x43
);
count
=
inb_p
(
0x40
);
count
|=
inb_p
(
0x40
)
<<
8
;
spin_unlock_irqrestore
(
&
i8253_lock
,
flags
);
return
count
;
}
#endif
/*
* gameport_measure_speed() measures the gameport i/o speed.
*/
static
int
gameport_measure_speed
(
struct
gameport
*
gameport
)
{
#if defined(__i386__) || defined(__x86_64__)
#define GET_TIME(x) do { outb(0, 0x43); x = inb(0x40); x |= inb(0x40) << 8; } while (0)
#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193180L/HZ:0))
#ifdef __i386__
unsigned
int
i
,
t
,
t1
,
t2
,
t3
,
tx
;
unsigned
long
flags
;
...
...
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