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
731418bc
Commit
731418bc
authored
Aug 21, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Plain Diff
Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
parents
d17e9bb6
2b227974
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
35 deletions
+36
-35
drivers/input/joystick/Config.help
drivers/input/joystick/Config.help
+2
-2
drivers/input/joystick/Config.in
drivers/input/joystick/Config.in
+1
-1
drivers/input/joystick/amijoy.c
drivers/input/joystick/amijoy.c
+15
-16
drivers/input/keyboard/amikbd.c
drivers/input/keyboard/amikbd.c
+13
-12
drivers/input/mouse/amimouse.c
drivers/input/mouse/amimouse.c
+5
-4
No files found.
drivers/input/joystick/Config.help
View file @
731418bc
...
...
@@ -203,13 +203,13 @@ CONFIG_JOYSTICK_TURBOGRAFX
The module will be called turbografx.o. If you want to compile it
as a module, say M here and read <file:Documentation/modules.txt>.
CONFIG_JOYSTICK_AMI
JOY
CONFIG_JOYSTICK_AMI
GA
Say Y here if you have an Amiga with a digital joystick connected
to it.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called
joy-amiga
.o. If you want to compile it as
The module will be called
amijoy
.o. If you want to compile it as
a module, say M here and read <file:Documentation/modules.txt>.
CONFIG_INPUT_JOYDUMP
...
...
drivers/input/joystick/Config.in
View file @
731418bc
...
...
@@ -28,7 +28,7 @@ dep_tristate ' Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_
dep_tristate ' Multisystem joysticks via TurboGraFX device' CONFIG_JOYSTICK_TURBOGRAFX $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT
if [ "$CONFIG_AMIGA" = "y" ]; then
dep_tristate ' Amiga joysticks' CONFIG_JOYSTICK_AMI
JOY
$CONFIG_INPUT $CONFIG_INPUT_JOYSTICK
dep_tristate ' Amiga joysticks' CONFIG_JOYSTICK_AMI
GA
$CONFIG_INPUT $CONFIG_INPUT_JOYSTICK
fi
dep_tristate ' Gameport data dumper' CONFIG_INPUT_JOYDUMP $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK
drivers/input/joystick/amijoy.c
View file @
731418bc
...
...
@@ -37,6 +37,7 @@
#include <asm/system.h>
#include <asm/amigahw.h>
#include <asm/amigaints.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"Driver for Amiga joysticks"
);
...
...
@@ -78,13 +79,13 @@ static int amijoy_open(struct input_dev *dev)
if
((
*
used
)
++
)
return
0
;
if
(
request_irq
(
IRQ_AMIGA_VERTB
,
amijoy_interrupt
,
0
,
"amijoy"
,
NULL
))
{
if
(
request_irq
(
IRQ_AMIGA_VERTB
,
amijoy_interrupt
,
0
,
"amijoy"
,
amijoy_interrupt
))
{
(
*
used
)
--
;
printk
(
KERN_ERR
"amijoy.c: Can't allocate irq %d
\n
"
,
amijoy_irq
);
printk
(
KERN_ERR
"amijoy.c: Can't allocate irq %d
\n
"
,
IRQ_AMIGA_VERTB
);
return
-
EBUSY
;
}
return
0
;
}
...
...
@@ -99,8 +100,9 @@ static void amijoy_close(struct input_dev *dev)
static
int
__init
amijoy_setup
(
char
*
str
)
{
int
i
;
int
ints
[
4
]
str
=
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
int
ints
[
4
];
str
=
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
2
;
i
++
)
amijoy
[
i
]
=
ints
[
i
+
1
];
return
1
;
}
...
...
@@ -110,9 +112,6 @@ static int __init amijoy_init(void)
{
int
i
,
j
;
init_timer
(
amijoy_timer
);
port
->
timer
.
function
=
amijoy_timer
;
for
(
i
=
0
;
i
<
2
;
i
++
)
if
(
amijoy
[
i
])
{
if
(
!
request_mem_region
(
CUSTOM_PHYSADDR
+
10
+
i
*
2
,
2
,
...
...
@@ -134,12 +133,12 @@ static int __init amijoy_init(void)
amijoy_dev
[
i
].
absmax
[
ABS_X
+
j
]
=
1
;
}
amijoy
->
dev
[
i
].
name
=
amijoy_name
;
amijoy
->
dev
[
i
].
phys
=
amijoy_phys
[
i
];
amijoy
->
dev
[
i
].
id
.
bustype
=
BUS_AMIGA
;
amijoy
->
dev
[
i
].
id
.
vendor
=
0x0001
;
amijoy
->
dev
[
i
].
id
.
product
=
0x0003
;
amijoy
->
dev
[
i
].
id
.
version
=
0x0100
;
amijoy
_
dev
[
i
].
name
=
amijoy_name
;
amijoy
_
dev
[
i
].
phys
=
amijoy_phys
[
i
];
amijoy
_
dev
[
i
].
id
.
bustype
=
BUS_AMIGA
;
amijoy
_
dev
[
i
].
id
.
vendor
=
0x0001
;
amijoy
_
dev
[
i
].
id
.
product
=
0x0003
;
amijoy
_
dev
[
i
].
id
.
version
=
0x0100
;
amijoy_dev
[
i
].
private
=
amijoy_used
+
i
;
...
...
@@ -149,7 +148,7 @@ static int __init amijoy_init(void)
return
0
;
}
static
void
_exit
amijoy_exit
(
void
)
static
void
_
_
exit
amijoy_exit
(
void
)
{
int
i
;
...
...
drivers/input/keyboard/amikbd.c
View file @
731418bc
...
...
@@ -34,6 +34,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/delay.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
...
...
@@ -51,9 +52,9 @@ static unsigned char amikbd_keycode[0x78] = {
57
,
14
,
15
,
96
,
28
,
1
,
111
,
0
,
0
,
0
,
74
,
0
,
103
,
108
,
106
,
105
,
59
,
60
,
61
,
62
,
63
,
64
,
65
,
66
,
67
,
68
,
69
,
70
,
98
,
55
,
78
,
87
,
42
,
54
,
58
,
29
,
56
,
100
}
}
;
static
c
har
*
amikbd_messages
[
]
=
{
static
c
onst
char
*
amikbd_messages
[
8
]
=
{
KERN_ALERT
"amikbd: Ctrl-Amiga-Amiga reset warning!!
\n
"
,
KERN_WARNING
"amikbd: keyboard lost sync
\n
"
,
KERN_WARNING
"amikbd: keyboard buffer overflow
\n
"
,
...
...
@@ -79,19 +80,19 @@ static void amikbd_interrupt(int irq, void *dummy, struct pt_regs *fp)
ciaa
.
cra
&=
~
0x40
;
/* switch CIA serial port to input mode */
down
=
scancode
&
1
;
/* lowest bit is release bit */
scancode
=
scancode
>>
1
;
scancode
>>=
1
;
if
(
scancode
<
0x78
)
{
/* scancodes < 0x78 are keys */
scancode
=
amikbd_keycode
[
scancode
];
if
(
scancode
==
KEY_CAPS
)
{
/* CapsLock is a toggle switch key on Amiga */
if
(
scancode
==
KEY_CAPS
LOCK
)
{
/* CapsLock is a toggle switch key on Amiga */
input_report_key
(
&
amikbd_dev
,
scancode
,
1
);
input_report_key
(
&
amikbd_dev
,
scancode
,
0
);
input_sync
(
&
amikbd_dev
);
return
;
}
input_report_key
(
&
amikbd_dev
,
scancode
,
down
);
input_sync
(
&
amikbd_dev
);
...
...
@@ -106,20 +107,20 @@ static int __init amikbd_init(void)
int
i
;
if
(
!
AMIGAHW_PRESENT
(
AMI_KEYBOARD
))
return
-
EIO
;
return
-
EIO
;
if
(
!
request_mem_region
(
CIAA_PHYSADDR
-
1
+
0xb00
,
0x100
,
"amikeyb"
))
if
(
!
request_mem_region
(
CIAA_PHYSADDR
-
1
+
0xb00
,
0x100
,
"amikeyb"
))
return
-
EBUSY
;
amikbd_dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
amikbd_dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_REP
);
amikbd_dev
.
keycode
=
amikbd_keycode
;
for
(
i
=
0
;
i
<
0x78
;
i
++
)
for
(
i
=
0
;
i
<
0x78
;
i
++
)
if
(
amikbd_keycode
[
i
])
set_bit
(
amikbd_keycode
[
i
],
amikbd_dev
.
keybit
);
ciaa
.
cra
&=
~
0x41
;
/* serial data in, turn off TA */
request_irq
(
IRQ_AMIGA_CIAA_SP
,
amikbd_interrupt
,
0
,
"amikbd"
,
NULL
);
request_irq
(
IRQ_AMIGA_CIAA_SP
,
amikbd_interrupt
,
0
,
"amikbd"
,
amikbd_interrupt
);
amikbd_dev
.
name
=
amikbd_name
;
amikbd_dev
.
phys
=
amikbd_phys
;
...
...
drivers/input/mouse/amimouse.c
View file @
731418bc
...
...
@@ -64,7 +64,7 @@ static void amimouse_interrupt(int irq, void *dummy, struct pt_regs *fp)
input_report_rel
(
&
amimouse_dev
,
REL_X
,
dx
);
input_report_rel
(
&
amimouse_dev
,
REL_Y
,
dy
);
input_report_key
(
&
amimouse_dev
,
BTN_LEFT
,
ciaa
.
pra
&
0x40
);
input_report_key
(
&
amimouse_dev
,
BTN_MIDDLE
,
potgor
&
0x0100
);
input_report_key
(
&
amimouse_dev
,
BTN_RIGHT
,
potgor
&
0x0400
);
...
...
@@ -84,9 +84,9 @@ static int amimouse_open(struct input_dev *dev)
amimouse_lastx
=
joy0dat
&
0xff
;
amimouse_lasty
=
joy0dat
>>
8
;
if
(
request_irq
(
IRQ_AMIGA_VERTB
,
amimouse_interrupt
,
0
,
"amimouse"
,
NULL
))
{
if
(
request_irq
(
IRQ_AMIGA_VERTB
,
amimouse_interrupt
,
0
,
"amimouse"
,
amimouse_interrupt
))
{
amimouse_used
--
;
printk
(
KERN_ERR
"amimouse.c: Can't allocate irq %d
\n
"
,
amimouse_irq
);
printk
(
KERN_ERR
"amimouse.c: Can't allocate irq %d
\n
"
,
IRQ_AMIGA_VERTB
);
return
-
EBUSY
;
}
...
...
@@ -116,10 +116,11 @@ static int __init amimouse_init(void)
amimouse_dev
.
id
.
vendor
=
0x0001
;
amimouse_dev
.
id
.
product
=
0x0002
;
amimouse_dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
amimouse_dev
);
printk
(
KERN_INFO
"input: %s at joy0dat
\n
"
,
amimouse_name
);
return
0
;
}
static
void
__exit
amimouse_exit
(
void
)
...
...
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