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
a2ea21bb
Commit
a2ea21bb
authored
Jul 25, 2002
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linus.bkbits.net:8080/linux-2.5
into twilight.ucw.cz:/home/vojtech/bk/linus
parents
040a02c8
268c9783
Changes
87
Show whitespace changes
Inline
Side-by-side
Showing
87 changed files
with
970 additions
and
976 deletions
+970
-976
Documentation/input/input.txt
Documentation/input/input.txt
+1
-1
Documentation/input/xpad.txt
Documentation/input/xpad.txt
+59
-27
arch/ppc/4xx_io/Makefile
arch/ppc/4xx_io/Makefile
+0
-1
arch/ppc/4xx_io/stb_kb.c
arch/ppc/4xx_io/stb_kb.c
+0
-289
arch/ppc/8xx_io/uart.c
arch/ppc/8xx_io/uart.c
+0
-16
arch/ppc/amiga/config.c
arch/ppc/amiga/config.c
+0
-18
arch/ppc/config.in
arch/ppc/config.in
+0
-1
arch/ppc/kernel/ppc4xx_setup.c
arch/ppc/kernel/ppc4xx_setup.c
+0
-6
arch/ppc/platforms/apus_setup.c
arch/ppc/platforms/apus_setup.c
+0
-39
arch/ppc/platforms/chrp_setup.c
arch/ppc/platforms/chrp_setup.c
+0
-1
arch/ppc/platforms/pplus_setup.c
arch/ppc/platforms/pplus_setup.c
+0
-1
arch/ppc/platforms/prep_setup.c
arch/ppc/platforms/prep_setup.c
+0
-1
arch/ppc/platforms/redwood.c
arch/ppc/platforms/redwood.c
+0
-19
arch/ppc/platforms/sandpoint_setup.c
arch/ppc/platforms/sandpoint_setup.c
+0
-1
arch/ppc/platforms/spruce.h
arch/ppc/platforms/spruce.h
+0
-11
arch/ppc/platforms/spruce_setup.c
arch/ppc/platforms/spruce_setup.c
+0
-44
arch/ppc/platforms/walnut.c
arch/ppc/platforms/walnut.c
+2
-3
arch/ppc/platforms/walnut.h
arch/ppc/platforms/walnut.h
+0
-8
drivers/input/evdev.c
drivers/input/evdev.c
+7
-5
drivers/input/gameport/cs461x.c
drivers/input/gameport/cs461x.c
+3
-3
drivers/input/gameport/emu10k1-gp.c
drivers/input/gameport/emu10k1-gp.c
+3
-3
drivers/input/gameport/fm801-gp.c
drivers/input/gameport/fm801-gp.c
+3
-3
drivers/input/gameport/lightning.c
drivers/input/gameport/lightning.c
+1
-1
drivers/input/gameport/ns558.c
drivers/input/gameport/ns558.c
+5
-5
drivers/input/gameport/vortex.c
drivers/input/gameport/vortex.c
+3
-3
drivers/input/input.c
drivers/input/input.c
+6
-6
drivers/input/joystick/a3d.c
drivers/input/joystick/a3d.c
+8
-8
drivers/input/joystick/adi.c
drivers/input/joystick/adi.c
+4
-4
drivers/input/joystick/amijoy.c
drivers/input/joystick/amijoy.c
+4
-4
drivers/input/joystick/analog.c
drivers/input/joystick/analog.c
+4
-4
drivers/input/joystick/cobra.c
drivers/input/joystick/cobra.c
+4
-4
drivers/input/joystick/db9.c
drivers/input/joystick/db9.c
+7
-7
drivers/input/joystick/gamecon.c
drivers/input/joystick/gamecon.c
+7
-7
drivers/input/joystick/gf2k.c
drivers/input/joystick/gf2k.c
+4
-4
drivers/input/joystick/grip.c
drivers/input/joystick/grip.c
+4
-4
drivers/input/joystick/guillemot.c
drivers/input/joystick/guillemot.c
+4
-4
drivers/input/joystick/iforce/iforce-main.c
drivers/input/joystick/iforce/iforce-main.c
+5
-5
drivers/input/joystick/interact.c
drivers/input/joystick/interact.c
+4
-4
drivers/input/joystick/magellan.c
drivers/input/joystick/magellan.c
+4
-4
drivers/input/joystick/sidewinder.c
drivers/input/joystick/sidewinder.c
+4
-4
drivers/input/joystick/spaceball.c
drivers/input/joystick/spaceball.c
+4
-4
drivers/input/joystick/spaceorb.c
drivers/input/joystick/spaceorb.c
+4
-4
drivers/input/joystick/stinger.c
drivers/input/joystick/stinger.c
+4
-4
drivers/input/joystick/tmdc.c
drivers/input/joystick/tmdc.c
+4
-4
drivers/input/joystick/turbografx.c
drivers/input/joystick/turbografx.c
+7
-7
drivers/input/joystick/twidjoy.c
drivers/input/joystick/twidjoy.c
+4
-4
drivers/input/joystick/warrior.c
drivers/input/joystick/warrior.c
+4
-4
drivers/input/keybdev.c
drivers/input/keybdev.c
+0
-29
drivers/input/keyboard/amikbd.c
drivers/input/keyboard/amikbd.c
+4
-4
drivers/input/keyboard/atkbd.c
drivers/input/keyboard/atkbd.c
+21
-11
drivers/input/keyboard/maple_keyb.c
drivers/input/keyboard/maple_keyb.c
+1
-1
drivers/input/keyboard/newtonkbd.c
drivers/input/keyboard/newtonkbd.c
+4
-4
drivers/input/keyboard/ps2serkbd.c
drivers/input/keyboard/ps2serkbd.c
+4
-4
drivers/input/keyboard/sunkbd.c
drivers/input/keyboard/sunkbd.c
+4
-4
drivers/input/keyboard/xtkbd.c
drivers/input/keyboard/xtkbd.c
+4
-4
drivers/input/mouse/amimouse.c
drivers/input/mouse/amimouse.c
+4
-4
drivers/input/mouse/inport.c
drivers/input/mouse/inport.c
+5
-4
drivers/input/mouse/logibm.c
drivers/input/mouse/logibm.c
+11
-10
drivers/input/mouse/pc110pad.c
drivers/input/mouse/pc110pad.c
+7
-7
drivers/input/mouse/psmouse.c
drivers/input/mouse/psmouse.c
+5
-5
drivers/input/mouse/rpcmouse.c
drivers/input/mouse/rpcmouse.c
+9
-7
drivers/input/mouse/sermouse.c
drivers/input/mouse/sermouse.c
+4
-4
drivers/input/serio/Config.in
drivers/input/serio/Config.in
+9
-1
drivers/input/serio/Makefile
drivers/input/serio/Makefile
+2
-0
drivers/input/serio/ambakmi.c
drivers/input/serio/ambakmi.c
+158
-0
drivers/input/serio/i8042-ppcio.h
drivers/input/serio/i8042-ppcio.h
+6
-0
drivers/input/serio/i8042.c
drivers/input/serio/i8042.c
+78
-83
drivers/input/serio/rpckbd.c
drivers/input/serio/rpckbd.c
+12
-17
drivers/input/serio/sa1111ps2.c
drivers/input/serio/sa1111ps2.c
+286
-0
drivers/input/serio/serio.c
drivers/input/serio/serio.c
+1
-0
drivers/input/touchscreen/gunze.c
drivers/input/touchscreen/gunze.c
+4
-4
drivers/input/touchscreen/h3600_ts_input.c
drivers/input/touchscreen/h3600_ts_input.c
+4
-4
drivers/input/uinput.c
drivers/input/uinput.c
+4
-4
drivers/macintosh/adbhid.c
drivers/macintosh/adbhid.c
+5
-5
drivers/macintosh/mac_hid.c
drivers/macintosh/mac_hid.c
+4
-4
drivers/usb/input/aiptek.c
drivers/usb/input/aiptek.c
+4
-4
drivers/usb/input/hid-input.c
drivers/usb/input/hid-input.c
+4
-4
drivers/usb/input/powermate.c
drivers/usb/input/powermate.c
+4
-4
drivers/usb/input/usbkbd.c
drivers/usb/input/usbkbd.c
+5
-5
drivers/usb/input/usbmouse.c
drivers/usb/input/usbmouse.c
+5
-5
drivers/usb/input/wacom.c
drivers/usb/input/wacom.c
+4
-4
drivers/usb/input/xpad.c
drivers/usb/input/xpad.c
+72
-84
include/asm-ppc/keyboard.h
include/asm-ppc/keyboard.h
+0
-4
include/linux/gameport.h
include/linux/gameport.h
+1
-4
include/linux/input.h
include/linux/input.h
+15
-16
include/linux/serio.h
include/linux/serio.h
+4
-0
include/linux/uinput.h
include/linux/uinput.h
+1
-4
No files found.
Documentation/input/input.txt
View file @
a2ea21bb
...
@@ -207,7 +207,7 @@ program reading the data wishes. You can set GPM and X to any of
...
@@ -207,7 +207,7 @@ program reading the data wishes. You can set GPM and X to any of
these. You'll need ImPS/2 if you want to make use of a wheel on a USB
these. You'll need ImPS/2 if you want to make use of a wheel on a USB
mouse and ExplorerPS/2 if you want to use extra (up to 5) buttons.
mouse and ExplorerPS/2 if you want to use extra (up to 5) buttons.
3.2.3 joydev.
c
3.2.3 joydev.
o
~~~~~~~~~~~~~~
~~~~~~~~~~~~~~
Joydev implements v0.x and v1.x Linux joystick api, much like
Joydev implements v0.x and v1.x Linux joystick api, much like
drivers/char/joystick/joystick.c used to in earlier versions. See
drivers/char/joystick/joystick.c used to in earlier versions. See
...
...
Documentation/input/xpad.txt
View file @
a2ea21bb
usb-xpad - Linux USB driver for XBOX HID gamecontroller
s
xpad - Linux USB driver for X-Box gamepad
s
This is the very first release of a driver for X
BOX gamecontroller
s.
This is the very first release of a driver for X
-Box gamepad
s.
Basically, this was hacked away in just a few hours, so don't expect
Basically, this was hacked away in just a few hours, so don't expect
miracles.
miracles.
In particular, there is currently NO support for the rumble pack.
You won't find many ff-aware linux applications anyway.
0. Status
0. Status
---------
---------
...
@@ -14,31 +17,38 @@ The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports
...
@@ -14,31 +17,38 @@ The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports
8 axes and 10 buttons.
8 axes and 10 buttons.
Alls 8 axes work, though they all have the same range (-32768..32767)
Alls 8 axes work, though they all have the same range (-32768..32767)
and the zero-setting is not correct for the triggers.
and the zero-setting is not correct for the triggers (I don't know if that
9 of the 10 buttons work (my black button does not work, though I can
is some limitation of jstest, since the input device setup should be fine. I
see no reason for it not to), all of them are in digital mode, though
didn't have a look at jstest itself yet).
(the six buttons on the right side are "analog" ones).
All of the 10 buttons work (in digital mode). The six buttons on the
right side (A, B, X, Y, black, white) are said to be "analog" and
report their values as 8 bit unsigned, not sure what this is good for.
I tested the controller with quake3, and configuration and
in game functionality were OK. However, I find it rather difficult to
play first person shooters with a pad. Your mileage may vary.
1. USB adapter
1. USB adapter
--------------
--------------
Before you can actually use the driver, you need to get yourself an
Before you can actually use the driver, you need to get yourself an
adapter cable to connect the X
BOX-
controller to your Linux-Box.
adapter cable to connect the X
-Box
controller to your Linux-Box.
Such a cable is pretty easy to build. The Controller itself is a USB
device
Such a cable is pretty easy to build. The Controller itself is a USB
compound
(a hub with three ports; two expansion slots and the controller device)
device (a hub with three ports for two expansion slots and the controller
with the only differ
nce in a nonstandard connector (5 pins vs. 4 on
device) with the only differe
nce in a nonstandard connector (5 pins vs. 4 on
standard USB connector).
standard USB connector).
You just need to solder a
n
USB connector onto the cable and keep the
You just need to solder a USB connector onto the cable and keep the
yellow wire unconnected. The other pins have the same order on both
yellow wire unconnected. The other pins have the same order on both
connectors so there
no magic to it. Detailed info on these matters can be found
connectors so there
is no magic to it. Detailed info on these matters
on the net
.
can be found on the net ([1], [2], [3])
.
Thanks to the trip splitter found on the cable you don't even need to cut the
Thanks to the trip splitter found on the cable you don't even need to cut the
original
cable, y
ou can buy an extension cable and cut that instead. That way,
original
one. Y
ou can buy an extension cable and cut that instead. That way,
you can still use the controller with your X
BOX
, if you have one ;)
you can still use the controller with your X
-Box
, if you have one ;)
2. driver installation
2. driver installation
...
@@ -46,22 +56,26 @@ you can still use the controller with your XBOX, if you have one ;)
...
@@ -46,22 +56,26 @@ you can still use the controller with your XBOX, if you have one ;)
Once you have the adapter cable and the controller is connected, you need
Once you have the adapter cable and the controller is connected, you need
to load your USB subsystem and should cat /proc/bus/usb/devices.
to load your USB subsystem and should cat /proc/bus/usb/devices.
There should be an entry like the one in InterAct_german.dump.
There should be an entry like the one at the end [4].
Currently (as of version 0.0.4), the following three devices are included:
original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
Don't worry if the vendor and/or product ID don't match, those are easy to
If you have another controller that is not listed above and is not recognized
add to the driver. You could do it yourself, just add the appropriate line
by the driver, please drop me a line with the appropriate info (that is, include
into the list after the line
the name, vendor and product ID, as well as the country where you bought it;
'} xpad_device[] = {'
sending the whole dump out of /proc/bus/usb/devices along would be even better).
, but before the line that says
'{ 0x0000, 0x0000, "unknown...." }'.
In theory, the driver should work with other controllers than mine
In theory, the driver should work with other controllers than mine
(InterAct PowerPad pro, bought in Germany) just fine, but see for yourself.
(InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this
for I only have this one controller.
If you compiled and installed the driver, test the functionality:
If you compiled and installed the driver, test the functionality:
> modprobe
usb-
xpad
> modprobe xpad
> modprobe joydev
> modprobe joydev
> jstest /dev/
input/
js0
> jstest /dev/js0
There should be a single line showing 18 inputs (8 axes, 10 buttons), and
There should be a single line showing 18 inputs (8 axes, 10 buttons), and
it's values should change if you move the sticks and push the buttons.
it's values should change if you move the sticks and push the buttons.
...
@@ -76,9 +90,27 @@ I have to thank ITO Takayuki for the detailed info on his site
...
@@ -76,9 +90,27 @@ I have to thank ITO Takayuki for the detailed info on his site
http://euc.jp/periphs/xbox-controller.ja.html.
http://euc.jp/periphs/xbox-controller.ja.html.
His useful info and both the usb-skeleton as well as the iforce input driver
His useful info and both the usb-skeleton as well as the iforce input driver
helped a lot in rapid prototyping the basic functionality.
(Greg Kroah-Hartmann; Vojtech Pavlik) helped a lot in rapid prototyping
the basic functionality.
4. References
-------------
1. http://euc.jp/periphs/xbox-controller.ja.html (ITO Takayuki)
2. http://xpad.xbox-scene.com/
3. http://www.xboxhackz.com/Hackz-Reference.htm
4. /proc/bus/usb/devices - dump from InterAct PowerPad Pro (Germany):
T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1
P: Vendor=05fd ProdID=107a Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
--
--
Marko Friedemann <mfr@bmx-chemnitz.de>
Marko Friedemann <mfr@bmx-chemnitz.de>
2002-07-
02
2002-07-
16
arch/ppc/4xx_io/Makefile
View file @
a2ea21bb
...
@@ -6,7 +6,6 @@ O_TARGET := 4xx_io.o
...
@@ -6,7 +6,6 @@ O_TARGET := 4xx_io.o
#obj-y :=
#obj-y :=
obj-$(CONFIG_STB_KB)
+=
stb_kb.o
obj-$(CONFIG_SERIAL_SICC)
+=
serial_sicc.o
obj-$(CONFIG_SERIAL_SICC)
+=
serial_sicc.o
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
arch/ppc/4xx_io/stb_kb.c
View file @
a2ea21bb
/*
* arch/ppc/4xx_io/stb_kb.c
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*/
#include <linux/config.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
#include <linux/mm.h>
#include <linux/signal.h>
#include <linux/init.h>
#include <linux/kbd_ll.h>
#include <linux/delay.h>
#include <linux/random.h>
#include <linux/poll.h>
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <linux/kbd_kern.h>
/* the following are borrowed from pc_keyb.c, thanks to those involved! */
/*
* Translation of escaped scancodes to keycodes.
* This is now user-settable.
* The keycodes 1-88,96-111,119 are fairly standard, and
* should probably not be changed - changing might confuse X.
* X also interprets scancode 0x5d (KEY_Begin).
*
* For 1-88 keycode equals scancode.
*/
#define E0_KPENTER 96
#define E0_RCTRL 97
#define E0_KPSLASH 98
#define E0_PRSCR 99
#define E0_RALT 100
#define E0_BREAK 101
/* (control-pause) */
#define E0_HOME 102
#define E0_UP 103
#define E0_PGUP 104
#define E0_LEFT 105
#define E0_RIGHT 106
#define E0_END 107
#define E0_DOWN 108
#define E0_PGDN 109
#define E0_INS 110
#define E0_DEL 111
#define E1_PAUSE 119
/*
* The keycodes below are randomly located in 89-95,112-118,120-127.
* They could be thrown away (and all occurrences below replaced by 0),
* but that would force many users to use the `setkeycodes' utility, where
* they needed not before. It does not matter that there are duplicates, as
* long as no duplication occurs for any single keyboard.
*/
#define SC_LIM 89
#define FOCUS_PF1 85
/* actual code! */
#define FOCUS_PF2 89
#define FOCUS_PF3 90
#define FOCUS_PF4 91
#define FOCUS_PF5 92
#define FOCUS_PF6 93
#define FOCUS_PF7 94
#define FOCUS_PF8 95
#define FOCUS_PF9 120
#define FOCUS_PF10 121
#define FOCUS_PF11 122
#define FOCUS_PF12 123
#define JAP_86 124
/* tfj@olivia.ping.dk:
* The four keys are located over the numeric keypad, and are
* labelled A1-A4. It's an rc930 keyboard, from
* Regnecentralen/RC International, Now ICL.
* Scancodes: 59, 5a, 5b, 5c.
*/
#define RGN1 124
#define RGN2 125
#define RGN3 126
#define RGN4 127
static
unsigned
char
high_keys
[
128
-
SC_LIM
]
=
{
RGN1
,
RGN2
,
RGN3
,
RGN4
,
0
,
0
,
0
,
/* 0x59-0x5f */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x60-0x67 */
0
,
0
,
0
,
0
,
0
,
FOCUS_PF11
,
0
,
FOCUS_PF12
,
/* 0x68-0x6f */
0
,
0
,
0
,
FOCUS_PF2
,
FOCUS_PF9
,
0
,
0
,
FOCUS_PF3
,
/* 0x70-0x77 */
FOCUS_PF4
,
FOCUS_PF5
,
FOCUS_PF6
,
FOCUS_PF7
,
/* 0x78-0x7b */
FOCUS_PF8
,
JAP_86
,
FOCUS_PF10
,
0
/* 0x7c-0x7f */
};
/* BTC */
#define E0_MACRO 112
/* LK450 */
#define E0_F13 113
#define E0_F14 114
#define E0_HELP 115
#define E0_DO 116
#define E0_F17 117
#define E0_KPMINPLUS 118
/*
* My OmniKey generates e0 4c for the "OMNI" key and the
* right alt key does nada. [kkoller@nyx10.cs.du.edu]
*/
#define E0_OK 124
/*
* New microsoft keyboard is rumoured to have
* e0 5b (left window button), e0 5c (right window button),
* e0 5d (menu button). [or: LBANNER, RBANNER, RMENU]
* [or: Windows_L, Windows_R, TaskMan]
*/
#define E0_MSLW 125
#define E0_MSRW 126
#define E0_MSTM 127
static
unsigned
char
e0_keys
[
128
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x00-0x07 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x08-0x0f */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x10-0x17 */
0
,
0
,
0
,
0
,
E0_KPENTER
,
E0_RCTRL
,
0
,
0
,
/* 0x18-0x1f */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x20-0x27 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x28-0x2f */
0
,
0
,
0
,
0
,
0
,
E0_KPSLASH
,
0
,
E0_PRSCR
,
/* 0x30-0x37 */
E0_RALT
,
0
,
0
,
0
,
0
,
E0_F13
,
E0_F14
,
E0_HELP
,
/* 0x38-0x3f */
E0_DO
,
E0_F17
,
0
,
0
,
0
,
0
,
E0_BREAK
,
E0_HOME
,
/* 0x40-0x47 */
E0_UP
,
E0_PGUP
,
0
,
E0_LEFT
,
E0_OK
,
E0_RIGHT
,
E0_KPMINPLUS
,
E0_END
,
/* 0x48-0x4f */
E0_DOWN
,
E0_PGDN
,
E0_INS
,
E0_DEL
,
0
,
0
,
0
,
0
,
/* 0x50-0x57 */
0
,
0
,
0
,
E0_MSLW
,
E0_MSRW
,
E0_MSTM
,
0
,
0
,
/* 0x58-0x5f */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x60-0x67 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
E0_MACRO
,
/* 0x68-0x6f */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x70-0x77 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
/* 0x78-0x7f */
};
void
__init
rawirkbd_init_hw
(
void
)
{
}
/*
int rawirkbd_setkeycode(unsigned int scancode, unsigned int keycode)
{
return -EINVAL;
}
int rawirkbd_getkeycode(unsigned int scancode)
{
return -EINVAL;
}
*/
int
rawirkbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
)
{
if
(
scancode
<
SC_LIM
||
scancode
>
255
||
keycode
>
127
)
return
-
EINVAL
;
if
(
scancode
<
128
)
high_keys
[
scancode
-
SC_LIM
]
=
keycode
;
else
e0_keys
[
scancode
-
128
]
=
keycode
;
return
0
;
}
int
rawirkbd_getkeycode
(
unsigned
int
scancode
)
{
return
(
scancode
<
SC_LIM
||
scancode
>
255
)
?
-
EINVAL
:
(
scancode
<
128
)
?
high_keys
[
scancode
-
SC_LIM
]
:
e0_keys
[
scancode
-
128
];
}
int
rawirkbd_translate
(
unsigned
char
scancode
,
unsigned
char
*
keycode
,
char
raw_mode
)
{
static
int
prev_scancode
=
0
;
/* special prefix scancodes.. */
if
(
scancode
==
0xe0
||
scancode
==
0xe1
)
{
prev_scancode
=
scancode
;
return
0
;
}
/* 0xFF is sent by a few keyboards, ignore it. 0x00 is error */
if
(
scancode
==
0x00
||
scancode
==
0xff
)
{
prev_scancode
=
0
;
return
0
;
}
scancode
&=
0x7f
;
if
(
prev_scancode
)
{
/*
* usually it will be 0xe0, but a Pause key generates
* e1 1d 45 e1 9d c5 when pressed, and nothing when released
*/
if
(
prev_scancode
!=
0xe0
)
{
if
(
prev_scancode
==
0xe1
&&
scancode
==
0x1d
)
{
prev_scancode
=
0x100
;
return
0
;
}
else
if
(
prev_scancode
==
0x100
&&
scancode
==
0x45
)
{
*
keycode
=
E1_PAUSE
;
prev_scancode
=
0
;
}
else
{
#ifdef KBD_REPORT_UNKN
if
(
!
raw_mode
)
printk
(
KERN_INFO
"keyboard: unknown e1 escape sequence
\n
"
);
#endif
prev_scancode
=
0
;
return
0
;
}
}
else
{
prev_scancode
=
0
;
/*
* The keyboard maintains its own internal caps lock and
* num lock statuses. In caps lock mode E0 AA precedes make
* code and E0 2A follows break code. In num lock mode,
* E0 2A precedes make code and E0 AA follows break code.
* We do our own book-keeping, so we will just ignore these.
*/
/*
* For my keyboard there is no caps lock mode, but there are
* both Shift-L and Shift-R modes. The former mode generates
* E0 2A / E0 AA pairs, the latter E0 B6 / E0 36 pairs.
* So, we should also ignore the latter. - aeb@cwi.nl
*/
if
(
scancode
==
0x2a
||
scancode
==
0x36
)
return
0
;
if
(
e0_keys
[
scancode
])
*
keycode
=
e0_keys
[
scancode
];
else
{
#ifdef KBD_REPORT_UNKN
if
(
!
raw_mode
)
printk
(
KERN_INFO
"keyboard: unknown scancode e0 %02x
\n
"
,
scancode
);
#endif
return
0
;
}
}
}
else
if
(
scancode
>=
SC_LIM
)
{
/* This happens with the FOCUS 9000 keyboard
Its keys PF1..PF12 are reported to generate
55 73 77 78 79 7a 7b 7c 74 7e 6d 6f
Moreover, unless repeated, they do not generate
key-down events, so we have to zero up_flag below */
/* Also, Japanese 86/106 keyboards are reported to
generate 0x73 and 0x7d for \ - and \ | respectively. */
/* Also, some Brazilian keyboard is reported to produce
0x73 and 0x7e for \ ? and KP-dot, respectively. */
*
keycode
=
high_keys
[
scancode
-
SC_LIM
];
if
(
!*
keycode
)
{
if
(
!
raw_mode
)
{
#ifdef KBD_REPORT_UNKN
printk
(
KERN_INFO
"keyboard: unrecognized scancode (%02x)"
" - ignored
\n
"
,
scancode
);
#endif
}
return
0
;
}
}
else
*
keycode
=
scancode
;
return
1
;
}
char
rawirkbd_unexpected_up
(
unsigned
char
keycode
)
{
/* unexpected, but this can happen: maybe this was a key release for a
FOCUS 9000 PF key; if we want to see it, we have to clear up_flag */
if
(
keycode
>=
SC_LIM
||
keycode
==
85
)
return
0
;
else
return
0200
;
}
#include <asm/machdep.h>
void
redwood_irkb_init
(
void
)
{
extern
struct
machdep_calls
ppc_md
;
ppc_md
.
kbd_translate
=
rawirkbd_translate
;
ppc_md
.
kbd_unexpected_up
=
rawirkbd_unexpected_up
;
}
arch/ppc/8xx_io/uart.c
View file @
a2ea21bb
...
@@ -3103,19 +3103,3 @@ static int __init serial_console_setup(struct console *co, char *options)
...
@@ -3103,19 +3103,3 @@ static int __init serial_console_setup(struct console *co, char *options)
return
0
;
return
0
;
}
}
#ifdef CONFIG_INPUT_KEYBDEV
void
handle_scancode
(
unsigned
char
scancode
,
int
down
)
{
printk
(
"handle_scancode(scancode=0x%x, down=%d)
\n
"
,
scancode
,
down
);
}
static
void
kbd_bh
(
unsigned
long
dummy
)
{
}
DECLARE_TASKLET_DISABLED
(
keyboard_tasklet
,
kbd_bh
,
0
);
void
(
*
kbd_ledfunc
)(
unsigned
int
led
);
#endif
arch/ppc/amiga/config.c
View file @
a2ea21bb
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <asm/amigahw.h>
#include <asm/amigahw.h>
#include <asm/amigaints.h>
#include <asm/amigaints.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include <asm/keyboard.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
#include <asm/io.h>
#include <asm/io.h>
...
@@ -76,9 +75,6 @@ static char amiga_model_name[13] = "Amiga ";
...
@@ -76,9 +75,6 @@ static char amiga_model_name[13] = "Amiga ";
extern
char
m68k_debug_device
[];
extern
char
m68k_debug_device
[];
static
void
amiga_sched_init
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
static
void
amiga_sched_init
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
));
/* amiga specific keyboard functions */
extern
int
amiga_keyb_init
(
void
);
extern
int
amiga_kbdrate
(
struct
kbd_repeat
*
);
/* amiga specific irq functions */
/* amiga specific irq functions */
extern
void
amiga_init_IRQ
(
void
);
extern
void
amiga_init_IRQ
(
void
);
extern
void
(
*
amiga_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
extern
void
(
*
amiga_default_handler
[])
(
int
,
void
*
,
struct
pt_regs
*
);
...
@@ -119,18 +115,6 @@ static struct console amiga_console_driver = {
...
@@ -119,18 +115,6 @@ static struct console amiga_console_driver = {
index:
-
1
,
index:
-
1
,
};
};
#ifdef CONFIG_MAGIC_SYSRQ
char
amiga_sysrq_xlate
[
128
]
=
"
\000
1234567890-=
\\\000\000
"
/* 0x00 - 0x0f */
"qwertyuiop[]
\000
123"
/* 0x10 - 0x1f */
"asdfghjkl;'
\000\000
456"
/* 0x20 - 0x2f */
"
\000
zxcvbnm,./
\000
+789"
/* 0x30 - 0x3f */
"
\177\t\r\r\000\177\000\000\000
-
\000\000\000\000\000
"
/* 0x40 - 0x4f */
"
\000\201\202\203\204\205\206\207\210\211
()/*+
\000
"
/* 0x50 - 0x5f */
"
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
"
/* 0x60 - 0x6f */
"
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
"
;
/* 0x70 - 0x7f */
#endif
extern
void
(
*
kd_mksound
)(
unsigned
int
,
unsigned
int
);
extern
void
(
*
kd_mksound
)(
unsigned
int
,
unsigned
int
);
...
@@ -407,8 +391,6 @@ void __init config_amiga(void)
...
@@ -407,8 +391,6 @@ void __init config_amiga(void)
request_resource
(
&
iomem_resource
,
&
((
struct
resource
*
)
&
mb_resources
)[
i
]);
request_resource
(
&
iomem_resource
,
&
((
struct
resource
*
)
&
mb_resources
)[
i
]);
mach_sched_init
=
amiga_sched_init
;
mach_sched_init
=
amiga_sched_init
;
mach_keyb_init
=
amiga_keyb_init
;
mach_kbdrate
=
amiga_kbdrate
;
mach_init_IRQ
=
amiga_init_IRQ
;
mach_init_IRQ
=
amiga_init_IRQ
;
#ifndef CONFIG_APUS
#ifndef CONFIG_APUS
mach_default_handler
=
&
amiga_default_handler
;
mach_default_handler
=
&
amiga_default_handler
;
...
...
arch/ppc/config.in
View file @
a2ea21bb
...
@@ -575,7 +575,6 @@ if [ "$CONFIG_40x" = "y" ]; then
...
@@ -575,7 +575,6 @@ if [ "$CONFIG_40x" = "y" ]; then
mainmenu_option next_comment
mainmenu_option next_comment
comment 'IBM 40x options'
comment 'IBM 40x options'
if [ "$CONFIG_STB03xxx" = "y" ]; then
if [ "$CONFIG_STB03xxx" = "y" ]; then
bool 'STB IR Keyboard' CONFIG_STB_KB
bool 'SICC Serial port' CONFIG_SERIAL_SICC
bool 'SICC Serial port' CONFIG_SERIAL_SICC
if [ "$CONFIG_SERIAL_SICC" = "y" -a "$CONFIG_UART0_TTYS1" = "y" ]; then
if [ "$CONFIG_SERIAL_SICC" = "y" -a "$CONFIG_UART0_TTYS1" = "y" ]; then
define_bool CONFIG_UART1_DFLT_CONSOLE y
define_bool CONFIG_UART1_DFLT_CONSOLE y
...
...
arch/ppc/kernel/ppc4xx_setup.c
View file @
a2ea21bb
...
@@ -345,12 +345,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -345,12 +345,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
progress
=
ppc4xx_progress
;
ppc_md
.
progress
=
ppc4xx_progress
;
#endif
#endif
#if defined(CONFIG_VT) && defined(CONFIG_PC_KEYBOARD)
#if defined(CONFIG_REDWOOD_4) && defined(CONFIG_STB_KB)
redwood_irkb_init
();
#endif
#endif
/*
/*
** m8xx_setup.c, prep_setup.c use
** m8xx_setup.c, prep_setup.c use
** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
...
...
arch/ppc/platforms/apus_setup.c
View file @
a2ea21bb
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/dma.h>
#include <asm/dma.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
#include <asm/keyboard.h>
#include <asm/time.h>
#include <asm/time.h>
unsigned
long
m68k_machtype
;
unsigned
long
m68k_machtype
;
...
@@ -42,16 +41,9 @@ char debug_device[6] = "";
...
@@ -42,16 +41,9 @@ char debug_device[6] = "";
extern
void
amiga_init_IRQ
(
void
);
extern
void
amiga_init_IRQ
(
void
);
extern
int
amiga_kbd_translate
(
unsigned
char
keycode
,
unsigned
char
*
keycodep
,
char
raw_mode
);
extern
char
amiga_sysrq_xlate
[
128
];
extern
void
apus_setup_pci_ptrs
(
void
);
extern
void
apus_setup_pci_ptrs
(
void
);
void
(
*
mach_sched_init
)
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
))
__initdata
=
NULL
;
void
(
*
mach_sched_init
)
(
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
))
__initdata
=
NULL
;
/* machine dependent keyboard functions */
int
(
*
mach_keyb_init
)
(
void
)
__initdata
=
NULL
;
int
(
*
mach_kbdrate
)
(
struct
kbd_repeat
*
)
=
NULL
;
void
(
*
mach_kbd_leds
)
(
unsigned
int
)
=
NULL
;
/* machine dependent irq functions */
/* machine dependent irq functions */
void
(
*
mach_init_IRQ
)
(
void
)
__initdata
=
NULL
;
void
(
*
mach_init_IRQ
)
(
void
)
__initdata
=
NULL
;
void
(
*
(
*
mach_default_handler
)[])
(
int
,
void
*
,
struct
pt_regs
*
)
=
NULL
;
void
(
*
(
*
mach_default_handler
)[])
(
int
,
void
*
,
struct
pt_regs
*
)
=
NULL
;
...
@@ -562,32 +554,6 @@ void apus_end_irq(unsigned int irq)
...
@@ -562,32 +554,6 @@ void apus_end_irq(unsigned int irq)
APUS_WRITE
(
APUS_IPL_EMU
,
IPLEMU_DISABLEINT
|
ipl_emu
);
APUS_WRITE
(
APUS_IPL_EMU
,
IPLEMU_DISABLEINT
|
ipl_emu
);
}
}
/****************************************************** keyboard */
static
int
apus_kbd_setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
)
{
return
-
EOPNOTSUPP
;
}
static
int
apus_kbd_getkeycode
(
unsigned
int
scancode
)
{
return
scancode
>
127
?
-
EINVAL
:
scancode
;
}
static
char
apus_kbd_unexpected_up
(
unsigned
char
keycode
)
{
return
0200
;
}
static
void
apus_kbd_init_hw
(
void
)
{
#ifdef CONFIG_APUS
extern
int
amiga_keyb_init
(
void
);
amiga_keyb_init
();
#endif
}
/****************************************************** debugging */
/****************************************************** debugging */
/* some serial hardware definitions */
/* some serial hardware definitions */
...
@@ -851,9 +817,4 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -851,9 +817,4 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
find_end_of_memory
=
apus_find_end_of_memory
;
ppc_md
.
find_end_of_memory
=
apus_find_end_of_memory
;
ppc_md
.
setup_io_mappings
=
apus_map_io
;
ppc_md
.
setup_io_mappings
=
apus_map_io
;
/* These should not be used for the APUS yet, since it uses
the M68K keyboard now. */
ppc_md
.
kbd_translate
=
amiga_kbd_translate
;
ppc_md
.
kbd_unexpected_up
=
apus_kbd_unexpected_up
;
}
}
arch/ppc/platforms/chrp_setup.c
View file @
a2ea21bb
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
#include <asm/machdep.h>
#include <asm/machdep.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include <asm/hydra.h>
#include <asm/hydra.h>
#include <asm/keyboard.h>
#include <asm/sections.h>
#include <asm/sections.h>
#include <asm/time.h>
#include <asm/time.h>
#include <asm/btext.h>
#include <asm/btext.h>
...
...
arch/ppc/platforms/pplus_setup.c
View file @
a2ea21bb
...
@@ -63,7 +63,6 @@
...
@@ -63,7 +63,6 @@
#include <asm/mk48t59.h>
#include <asm/mk48t59.h>
#include <asm/prep_nvram.h>
#include <asm/prep_nvram.h>
#include <asm/raven.h>
#include <asm/raven.h>
#include <asm/keyboard.h>
#include <asm/vga.h>
#include <asm/vga.h>
#include <asm/time.h>
#include <asm/time.h>
...
...
arch/ppc/platforms/prep_setup.c
View file @
a2ea21bb
...
@@ -55,7 +55,6 @@
...
@@ -55,7 +55,6 @@
#include <asm/mk48t59.h>
#include <asm/mk48t59.h>
#include <asm/prep_nvram.h>
#include <asm/prep_nvram.h>
#include <asm/raven.h>
#include <asm/raven.h>
#include <asm/keyboard.h>
#include <asm/vga.h>
#include <asm/vga.h>
#include <asm/time.h>
#include <asm/time.h>
#include <asm/mpc10x.h>
#include <asm/mpc10x.h>
...
...
arch/ppc/platforms/redwood.c
View file @
a2ea21bb
...
@@ -45,22 +45,3 @@ void __init
...
@@ -45,22 +45,3 @@ void __init
board_init
(
void
)
board_init
(
void
)
{
{
}
}
/* hack; blame me dan. -brad */
#ifdef CONFIG_INPUT_KEYBDEV
void
handle_scancode
(
unsigned
char
scancode
,
int
down
)
{
printk
(
"handle_scancode(scancode=0x%x, down=%d)
\n
"
,
scancode
,
down
);
}
static
void
kbd_bh
(
unsigned
long
dummy
)
{
}
DECLARE_TASKLET_DISABLED
(
keyboard_tasklet
,
kbd_bh
,
0
);
void
(
*
kbd_ledfunc
)
(
unsigned
int
led
);
#endif
arch/ppc/platforms/sandpoint_setup.c
View file @
a2ea21bb
...
@@ -83,7 +83,6 @@
...
@@ -83,7 +83,6 @@
#include <asm/machdep.h>
#include <asm/machdep.h>
#include <asm/prom.h>
#include <asm/prom.h>
#include <asm/smp.h>
#include <asm/smp.h>
#include <asm/keyboard.h>
#include <asm/vga.h>
#include <asm/vga.h>
#include <asm/open_pic.h>
#include <asm/open_pic.h>
#include <asm/i8259.h>
#include <asm/i8259.h>
...
...
arch/ppc/platforms/spruce.h
View file @
a2ea21bb
...
@@ -58,16 +58,5 @@
...
@@ -58,16 +58,5 @@
#define SPRUCE_NVRAM_BASE_ADDR 0xff800000
#define SPRUCE_NVRAM_BASE_ADDR 0xff800000
#define SPRUCE_RTC_BASE_ADDR SPRUCE_NVRAM_BASE_ADDR
#define SPRUCE_RTC_BASE_ADDR SPRUCE_NVRAM_BASE_ADDR
#define KEYBOARD_IRQ 22
#define AUX_IRQ 21
unsigned
char
spruce_read_keyb_data
(
void
);
unsigned
char
spruce_read_keyb_status
(
void
);
#define kbd_read_input spruce_read_keyb_data
#define kbd_read_status spruce_read_keyb_status
#define kbd_write_output(val) *((unsigned char *)0xff810000) = (char)val
#define kbd_write_command(val) *((unsigned char *)0xff810001) = (char)val
#endif
/* __ASM_SPRUCE_H__ */
#endif
/* __ASM_SPRUCE_H__ */
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
arch/ppc/platforms/spruce_setup.c
View file @
a2ea21bb
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
#include <linux/ide.h>
#include <linux/ide.h>
#include <linux/root_dev.h>
#include <linux/root_dev.h>
#include <asm/keyboard.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/page.h>
...
@@ -201,49 +200,6 @@ spruce_map_io(void)
...
@@ -201,49 +200,6 @@ spruce_map_io(void)
0x08000000
,
_PAGE_IO
);
0x08000000
,
_PAGE_IO
);
}
}
unsigned
char
spruce_read_keyb_status
(
void
)
{
unsigned
long
kbd_status
;
__raw_writel
(
0x00000088
,
0xff500008
);
eieio
();
__raw_writel
(
0x03000000
,
0xff50000c
);
eieio
();
asm
volatile
(
" lis 7,0xff88
\n
ori 7,7,0x8
\n
lswi 6,7,0x8
\n
mr %0,6
\n
"
:
"=r"
(
kbd_status
)
::
"6"
,
"7"
);
__raw_writel
(
0x00000000
,
0xff50000c
);
eieio
();
return
(
unsigned
char
)(
kbd_status
>>
24
);
}
unsigned
char
spruce_read_keyb_data
(
void
)
{
unsigned
long
kbd_data
;
__raw_writel
(
0x00000088
,
0xff500008
);
eieio
();
__raw_writel
(
0x03000000
,
0xff50000c
);
eieio
();
asm
volatile
(
" lis 7,0xff88
\n
lswi 6,7,0x8
\n
mr %0,6
\n
"
:
"=r"
(
kbd_data
)
::
"6"
,
"7"
);
__raw_writel
(
0x00000000
,
0xff50000c
);
eieio
();
return
(
unsigned
char
)(
kbd_data
>>
24
);
}
void
__init
void
__init
platform_init
(
unsigned
long
r3
,
unsigned
long
r4
,
unsigned
long
r5
,
platform_init
(
unsigned
long
r3
,
unsigned
long
r4
,
unsigned
long
r5
,
unsigned
long
r6
,
unsigned
long
r7
)
unsigned
long
r6
,
unsigned
long
r7
)
...
...
arch/ppc/platforms/walnut.c
View file @
a2ea21bb
...
@@ -45,6 +45,8 @@
...
@@ -45,6 +45,8 @@
#include <asm/todc.h>
#include <asm/todc.h>
#endif
#endif
#include "walnut.h"
#undef DEBUG
#undef DEBUG
#ifdef DEBUG
#ifdef DEBUG
...
@@ -82,9 +84,6 @@ ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
...
@@ -82,9 +84,6 @@ ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
void
__init
void
__init
board_setup_arch
(
void
)
board_setup_arch
(
void
)
{
{
#define WALNUT_PS2_BASE 0xF0100000
#define WALNUT_FPGA_BASE 0xF0300000
void
*
fpga_brdc
;
void
*
fpga_brdc
;
unsigned
char
fpga_brdc_data
;
unsigned
char
fpga_brdc_data
;
void
*
fpga_enable
;
void
*
fpga_enable
;
...
...
arch/ppc/platforms/walnut.h
View file @
a2ea21bb
...
@@ -73,14 +73,6 @@ extern void *walnut_rtc_base;
...
@@ -73,14 +73,6 @@ extern void *walnut_rtc_base;
#define WALNUT_PS2_BASE 0xF0100000
#define WALNUT_PS2_BASE 0xF0100000
#define WALNUT_FPGA_BASE 0xF0300000
#define WALNUT_FPGA_BASE 0xF0300000
extern
void
*
kb_cs
;
extern
void
*
kb_data
;
#define kbd_read_input() readb(kb_data)
#define kbd_read_status() readb(kb_cs)
#define kbd_write_output(val) writeb(val, kb_data)
#define kbd_write_command(val) writeb(val, kb_cs)
#define PPC4xx_MACHINE_NAME "IBM Walnut"
#define PPC4xx_MACHINE_NAME "IBM Walnut"
#endif
/* !__ASSEMBLY__ */
#endif
/* !__ASSEMBLY__ */
...
...
drivers/input/evdev.c
View file @
a2ea21bb
...
@@ -233,6 +233,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
...
@@ -233,6 +233,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
struct
evdev_list
*
list
=
file
->
private_data
;
struct
evdev_list
*
list
=
file
->
private_data
;
struct
evdev
*
evdev
=
list
->
evdev
;
struct
evdev
*
evdev
=
list
->
evdev
;
struct
input_dev
*
dev
=
evdev
->
handle
.
dev
;
struct
input_dev
*
dev
=
evdev
->
handle
.
dev
;
struct
input_devinfo
id
;
int
retval
,
t
,
u
;
int
retval
,
t
,
u
;
if
(
!
evdev
->
exist
)
return
-
ENODEV
;
if
(
!
evdev
->
exist
)
return
-
ENODEV
;
...
@@ -243,11 +244,12 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
...
@@ -243,11 +244,12 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return
put_user
(
EV_VERSION
,
(
int
*
)
arg
);
return
put_user
(
EV_VERSION
,
(
int
*
)
arg
);
case
EVIOCGID
:
case
EVIOCGID
:
if
((
retval
=
put_user
(
dev
->
idbus
,
((
short
*
)
arg
)
+
0
)))
return
retval
;
id
.
bustype
=
dev
->
id
.
bustype
;
if
((
retval
=
put_user
(
dev
->
idvendor
,
((
short
*
)
arg
)
+
1
)))
return
retval
;
id
.
vendor
=
dev
->
id
.
vendor
;
if
((
retval
=
put_user
(
dev
->
idproduct
,
((
short
*
)
arg
)
+
2
)))
return
retval
;
id
.
product
=
dev
->
id
.
product
;
if
((
retval
=
put_user
(
dev
->
idversion
,
((
short
*
)
arg
)
+
3
)))
return
retval
;
id
.
version
=
dev
->
id
.
version
;
return
0
;
return
copy_to_user
((
void
*
)
arg
,
&
id
,
sizeof
(
struct
input_devinfo
));
case
EVIOCGREP
:
case
EVIOCGREP
:
if
((
retval
=
put_user
(
dev
->
rep
[
0
],
((
int
*
)
arg
)
+
0
)))
return
retval
;
if
((
retval
=
put_user
(
dev
->
rep
[
0
],
((
int
*
)
arg
)
+
0
)))
return
retval
;
...
...
drivers/input/gameport/cs461x.c
View file @
a2ea21bb
...
@@ -291,9 +291,9 @@ static int __devinit cs461x_pci_probe(struct pci_dev *pdev, const struct pci_dev
...
@@ -291,9 +291,9 @@ static int __devinit cs461x_pci_probe(struct pci_dev *pdev, const struct pci_dev
port
->
name
=
name
;
port
->
name
=
name
;
port
->
phys
=
phys
;
port
->
phys
=
phys
;
port
->
id
bus
=
BUS_PCI
;
port
->
id
.
bustype
=
BUS_PCI
;
port
->
idvendor
=
pdev
->
vendor
;
port
->
id
.
vendor
=
pdev
->
vendor
;
port
->
idproduct
=
pdev
->
device
;
port
->
id
.
product
=
pdev
->
device
;
cs461x_pokeBA0
(
BA0_JSIO
,
0xFF
);
// ?
cs461x_pokeBA0
(
BA0_JSIO
,
0xFF
);
// ?
cs461x_pokeBA0
(
BA0_JSCTL
,
JSCTL_SP_MEDIUM_SLOW
);
cs461x_pokeBA0
(
BA0_JSCTL
,
JSCTL_SP_MEDIUM_SLOW
);
...
...
drivers/input/gameport/emu10k1-gp.c
View file @
a2ea21bb
...
@@ -87,9 +87,9 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
...
@@ -87,9 +87,9 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
emu
->
gameport
.
io
=
ioport
;
emu
->
gameport
.
io
=
ioport
;
emu
->
gameport
.
name
=
pdev
->
name
;
emu
->
gameport
.
name
=
pdev
->
name
;
emu
->
gameport
.
phys
=
emu
->
phys
;
emu
->
gameport
.
phys
=
emu
->
phys
;
emu
->
gameport
.
id
bus
=
BUS_PCI
;
emu
->
gameport
.
id
.
bustype
=
BUS_PCI
;
emu
->
gameport
.
idvendor
=
pdev
->
vendor
;
emu
->
gameport
.
id
.
vendor
=
pdev
->
vendor
;
emu
->
gameport
.
idproduct
=
pdev
->
device
;
emu
->
gameport
.
id
.
product
=
pdev
->
device
;
pci_set_drvdata
(
pdev
,
emu
);
pci_set_drvdata
(
pdev
,
emu
);
...
...
drivers/input/gameport/fm801-gp.c
View file @
a2ea21bb
...
@@ -105,9 +105,9 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
...
@@ -105,9 +105,9 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
gp
->
gameport
.
phys
=
gp
->
phys
;
gp
->
gameport
.
phys
=
gp
->
phys
;
gp
->
gameport
.
name
=
gp
->
name
;
gp
->
gameport
.
name
=
gp
->
name
;
gp
->
gameport
.
id
bus
=
BUS_PCI
;
gp
->
gameport
.
id
.
bustype
=
BUS_PCI
;
gp
->
gameport
.
idvendor
=
pci
->
vendor
;
gp
->
gameport
.
id
.
vendor
=
pci
->
vendor
;
gp
->
gameport
.
idproduct
=
pci
->
device
;
gp
->
gameport
.
id
.
product
=
pci
->
device
;
pci_set_drvdata
(
pci
,
gp
);
pci_set_drvdata
(
pci
,
gp
);
...
...
drivers/input/gameport/lightning.c
View file @
a2ea21bb
...
@@ -259,7 +259,7 @@ int __init l4_init(void)
...
@@ -259,7 +259,7 @@ int __init l4_init(void)
gameport
->
name
=
l4_name
;
gameport
->
name
=
l4_name
;
gameport
->
phys
=
l4
->
phys
;
gameport
->
phys
=
l4
->
phys
;
gameport
->
id
bus
=
BUS_ISA
;
gameport
->
id
.
bustype
=
BUS_ISA
;
if
(
!
i
&&
!
j
)
if
(
!
i
&&
!
j
)
gameport
->
io
=
L4_PORT
;
gameport
->
io
=
L4_PORT
;
...
...
drivers/input/gameport/ns558.c
View file @
a2ea21bb
...
@@ -144,7 +144,7 @@ static struct ns558* ns558_isa_probe(int io, struct ns558 *next)
...
@@ -144,7 +144,7 @@ static struct ns558* ns558_isa_probe(int io, struct ns558 *next)
port
->
gameport
.
io
=
io
&
(
-
1
<<
i
);
port
->
gameport
.
io
=
io
&
(
-
1
<<
i
);
port
->
gameport
.
phys
=
port
->
phys
;
port
->
gameport
.
phys
=
port
->
phys
;
port
->
gameport
.
name
=
port
->
name
;
port
->
gameport
.
name
=
port
->
name
;
port
->
gameport
.
id
bus
=
BUS_ISA
;
port
->
gameport
.
id
.
bustype
=
BUS_ISA
;
sprintf
(
port
->
phys
,
"isa%04x/gameport0"
,
io
&
(
-
1
<<
i
));
sprintf
(
port
->
phys
,
"isa%04x/gameport0"
,
io
&
(
-
1
<<
i
));
sprintf
(
port
->
name
,
"NS558 ISA"
);
sprintf
(
port
->
name
,
"NS558 ISA"
);
...
@@ -232,10 +232,10 @@ static struct ns558* ns558_pnp_probe(struct pci_dev *dev, struct ns558 *next)
...
@@ -232,10 +232,10 @@ static struct ns558* ns558_pnp_probe(struct pci_dev *dev, struct ns558 *next)
port
->
gameport
.
io
=
ioport
;
port
->
gameport
.
io
=
ioport
;
port
->
gameport
.
phys
=
port
->
phys
;
port
->
gameport
.
phys
=
port
->
phys
;
port
->
gameport
.
name
=
port
->
name
;
port
->
gameport
.
name
=
port
->
name
;
port
->
gameport
.
id
bus
=
BUS_ISAPNP
;
port
->
gameport
.
id
.
bustype
=
BUS_ISAPNP
;
port
->
gameport
.
idvendor
=
dev
->
vendor
;
port
->
gameport
.
id
.
vendor
=
dev
->
vendor
;
port
->
gameport
.
idproduct
=
dev
->
device
;
port
->
gameport
.
id
.
product
=
dev
->
device
;
port
->
gameport
.
idversion
=
0x100
;
port
->
gameport
.
id
.
version
=
0x100
;
sprintf
(
port
->
phys
,
"isapnp%d.%d/gameport0"
,
PCI_SLOT
(
dev
->
devfn
),
PCI_FUNC
(
dev
->
devfn
));
sprintf
(
port
->
phys
,
"isapnp%d.%d/gameport0"
,
PCI_SLOT
(
dev
->
devfn
),
PCI_FUNC
(
dev
->
devfn
));
sprintf
(
port
->
name
,
"%s"
,
dev
->
name
[
0
]
?
dev
->
name
:
"NS558 PnP Gameport"
);
sprintf
(
port
->
name
,
"%s"
,
dev
->
name
[
0
]
?
dev
->
name
:
"NS558 PnP Gameport"
);
...
...
drivers/input/gameport/vortex.c
View file @
a2ea21bb
...
@@ -129,9 +129,9 @@ static int __devinit vortex_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -129,9 +129,9 @@ static int __devinit vortex_probe(struct pci_dev *dev, const struct pci_device_i
vortex
->
gameport
.
name
=
dev
->
name
;
vortex
->
gameport
.
name
=
dev
->
name
;
vortex
->
gameport
.
phys
=
vortex
->
phys
;
vortex
->
gameport
.
phys
=
vortex
->
phys
;
vortex
->
gameport
.
id
bus
=
BUS_PCI
;
vortex
->
gameport
.
id
.
bustype
=
BUS_PCI
;
vortex
->
gameport
.
idvendor
=
dev
->
vendor
;
vortex
->
gameport
.
id
.
vendor
=
dev
->
vendor
;
vortex
->
gameport
.
idproduct
=
dev
->
device
;
vortex
->
gameport
.
id
.
product
=
dev
->
device
;
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
6
;
i
++
)
if
(
~
pci_resource_flags
(
dev
,
i
)
&
IORESOURCE_IO
)
if
(
~
pci_resource_flags
(
dev
,
i
)
&
IORESOURCE_IO
)
...
...
drivers/input/input.c
View file @
a2ea21bb
...
@@ -290,19 +290,19 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st
...
@@ -290,19 +290,19 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st
for
(;
id
->
flags
||
id
->
driver_info
;
id
++
)
{
for
(;
id
->
flags
||
id
->
driver_info
;
id
++
)
{
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_BUS
)
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_BUS
)
if
(
id
->
id
bus
!=
dev
->
idbus
)
if
(
id
->
id
.
bustype
!=
dev
->
id
.
bustype
)
continue
;
continue
;
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_VENDOR
)
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_VENDOR
)
if
(
id
->
id
vendor
!=
dev
->
id
vendor
)
if
(
id
->
id
.
vendor
!=
dev
->
id
.
vendor
)
continue
;
continue
;
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_PRODUCT
)
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_PRODUCT
)
if
(
id
->
id
product
!=
dev
->
id
product
)
if
(
id
->
id
.
product
!=
dev
->
id
.
product
)
continue
;
continue
;
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_BUS
)
if
(
id
->
flags
&
INPUT_DEVICE_ID_MATCH_BUS
)
if
(
id
->
id
version
!=
dev
->
id
version
)
if
(
id
->
id
.
version
!=
dev
->
id
.
version
)
continue
;
continue
;
MATCH_BIT
(
evbit
,
EV_MAX
);
MATCH_BIT
(
evbit
,
EV_MAX
);
...
@@ -395,7 +395,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
...
@@ -395,7 +395,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
envp
[
i
++
]
=
scratch
;
envp
[
i
++
]
=
scratch
;
scratch
+=
sprintf
(
scratch
,
"PRODUCT=%x/%x/%x/%x"
,
scratch
+=
sprintf
(
scratch
,
"PRODUCT=%x/%x/%x/%x"
,
dev
->
id
bus
,
dev
->
idvendor
,
dev
->
idproduct
,
dev
->
id
version
)
+
1
;
dev
->
id
.
bustype
,
dev
->
id
.
vendor
,
dev
->
id
.
product
,
dev
->
id
.
version
)
+
1
;
if
(
dev
->
name
)
{
if
(
dev
->
name
)
{
envp
[
i
++
]
=
scratch
;
envp
[
i
++
]
=
scratch
;
...
@@ -710,7 +710,7 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int
...
@@ -710,7 +710,7 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int
while
(
dev
)
{
while
(
dev
)
{
len
=
sprintf
(
buf
,
"I: Bus=%04x Vendor=%04x Product=%04x Version=%04x
\n
"
,
len
=
sprintf
(
buf
,
"I: Bus=%04x Vendor=%04x Product=%04x Version=%04x
\n
"
,
dev
->
id
bus
,
dev
->
idvendor
,
dev
->
idproduct
,
dev
->
id
version
);
dev
->
id
.
bustype
,
dev
->
id
.
vendor
,
dev
->
id
.
product
,
dev
->
id
.
version
);
len
+=
sprintf
(
buf
+
len
,
"N: Name=
\"
%s
\"\n
"
,
dev
->
name
?
dev
->
name
:
""
);
len
+=
sprintf
(
buf
+
len
,
"N: Name=
\"
%s
\"\n
"
,
dev
->
name
?
dev
->
name
:
""
);
len
+=
sprintf
(
buf
+
len
,
"P: Phys=%s
\n
"
,
dev
->
phys
?
dev
->
phys
:
""
);
len
+=
sprintf
(
buf
+
len
,
"P: Phys=%s
\n
"
,
dev
->
phys
?
dev
->
phys
:
""
);
...
...
drivers/input/joystick/a3d.c
View file @
a2ea21bb
...
@@ -336,10 +336,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -336,10 +336,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev)
a3d
->
adc
.
name
=
a3d_names
[
a3d
->
mode
];
a3d
->
adc
.
name
=
a3d_names
[
a3d
->
mode
];
a3d
->
adc
.
phys
=
a3d
->
adcphys
;
a3d
->
adc
.
phys
=
a3d
->
adcphys
;
a3d
->
adc
.
id
bus
=
BUS_GAMEPORT
;
a3d
->
adc
.
id
.
bustype
=
BUS_GAMEPORT
;
a3d
->
adc
.
idvendor
=
GAMEPORT_ID_VENDOR_MADCATZ
;
a3d
->
adc
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_MADCATZ
;
a3d
->
adc
.
idproduct
=
a3d
->
mode
;
a3d
->
adc
.
id
.
product
=
a3d
->
mode
;
a3d
->
adc
.
idversion
=
0x0100
;
a3d
->
adc
.
id
.
version
=
0x0100
;
a3d_read
(
a3d
,
data
);
a3d_read
(
a3d
,
data
);
...
@@ -353,10 +353,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -353,10 +353,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev)
a3d
->
dev
.
name
=
a3d_names
[
a3d
->
mode
];
a3d
->
dev
.
name
=
a3d_names
[
a3d
->
mode
];
a3d
->
dev
.
phys
=
a3d
->
phys
;
a3d
->
dev
.
phys
=
a3d
->
phys
;
a3d
->
dev
.
id
bus
=
BUS_GAMEPORT
;
a3d
->
dev
.
id
.
bustype
=
BUS_GAMEPORT
;
a3d
->
dev
.
idvendor
=
GAMEPORT_ID_VENDOR_MADCATZ
;
a3d
->
dev
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_MADCATZ
;
a3d
->
dev
.
idproduct
=
a3d
->
mode
;
a3d
->
dev
.
id
.
product
=
a3d
->
mode
;
a3d
->
dev
.
idversion
=
0x0100
;
a3d
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
a3d
->
dev
);
input_register_device
(
&
a3d
->
dev
);
printk
(
KERN_INFO
"input: %s on %s
\n
"
,
a3d_names
[
a3d
->
mode
],
a3d
->
phys
);
printk
(
KERN_INFO
"input: %s on %s
\n
"
,
a3d_names
[
a3d
->
mode
],
a3d
->
phys
);
...
...
drivers/input/joystick/adi.c
View file @
a2ea21bb
...
@@ -416,10 +416,10 @@ static void adi_init_input(struct adi *adi, struct adi_port *port, int half)
...
@@ -416,10 +416,10 @@ static void adi_init_input(struct adi *adi, struct adi_port *port, int half)
adi
->
dev
.
name
=
adi
->
name
;
adi
->
dev
.
name
=
adi
->
name
;
adi
->
dev
.
phys
=
adi
->
phys
;
adi
->
dev
.
phys
=
adi
->
phys
;
adi
->
dev
.
id
bus
=
BUS_GAMEPORT
;
adi
->
dev
.
id
.
bustype
=
BUS_GAMEPORT
;
adi
->
dev
.
idvendor
=
GAMEPORT_ID_VENDOR_LOGITECH
;
adi
->
dev
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_LOGITECH
;
adi
->
dev
.
idproduct
=
adi
->
id
;
adi
->
dev
.
id
.
product
=
adi
->
id
;
adi
->
dev
.
idversion
=
0x0100
;
adi
->
dev
.
id
.
version
=
0x0100
;
adi
->
dev
.
private
=
port
;
adi
->
dev
.
private
=
port
;
adi
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
adi
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/amijoy.c
View file @
a2ea21bb
...
@@ -134,10 +134,10 @@ static int __init amijoy_init(void)
...
@@ -134,10 +134,10 @@ static int __init amijoy_init(void)
amijoy
->
dev
[
i
].
name
=
amijoy_name
;
amijoy
->
dev
[
i
].
name
=
amijoy_name
;
amijoy
->
dev
[
i
].
phys
=
amijoy_phys
[
i
];
amijoy
->
dev
[
i
].
phys
=
amijoy_phys
[
i
];
amijoy
->
dev
[
i
].
id
bus
=
BUS_AMIGA
;
amijoy
->
dev
[
i
].
id
.
bustype
=
BUS_AMIGA
;
amijoy
->
dev
[
i
].
idvendor
=
0x0001
;
amijoy
->
dev
[
i
].
id
.
vendor
=
0x0001
;
amijoy
->
dev
[
i
].
idproduct
=
0x0003
;
amijoy
->
dev
[
i
].
id
.
product
=
0x0003
;
amijoy
->
dev
[
i
].
version
=
0x0100
;
amijoy
->
dev
[
i
].
id
.
version
=
0x0100
;
amijoy_dev
[
i
].
private
=
amijoy_used
+
i
;
amijoy_dev
[
i
].
private
=
amijoy_used
+
i
;
...
...
drivers/input/joystick/analog.c
View file @
a2ea21bb
...
@@ -436,10 +436,10 @@ static void analog_init_device(struct analog_port *port, struct analog *analog,
...
@@ -436,10 +436,10 @@ static void analog_init_device(struct analog_port *port, struct analog *analog,
analog
->
dev
.
name
=
analog
->
name
;
analog
->
dev
.
name
=
analog
->
name
;
analog
->
dev
.
phys
=
analog
->
phys
;
analog
->
dev
.
phys
=
analog
->
phys
;
analog
->
dev
.
id
bus
=
BUS_GAMEPORT
;
analog
->
dev
.
id
.
bustype
=
BUS_GAMEPORT
;
analog
->
dev
.
idvendor
=
GAMEPORT_ID_VENDOR_ANALOG
;
analog
->
dev
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_ANALOG
;
analog
->
dev
.
idproduct
=
analog
->
mask
>>
4
;
analog
->
dev
.
id
.
product
=
analog
->
mask
>>
4
;
analog
->
dev
.
idversion
=
0x0100
;
analog
->
dev
.
id
.
version
=
0x0100
;
analog
->
dev
.
open
=
analog_open
;
analog
->
dev
.
open
=
analog_open
;
analog
->
dev
.
close
=
analog_close
;
analog
->
dev
.
close
=
analog_close
;
...
...
drivers/input/joystick/cobra.c
View file @
a2ea21bb
...
@@ -199,10 +199,10 @@ static void cobra_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -199,10 +199,10 @@ static void cobra_connect(struct gameport *gameport, struct gameport_dev *dev)
cobra
->
dev
[
i
].
name
=
cobra_name
;
cobra
->
dev
[
i
].
name
=
cobra_name
;
cobra
->
dev
[
i
].
phys
=
cobra
->
phys
[
i
];
cobra
->
dev
[
i
].
phys
=
cobra
->
phys
[
i
];
cobra
->
dev
[
i
].
id
bus
=
BUS_GAMEPORT
;
cobra
->
dev
[
i
].
id
.
bustype
=
BUS_GAMEPORT
;
cobra
->
dev
[
i
].
idvendor
=
GAMEPORT_ID_VENDOR_CREATIVE
;
cobra
->
dev
[
i
].
id
.
vendor
=
GAMEPORT_ID_VENDOR_CREATIVE
;
cobra
->
dev
[
i
].
idproduct
=
0x0008
;
cobra
->
dev
[
i
].
id
.
product
=
0x0008
;
cobra
->
dev
[
i
].
idversion
=
0x0100
;
cobra
->
dev
[
i
].
id
.
version
=
0x0100
;
cobra
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
cobra
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
cobra
->
dev
[
i
].
absbit
[
0
]
=
BIT
(
ABS_X
)
|
BIT
(
ABS_Y
);
cobra
->
dev
[
i
].
absbit
[
0
]
=
BIT
(
ABS_X
)
|
BIT
(
ABS_Y
);
...
...
drivers/input/joystick/db9.c
View file @
a2ea21bb
...
@@ -351,10 +351,10 @@ static struct db9 __init *db9_probe(int *config)
...
@@ -351,10 +351,10 @@ static struct db9 __init *db9_probe(int *config)
db9
->
dev
[
i
].
name
=
db9_name
[
db9
->
mode
];
db9
->
dev
[
i
].
name
=
db9_name
[
db9
->
mode
];
db9
->
dev
[
i
].
phys
=
db9
->
phys
[
i
];
db9
->
dev
[
i
].
phys
=
db9
->
phys
[
i
];
db9
->
dev
[
i
].
id
bus
=
BUS_PARPORT
;
db9
->
dev
[
i
].
id
.
bustype
=
BUS_PARPORT
;
db9
->
dev
[
i
].
idvendor
=
0x0002
;
db9
->
dev
[
i
].
id
.
vendor
=
0x0002
;
db9
->
dev
[
i
].
idproduct
=
config
[
1
];
db9
->
dev
[
i
].
id
.
product
=
config
[
1
];
db9
->
dev
[
i
].
idversion
=
0x0100
;
db9
->
dev
[
i
].
id
.
version
=
0x0100
;
db9
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
db9
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
db9
->
dev
[
i
].
absbit
[
0
]
=
BIT
(
ABS_X
)
|
BIT
(
ABS_Y
);
db9
->
dev
[
i
].
absbit
[
0
]
=
BIT
(
ABS_X
)
|
BIT
(
ABS_Y
);
...
@@ -373,21 +373,21 @@ static struct db9 __init *db9_probe(int *config)
...
@@ -373,21 +373,21 @@ static struct db9 __init *db9_probe(int *config)
}
}
#ifndef MODULE
#ifndef MODULE
int
__init
db9_setup
(
char
*
str
)
static
int
__init
db9_setup
(
char
*
str
)
{
{
int
i
,
ints
[
3
];
int
i
,
ints
[
3
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
2
;
i
++
)
db9
[
i
]
=
ints
[
i
+
1
];
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
2
;
i
++
)
db9
[
i
]
=
ints
[
i
+
1
];
return
1
;
return
1
;
}
}
int
__init
db9_setup_2
(
char
*
str
)
static
int
__init
db9_setup_2
(
char
*
str
)
{
{
int
i
,
ints
[
3
];
int
i
,
ints
[
3
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
2
;
i
++
)
db9_2
[
i
]
=
ints
[
i
+
1
];
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
2
;
i
++
)
db9_2
[
i
]
=
ints
[
i
+
1
];
return
1
;
return
1
;
}
}
int
__init
db9_setup_3
(
char
*
str
)
static
int
__init
db9_setup_3
(
char
*
str
)
{
{
int
i
,
ints
[
3
];
int
i
,
ints
[
3
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
...
...
drivers/input/joystick/gamecon.c
View file @
a2ea21bb
...
@@ -593,10 +593,10 @@ static struct gc __init *gc_probe(int *config)
...
@@ -593,10 +593,10 @@ static struct gc __init *gc_probe(int *config)
gc
->
dev
[
i
].
name
=
gc_names
[
config
[
i
+
1
]];
gc
->
dev
[
i
].
name
=
gc_names
[
config
[
i
+
1
]];
gc
->
dev
[
i
].
phys
=
gc
->
phys
[
i
];
gc
->
dev
[
i
].
phys
=
gc
->
phys
[
i
];
gc
->
dev
[
i
].
id
bus
=
BUS_PARPORT
;
gc
->
dev
[
i
].
id
.
bustype
=
BUS_PARPORT
;
gc
->
dev
[
i
].
idvendor
=
0x0001
;
gc
->
dev
[
i
].
id
.
vendor
=
0x0001
;
gc
->
dev
[
i
].
idproduct
=
config
[
i
+
1
];
gc
->
dev
[
i
].
id
.
product
=
config
[
i
+
1
];
gc
->
dev
[
i
].
idversion
=
0x0100
;
gc
->
dev
[
i
].
id
.
version
=
0x0100
;
}
}
parport_release
(
gc
->
pd
);
parport_release
(
gc
->
pd
);
...
@@ -617,21 +617,21 @@ static struct gc __init *gc_probe(int *config)
...
@@ -617,21 +617,21 @@ static struct gc __init *gc_probe(int *config)
}
}
#ifndef MODULE
#ifndef MODULE
int
__init
gc_setup
(
char
*
str
)
static
int
__init
gc_setup
(
char
*
str
)
{
{
int
i
,
ints
[
7
];
int
i
,
ints
[
7
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
6
;
i
++
)
gc
[
i
]
=
ints
[
i
+
1
];
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
6
;
i
++
)
gc
[
i
]
=
ints
[
i
+
1
];
return
1
;
return
1
;
}
}
int
__init
gc_setup_2
(
char
*
str
)
static
int
__init
gc_setup_2
(
char
*
str
)
{
{
int
i
,
ints
[
7
];
int
i
,
ints
[
7
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
6
;
i
++
)
gc_2
[
i
]
=
ints
[
i
+
1
];
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
6
;
i
++
)
gc_2
[
i
]
=
ints
[
i
+
1
];
return
1
;
return
1
;
}
}
int
__init
gc_setup_3
(
char
*
str
)
static
int
__init
gc_setup_3
(
char
*
str
)
{
{
int
i
,
ints
[
7
];
int
i
,
ints
[
7
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
...
...
drivers/input/joystick/gf2k.c
View file @
a2ea21bb
...
@@ -295,10 +295,10 @@ static void gf2k_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -295,10 +295,10 @@ static void gf2k_connect(struct gameport *gameport, struct gameport_dev *dev)
gf2k
->
dev
.
name
=
gf2k_names
[
gf2k
->
id
];
gf2k
->
dev
.
name
=
gf2k_names
[
gf2k
->
id
];
gf2k
->
dev
.
phys
=
gf2k
->
phys
;
gf2k
->
dev
.
phys
=
gf2k
->
phys
;
gf2k
->
dev
.
id
bus
=
BUS_GAMEPORT
;
gf2k
->
dev
.
id
.
bustype
=
BUS_GAMEPORT
;
gf2k
->
dev
.
idvendor
=
GAMEPORT_ID_VENDOR_GENIUS
;
gf2k
->
dev
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_GENIUS
;
gf2k
->
dev
.
idproduct
=
gf2k
->
id
;
gf2k
->
dev
.
id
.
product
=
gf2k
->
id
;
gf2k
->
dev
.
idversion
=
0x0100
;
gf2k
->
dev
.
id
.
version
=
0x0100
;
for
(
i
=
0
;
i
<
gf2k_axes
[
gf2k
->
id
];
i
++
)
for
(
i
=
0
;
i
<
gf2k_axes
[
gf2k
->
id
];
i
++
)
set_bit
(
gf2k_abs
[
i
],
gf2k
->
dev
.
absbit
);
set_bit
(
gf2k_abs
[
i
],
gf2k
->
dev
.
absbit
);
...
...
drivers/input/joystick/grip.c
View file @
a2ea21bb
...
@@ -350,10 +350,10 @@ static void grip_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -350,10 +350,10 @@ static void grip_connect(struct gameport *gameport, struct gameport_dev *dev)
grip
->
dev
[
i
].
name
=
grip_name
[
grip
->
mode
[
i
]];
grip
->
dev
[
i
].
name
=
grip_name
[
grip
->
mode
[
i
]];
grip
->
dev
[
i
].
phys
=
grip
->
phys
[
i
];
grip
->
dev
[
i
].
phys
=
grip
->
phys
[
i
];
grip
->
dev
[
i
].
id
bus
=
BUS_GAMEPORT
;
grip
->
dev
[
i
].
id
.
bustype
=
BUS_GAMEPORT
;
grip
->
dev
[
i
].
idvendor
=
GAMEPORT_ID_VENDOR_GRAVIS
;
grip
->
dev
[
i
].
id
.
vendor
=
GAMEPORT_ID_VENDOR_GRAVIS
;
grip
->
dev
[
i
].
idproduct
=
grip
->
mode
[
i
];
grip
->
dev
[
i
].
id
.
product
=
grip
->
mode
[
i
];
grip
->
dev
[
i
].
idversion
=
0x0100
;
grip
->
dev
[
i
].
id
.
version
=
0x0100
;
grip
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
grip
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/guillemot.c
View file @
a2ea21bb
...
@@ -222,10 +222,10 @@ static void guillemot_connect(struct gameport *gameport, struct gameport_dev *de
...
@@ -222,10 +222,10 @@ static void guillemot_connect(struct gameport *gameport, struct gameport_dev *de
guillemot
->
dev
.
name
=
guillemot_type
[
i
].
name
;
guillemot
->
dev
.
name
=
guillemot_type
[
i
].
name
;
guillemot
->
dev
.
phys
=
guillemot
->
phys
;
guillemot
->
dev
.
phys
=
guillemot
->
phys
;
guillemot
->
dev
.
id
bus
=
BUS_GAMEPORT
;
guillemot
->
dev
.
id
.
bustype
=
BUS_GAMEPORT
;
guillemot
->
dev
.
idvendor
=
GAMEPORT_ID_VENDOR_GUILLEMOT
;
guillemot
->
dev
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_GUILLEMOT
;
guillemot
->
dev
.
idproduct
=
guillemot_type
[
i
].
id
;
guillemot
->
dev
.
id
.
product
=
guillemot_type
[
i
].
id
;
guillemot
->
dev
.
idversion
=
(
int
)
data
[
14
]
<<
8
|
data
[
15
];
guillemot
->
dev
.
id
.
version
=
(
int
)
data
[
14
]
<<
8
|
data
[
15
];
guillemot
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
guillemot
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/iforce/iforce-main.c
View file @
a2ea21bb
...
@@ -352,7 +352,7 @@ int iforce_init_device(struct iforce *iforce)
...
@@ -352,7 +352,7 @@ int iforce_init_device(struct iforce *iforce)
* Input device fields.
* Input device fields.
*/
*/
iforce
->
dev
.
id
bus
=
BUS_USB
;
iforce
->
dev
.
id
.
bustype
=
BUS_USB
;
iforce
->
dev
.
private
=
iforce
;
iforce
->
dev
.
private
=
iforce
;
iforce
->
dev
.
name
=
"Unknown I-Force device"
;
iforce
->
dev
.
name
=
"Unknown I-Force device"
;
iforce
->
dev
.
open
=
iforce_open
;
iforce
->
dev
.
open
=
iforce_open
;
...
@@ -392,12 +392,12 @@ int iforce_init_device(struct iforce *iforce)
...
@@ -392,12 +392,12 @@ int iforce_init_device(struct iforce *iforce)
*/
*/
if
(
!
iforce_get_id_packet
(
iforce
,
"M"
))
if
(
!
iforce_get_id_packet
(
iforce
,
"M"
))
iforce
->
dev
.
idvendor
=
(
iforce
->
edata
[
2
]
<<
8
)
|
iforce
->
edata
[
1
];
iforce
->
dev
.
id
.
vendor
=
(
iforce
->
edata
[
2
]
<<
8
)
|
iforce
->
edata
[
1
];
else
else
printk
(
KERN_WARNING
"iforce-main.c: Device does not respond to id packet M
\n
"
);
printk
(
KERN_WARNING
"iforce-main.c: Device does not respond to id packet M
\n
"
);
if
(
!
iforce_get_id_packet
(
iforce
,
"P"
))
if
(
!
iforce_get_id_packet
(
iforce
,
"P"
))
iforce
->
dev
.
idproduct
=
(
iforce
->
edata
[
2
]
<<
8
)
|
iforce
->
edata
[
1
];
iforce
->
dev
.
id
.
product
=
(
iforce
->
edata
[
2
]
<<
8
)
|
iforce
->
edata
[
1
];
else
else
printk
(
KERN_WARNING
"iforce-main.c: Device does not respond to id packet P
\n
"
);
printk
(
KERN_WARNING
"iforce-main.c: Device does not respond to id packet P
\n
"
);
...
@@ -438,8 +438,8 @@ int iforce_init_device(struct iforce *iforce)
...
@@ -438,8 +438,8 @@ int iforce_init_device(struct iforce *iforce)
*/
*/
for
(
i
=
0
;
iforce_device
[
i
].
idvendor
;
i
++
)
for
(
i
=
0
;
iforce_device
[
i
].
idvendor
;
i
++
)
if
(
iforce_device
[
i
].
idvendor
==
iforce
->
dev
.
idvendor
&&
if
(
iforce_device
[
i
].
idvendor
==
iforce
->
dev
.
id
.
vendor
&&
iforce_device
[
i
].
idproduct
==
iforce
->
dev
.
idproduct
)
iforce_device
[
i
].
idproduct
==
iforce
->
dev
.
id
.
product
)
break
;
break
;
iforce
->
type
=
iforce_device
+
i
;
iforce
->
type
=
iforce_device
+
i
;
...
...
drivers/input/joystick/interact.c
View file @
a2ea21bb
...
@@ -254,10 +254,10 @@ static void interact_connect(struct gameport *gameport, struct gameport_dev *dev
...
@@ -254,10 +254,10 @@ static void interact_connect(struct gameport *gameport, struct gameport_dev *dev
interact
->
dev
.
name
=
interact_type
[
i
].
name
;
interact
->
dev
.
name
=
interact_type
[
i
].
name
;
interact
->
dev
.
phys
=
interact
->
phys
;
interact
->
dev
.
phys
=
interact
->
phys
;
interact
->
dev
.
id
bus
=
BUS_GAMEPORT
;
interact
->
dev
.
id
.
bustype
=
BUS_GAMEPORT
;
interact
->
dev
.
idvendor
=
GAMEPORT_ID_VENDOR_INTERACT
;
interact
->
dev
.
id
.
vendor
=
GAMEPORT_ID_VENDOR_INTERACT
;
interact
->
dev
.
idproduct
=
interact_type
[
i
].
id
;
interact
->
dev
.
id
.
product
=
interact_type
[
i
].
id
;
interact
->
dev
.
idversion
=
0x0100
;
interact
->
dev
.
id
.
version
=
0x0100
;
interact
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
interact
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/magellan.c
View file @
a2ea21bb
...
@@ -170,10 +170,10 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -170,10 +170,10 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev)
magellan
->
dev
.
private
=
magellan
;
magellan
->
dev
.
private
=
magellan
;
magellan
->
dev
.
name
=
magellan_name
;
magellan
->
dev
.
name
=
magellan_name
;
magellan
->
dev
.
phys
=
magellan
->
phys
;
magellan
->
dev
.
phys
=
magellan
->
phys
;
magellan
->
dev
.
id
bus
=
BUS_RS232
;
magellan
->
dev
.
id
.
bustype
=
BUS_RS232
;
magellan
->
dev
.
idvendor
=
SERIO_MAGELLAN
;
magellan
->
dev
.
id
.
vendor
=
SERIO_MAGELLAN
;
magellan
->
dev
.
idproduct
=
0x0001
;
magellan
->
dev
.
id
.
product
=
0x0001
;
magellan
->
dev
.
idversion
=
0x0100
;
magellan
->
dev
.
id
.
version
=
0x0100
;
serio
->
private
=
magellan
;
serio
->
private
=
magellan
;
...
...
drivers/input/joystick/sidewinder.c
View file @
a2ea21bb
...
@@ -701,10 +701,10 @@ static void sw_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -701,10 +701,10 @@ static void sw_connect(struct gameport *gameport, struct gameport_dev *dev)
sw
->
dev
[
i
].
name
=
sw
->
name
;
sw
->
dev
[
i
].
name
=
sw
->
name
;
sw
->
dev
[
i
].
phys
=
sw
->
phys
[
i
];
sw
->
dev
[
i
].
phys
=
sw
->
phys
[
i
];
sw
->
dev
[
i
].
id
bus
=
BUS_GAMEPORT
;
sw
->
dev
[
i
].
id
.
bustype
=
BUS_GAMEPORT
;
sw
->
dev
[
i
].
idvendor
=
GAMEPORT_ID_VENDOR_MICROSOFT
;
sw
->
dev
[
i
].
id
.
vendor
=
GAMEPORT_ID_VENDOR_MICROSOFT
;
sw
->
dev
[
i
].
idproduct
=
sw
->
type
;
sw
->
dev
[
i
].
id
.
product
=
sw
->
type
;
sw
->
dev
[
i
].
idversion
=
0x0100
;
sw
->
dev
[
i
].
id
.
version
=
0x0100
;
sw
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
sw
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/spaceball.c
View file @
a2ea21bb
...
@@ -240,10 +240,10 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -240,10 +240,10 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
spaceball
->
dev
.
name
=
spaceball_names
[
id
];
spaceball
->
dev
.
name
=
spaceball_names
[
id
];
spaceball
->
dev
.
phys
=
spaceball
->
phys
;
spaceball
->
dev
.
phys
=
spaceball
->
phys
;
spaceball
->
dev
.
id
bus
=
BUS_RS232
;
spaceball
->
dev
.
id
.
bustype
=
BUS_RS232
;
spaceball
->
dev
.
idvendor
=
SERIO_SPACEBALL
;
spaceball
->
dev
.
id
.
vendor
=
SERIO_SPACEBALL
;
spaceball
->
dev
.
idproduct
=
id
;
spaceball
->
dev
.
id
.
product
=
id
;
spaceball
->
dev
.
idversion
=
0x0100
;
spaceball
->
dev
.
id
.
version
=
0x0100
;
serio
->
private
=
spaceball
;
serio
->
private
=
spaceball
;
...
...
drivers/input/joystick/spaceorb.c
View file @
a2ea21bb
...
@@ -187,10 +187,10 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -187,10 +187,10 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
spaceorb
->
dev
.
name
=
spaceorb_name
;
spaceorb
->
dev
.
name
=
spaceorb_name
;
spaceorb
->
dev
.
phys
=
spaceorb
->
phys
;
spaceorb
->
dev
.
phys
=
spaceorb
->
phys
;
spaceorb
->
dev
.
id
bus
=
BUS_RS232
;
spaceorb
->
dev
.
id
.
bustype
=
BUS_RS232
;
spaceorb
->
dev
.
idvendor
=
SERIO_SPACEORB
;
spaceorb
->
dev
.
id
.
vendor
=
SERIO_SPACEORB
;
spaceorb
->
dev
.
idproduct
=
0x0001
;
spaceorb
->
dev
.
id
.
product
=
0x0001
;
spaceorb
->
dev
.
idversion
=
0x0100
;
spaceorb
->
dev
.
id
.
version
=
0x0100
;
serio
->
private
=
spaceorb
;
serio
->
private
=
spaceorb
;
...
...
drivers/input/joystick/stinger.c
View file @
a2ea21bb
...
@@ -152,10 +152,10 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -152,10 +152,10 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev)
stinger
->
dev
.
name
=
stinger_name
;
stinger
->
dev
.
name
=
stinger_name
;
stinger
->
dev
.
phys
=
stinger
->
phys
;
stinger
->
dev
.
phys
=
stinger
->
phys
;
stinger
->
dev
.
id
bus
=
BUS_RS232
;
stinger
->
dev
.
id
.
bustype
=
BUS_RS232
;
stinger
->
dev
.
idvendor
=
SERIO_STINGER
;
stinger
->
dev
.
id
.
vendor
=
SERIO_STINGER
;
stinger
->
dev
.
idproduct
=
0x0001
;
stinger
->
dev
.
id
.
product
=
0x0001
;
stinger
->
dev
.
idversion
=
0x0100
;
stinger
->
dev
.
id
.
version
=
0x0100
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
stinger
->
dev
.
absmax
[
ABS_X
+
i
]
=
64
;
stinger
->
dev
.
absmax
[
ABS_X
+
i
]
=
64
;
...
...
drivers/input/joystick/tmdc.c
View file @
a2ea21bb
...
@@ -312,10 +312,10 @@ static void tmdc_connect(struct gameport *gameport, struct gameport_dev *dev)
...
@@ -312,10 +312,10 @@ static void tmdc_connect(struct gameport *gameport, struct gameport_dev *dev)
tmdc
->
dev
[
j
].
name
=
tmdc
->
name
[
j
];
tmdc
->
dev
[
j
].
name
=
tmdc
->
name
[
j
];
tmdc
->
dev
[
j
].
phys
=
tmdc
->
phys
[
j
];
tmdc
->
dev
[
j
].
phys
=
tmdc
->
phys
[
j
];
tmdc
->
dev
[
j
].
id
bus
=
BUS_GAMEPORT
;
tmdc
->
dev
[
j
].
id
.
bustype
=
BUS_GAMEPORT
;
tmdc
->
dev
[
j
].
idvendor
=
GAMEPORT_ID_VENDOR_THRUSTMASTER
;
tmdc
->
dev
[
j
].
id
.
vendor
=
GAMEPORT_ID_VENDOR_THRUSTMASTER
;
tmdc
->
dev
[
j
].
idproduct
=
models
[
m
].
id
;
tmdc
->
dev
[
j
].
id
.
product
=
models
[
m
].
id
;
tmdc
->
dev
[
j
].
idversion
=
0x0100
;
tmdc
->
dev
[
j
].
id
.
version
=
0x0100
;
tmdc
->
dev
[
j
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
tmdc
->
dev
[
j
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/turbografx.c
View file @
a2ea21bb
...
@@ -179,10 +179,10 @@ static struct tgfx __init *tgfx_probe(int *config)
...
@@ -179,10 +179,10 @@ static struct tgfx __init *tgfx_probe(int *config)
tgfx
->
dev
[
i
].
name
=
tgfx_name
;
tgfx
->
dev
[
i
].
name
=
tgfx_name
;
tgfx
->
dev
[
i
].
phys
=
tgfx
->
phys
[
i
];
tgfx
->
dev
[
i
].
phys
=
tgfx
->
phys
[
i
];
tgfx
->
dev
[
i
].
id
bus
=
BUS_PARPORT
;
tgfx
->
dev
[
i
].
id
.
bustype
=
BUS_PARPORT
;
tgfx
->
dev
[
i
].
idvendor
=
0x0003
;
tgfx
->
dev
[
i
].
id
.
vendor
=
0x0003
;
tgfx
->
dev
[
i
].
idproduct
=
config
[
i
+
1
];
tgfx
->
dev
[
i
].
id
.
product
=
config
[
i
+
1
];
tgfx
->
dev
[
i
].
idversion
=
0x0100
;
tgfx
->
dev
[
i
].
id
.
version
=
0x0100
;
tgfx
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
tgfx
->
dev
[
i
].
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
tgfx
->
dev
[
i
].
absbit
[
0
]
=
BIT
(
ABS_X
)
|
BIT
(
ABS_Y
);
tgfx
->
dev
[
i
].
absbit
[
0
]
=
BIT
(
ABS_X
)
|
BIT
(
ABS_Y
);
...
@@ -208,21 +208,21 @@ static struct tgfx __init *tgfx_probe(int *config)
...
@@ -208,21 +208,21 @@ static struct tgfx __init *tgfx_probe(int *config)
}
}
#ifndef MODULE
#ifndef MODULE
int
__init
tgfx_setup
(
char
*
str
)
static
int
__init
tgfx_setup
(
char
*
str
)
{
{
int
i
,
ints
[
9
];
int
i
,
ints
[
9
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
8
;
i
++
)
tgfx
[
i
]
=
ints
[
i
+
1
];
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
8
;
i
++
)
tgfx
[
i
]
=
ints
[
i
+
1
];
return
1
;
return
1
;
}
}
int
__init
tgfx_setup_2
(
char
*
str
)
static
int
__init
tgfx_setup_2
(
char
*
str
)
{
{
int
i
,
ints
[
9
];
int
i
,
ints
[
9
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
8
;
i
++
)
tgfx_2
[
i
]
=
ints
[
i
+
1
];
for
(
i
=
0
;
i
<=
ints
[
0
]
&&
i
<
8
;
i
++
)
tgfx_2
[
i
]
=
ints
[
i
+
1
];
return
1
;
return
1
;
}
}
int
__init
tgfx_setup_3
(
char
*
str
)
static
int
__init
tgfx_setup_3
(
char
*
str
)
{
{
int
i
,
ints
[
9
];
int
i
,
ints
[
9
];
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
...
...
drivers/input/joystick/twidjoy.c
View file @
a2ea21bb
...
@@ -198,10 +198,10 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -198,10 +198,10 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
twidjoy
->
dev
.
name
=
twidjoy_name
;
twidjoy
->
dev
.
name
=
twidjoy_name
;
twidjoy
->
dev
.
phys
=
twidjoy
->
phys
;
twidjoy
->
dev
.
phys
=
twidjoy
->
phys
;
twidjoy
->
dev
.
id
bus
=
BUS_RS232
;
twidjoy
->
dev
.
id
.
bustype
=
BUS_RS232
;
twidjoy
->
dev
.
idvendor
=
SERIO_TWIDJOY
;
twidjoy
->
dev
.
id
.
vendor
=
SERIO_TWIDJOY
;
twidjoy
->
dev
.
idproduct
=
0x0001
;
twidjoy
->
dev
.
id
.
product
=
0x0001
;
twidjoy
->
dev
.
idversion
=
0x0100
;
twidjoy
->
dev
.
id
.
version
=
0x0100
;
twidjoy
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
twidjoy
->
dev
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/input/joystick/warrior.c
View file @
a2ea21bb
...
@@ -156,10 +156,10 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -156,10 +156,10 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev)
warrior
->
dev
.
name
=
warrior_name
;
warrior
->
dev
.
name
=
warrior_name
;
warrior
->
dev
.
phys
=
warrior
->
phys
;
warrior
->
dev
.
phys
=
warrior
->
phys
;
warrior
->
dev
.
id
bus
=
BUS_RS232
;
warrior
->
dev
.
id
.
bustype
=
BUS_RS232
;
warrior
->
dev
.
idvendor
=
SERIO_WARRIOR
;
warrior
->
dev
.
id
.
vendor
=
SERIO_WARRIOR
;
warrior
->
dev
.
idproduct
=
0x0001
;
warrior
->
dev
.
id
.
product
=
0x0001
;
warrior
->
dev
.
idversion
=
0x0100
;
warrior
->
dev
.
id
.
version
=
0x0100
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
warrior
->
dev
.
absmax
[
ABS_X
+
i
]
=
-
64
;
warrior
->
dev
.
absmax
[
ABS_X
+
i
]
=
-
64
;
...
...
drivers/input/keybdev.c
View file @
a2ea21bb
...
@@ -72,26 +72,6 @@ static unsigned short x86_keycodes[256] =
...
@@ -72,26 +72,6 @@ static unsigned short x86_keycodes[256] =
#ifdef CONFIG_MAC_EMUMOUSEBTN
#ifdef CONFIG_MAC_EMUMOUSEBTN
extern
int
mac_hid_mouse_emulate_buttons
(
int
,
int
,
int
);
extern
int
mac_hid_mouse_emulate_buttons
(
int
,
int
,
int
);
#endif
/* CONFIG_MAC_EMUMOUSEBTN */
#endif
/* CONFIG_MAC_EMUMOUSEBTN */
#ifdef CONFIG_MAC_ADBKEYCODES
extern
int
mac_hid_keyboard_sends_linux_keycodes
(
void
);
#else
#define mac_hid_keyboard_sends_linux_keycodes() 0
#endif
/* CONFIG_MAC_ADBKEYCODES */
#if defined(CONFIG_MAC_ADBKEYCODES) || defined(CONFIG_ADB_KEYBOARD)
static
unsigned
char
mac_keycodes
[
256
]
=
{
0
,
53
,
18
,
19
,
20
,
21
,
23
,
22
,
26
,
28
,
25
,
29
,
27
,
24
,
51
,
48
,
12
,
13
,
14
,
15
,
17
,
16
,
32
,
34
,
31
,
35
,
33
,
30
,
36
,
54
,
128
,
1
,
2
,
3
,
5
,
4
,
38
,
40
,
37
,
41
,
39
,
50
,
56
,
42
,
6
,
7
,
8
,
9
,
11
,
45
,
46
,
43
,
47
,
44
,
123
,
67
,
58
,
49
,
57
,
122
,
120
,
99
,
118
,
96
,
97
,
98
,
100
,
101
,
109
,
71
,
107
,
89
,
91
,
92
,
78
,
86
,
87
,
88
,
69
,
83
,
84
,
85
,
82
,
65
,
42
,
0
,
10
,
103
,
111
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
76
,
125
,
75
,
105
,
124
,
110
,
115
,
62
,
116
,
59
,
60
,
119
,
61
,
121
,
114
,
117
,
0
,
0
,
0
,
0
,
127
,
81
,
0
,
113
,
0
,
0
,
0
,
0
,
95
,
55
,
55
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
94
,
0
,
93
,
0
,
0
,
0
,
0
,
0
,
0
,
104
,
102
};
#endif
/* CONFIG_MAC_ADBKEYCODES || CONFIG_ADB_KEYBOARD */
static
int
emulate_raw
(
unsigned
int
keycode
,
int
down
)
static
int
emulate_raw
(
unsigned
int
keycode
,
int
down
)
{
{
...
@@ -99,15 +79,6 @@ static int emulate_raw(unsigned int keycode, int down)
...
@@ -99,15 +79,6 @@ static int emulate_raw(unsigned int keycode, int down)
if
(
mac_hid_mouse_emulate_buttons
(
1
,
keycode
,
down
))
if
(
mac_hid_mouse_emulate_buttons
(
1
,
keycode
,
down
))
return
0
;
return
0
;
#endif
/* CONFIG_MAC_EMUMOUSEBTN */
#endif
/* CONFIG_MAC_EMUMOUSEBTN */
#if defined(CONFIG_MAC_ADBKEYCODES) || defined(CONFIG_ADB_KEYBOARD)
if
(
!
mac_hid_keyboard_sends_linux_keycodes
())
{
if
(
keycode
>
255
||
!
mac_keycodes
[
keycode
])
return
-
1
;
handle_scancode
((
mac_keycodes
[
keycode
]
&
0x7f
),
down
);
return
0
;
}
#endif
/* CONFIG_MAC_ADBKEYCODES || CONFIG_ADB_KEYBOARD */
if
(
keycode
>
255
||
!
x86_keycodes
[
keycode
])
if
(
keycode
>
255
||
!
x86_keycodes
[
keycode
])
return
-
1
;
return
-
1
;
...
...
drivers/input/keyboard/amikbd.c
View file @
a2ea21bb
...
@@ -121,10 +121,10 @@ static int __init amikbd_init(void)
...
@@ -121,10 +121,10 @@ static int __init amikbd_init(void)
amikbd_dev
.
name
=
amikbd_name
;
amikbd_dev
.
name
=
amikbd_name
;
amikbd_dev
.
phys
=
amikbd_phys
;
amikbd_dev
.
phys
=
amikbd_phys
;
amikbd_dev
.
id
bus
=
BUS_AMIGA
;
amikbd_dev
.
id
.
bustype
=
BUS_AMIGA
;
amikbd_dev
.
idvendor
=
0x0001
;
amikbd_dev
.
id
.
vendor
=
0x0001
;
amikbd_dev
.
idproduct
=
0x0001
;
amikbd_dev
.
id
.
product
=
0x0001
;
amikbd_dev
.
idversion
=
0x0100
;
amikbd_dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
amikbd_dev
);
input_register_device
(
&
amikbd_dev
);
...
...
drivers/input/keyboard/atkbd.c
View file @
a2ea21bb
...
@@ -98,6 +98,7 @@ static unsigned char atkbd_set3_keycode[512] = {
...
@@ -98,6 +98,7 @@ static unsigned char atkbd_set3_keycode[512] = {
#define ATKBD_CMD_ENABLE 0x00f4
#define ATKBD_CMD_ENABLE 0x00f4
#define ATKBD_CMD_RESET_DIS 0x00f5
#define ATKBD_CMD_RESET_DIS 0x00f5
#define ATKBD_CMD_SETALL_MB 0x00f8
#define ATKBD_CMD_SETALL_MB 0x00f8
#define ATKBD_CMD_RESEND 0x00fe
#define ATKBD_CMD_EX_ENABLE 0x10ea
#define ATKBD_CMD_EX_ENABLE 0x10ea
#define ATKBD_CMD_EX_SETLEDS 0x20eb
#define ATKBD_CMD_EX_SETLEDS 0x20eb
...
@@ -141,9 +142,16 @@ static void atkbd_interrupt(struct serio *serio, unsigned char data, unsigned in
...
@@ -141,9 +142,16 @@ static void atkbd_interrupt(struct serio *serio, unsigned char data, unsigned in
int
code
=
data
;
int
code
=
data
;
#ifdef ATKBD_DEBUG
#ifdef ATKBD_DEBUG
printk
(
KERN_DEBUG
"atkbd.c: Received %02x
\n
"
,
data
);
printk
(
KERN_DEBUG
"atkbd.c: Received %02x
flags %02x
\n
"
,
data
,
flags
);
#endif
#endif
/* Interface error. Request that the keyboard resend. */
if
(
flags
&
(
SERIO_FRAME
|
SERIO_PARITY
))
{
printk
(
"atkbd.c: frame/parity error: %02x
\n
"
,
flags
);
serio_write
(
serio
,
ATKBD_CMD_RESEND
);
return
;
}
switch
(
code
)
{
switch
(
code
)
{
case
ATKBD_RET_ACK
:
case
ATKBD_RET_ACK
:
atkbd
->
ack
=
1
;
atkbd
->
ack
=
1
;
...
@@ -496,10 +504,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -496,10 +504,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
atkbd
->
dev
.
name
=
atkbd
->
name
;
atkbd
->
dev
.
name
=
atkbd
->
name
;
atkbd
->
dev
.
phys
=
atkbd
->
phys
;
atkbd
->
dev
.
phys
=
atkbd
->
phys
;
atkbd
->
dev
.
id
bus
=
BUS_I8042
;
atkbd
->
dev
.
id
.
bustype
=
BUS_I8042
;
atkbd
->
dev
.
idvendor
=
0x0001
;
atkbd
->
dev
.
id
.
vendor
=
0x0001
;
atkbd
->
dev
.
idproduct
=
atkbd
->
set
;
atkbd
->
dev
.
id
.
product
=
atkbd
->
set
;
atkbd
->
dev
.
idversion
=
atkbd
->
id
;
atkbd
->
dev
.
id
.
version
=
atkbd
->
id
;
for
(
i
=
0
;
i
<
512
;
i
++
)
for
(
i
=
0
;
i
<
512
;
i
++
)
if
(
atkbd
->
keycode
[
i
]
&&
atkbd
->
keycode
[
i
]
<=
250
)
if
(
atkbd
->
keycode
[
i
]
&&
atkbd
->
keycode
[
i
]
<=
250
)
...
@@ -520,14 +528,16 @@ static struct serio_dev atkbd_dev = {
...
@@ -520,14 +528,16 @@ static struct serio_dev atkbd_dev = {
disconnect:
atkbd_disconnect
disconnect:
atkbd_disconnect
};
};
/*
#ifndef MODULE
* Module init and exit.
static
int
__init
atkbd_setup
(
char
*
str
)
*/
void
__init
atkbd_setup
(
char
*
str
,
int
*
ints
)
{
{
if
(
!
ints
[
0
])
atkbd_set
=
ints
[
1
];
int
ints
[
4
];
str
=
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
if
(
ints
[
0
]
>
0
)
atkbd_set
=
ints
[
1
];
return
1
;
}
}
__setup
(
"atkbd_set="
,
atkbd_setup
);
#endif
int
__init
atkbd_init
(
void
)
int
__init
atkbd_init
(
void
)
{
{
...
...
drivers/input/keyboard/maple_keyb.c
View file @
a2ea21bb
...
@@ -132,7 +132,7 @@ static int dc_kbd_connect(struct maple_device *dev)
...
@@ -132,7 +132,7 @@ static int dc_kbd_connect(struct maple_device *dev)
kbd
->
dev
.
event
=
NULL
;
kbd
->
dev
.
event
=
NULL
;
kbd
->
dev
.
name
=
dev
->
product_name
;
kbd
->
dev
.
name
=
dev
->
product_name
;
kbd
->
dev
.
id
bus
=
BUS_MAPLE
;
kbd
->
dev
.
id
.
bustype
=
BUS_MAPLE
;
input_register_device
(
&
kbd
->
dev
);
input_register_device
(
&
kbd
->
dev
);
...
...
drivers/input/keyboard/newtonkbd.c
View file @
a2ea21bb
...
@@ -110,10 +110,10 @@ void nkbd_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -110,10 +110,10 @@ void nkbd_connect(struct serio *serio, struct serio_dev *dev)
nkbd
->
dev
.
name
=
nkbd_name
;
nkbd
->
dev
.
name
=
nkbd_name
;
nkbd
->
dev
.
phys
=
nkbd
->
phys
;
nkbd
->
dev
.
phys
=
nkbd
->
phys
;
nkbd
->
dev
.
id
bus
=
BUS_RS232
;
nkbd
->
dev
.
id
.
bustype
=
BUS_RS232
;
nkbd
->
dev
.
idvendor
=
SERIO_NEWTON
;
nkbd
->
dev
.
id
.
vendor
=
SERIO_NEWTON
;
nkbd
->
dev
.
idproduct
=
0x0001
;
nkbd
->
dev
.
id
.
product
=
0x0001
;
nkbd
->
dev
.
idversion
=
0x0100
;
nkbd
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
nkbd
->
dev
);
input_register_device
(
&
nkbd
->
dev
);
...
...
drivers/input/keyboard/ps2serkbd.c
View file @
a2ea21bb
...
@@ -246,10 +246,10 @@ static void ps2serkbd_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -246,10 +246,10 @@ static void ps2serkbd_connect(struct serio *serio, struct serio_dev *dev)
ps2serkbd
->
dev
.
name
=
ps2serkbd
->
name
;
ps2serkbd
->
dev
.
name
=
ps2serkbd
->
name
;
ps2serkbd
->
dev
.
phys
=
ps2serkbd
->
phys
;
ps2serkbd
->
dev
.
phys
=
ps2serkbd
->
phys
;
ps2serkbd
->
dev
.
id
bus
=
BUS_RS232
;
ps2serkbd
->
dev
.
id
.
bustype
=
BUS_RS232
;
ps2serkbd
->
dev
.
idvendor
=
SERIO_PS2SER
;
ps2serkbd
->
dev
.
id
.
vendor
=
SERIO_PS2SER
;
ps2serkbd
->
dev
.
idproduct
=
ps2serkbd
->
set
;
ps2serkbd
->
dev
.
id
.
product
=
ps2serkbd
->
set
;
ps2serkbd
->
dev
.
idversion
=
ps2serkbd
->
id
;
ps2serkbd
->
dev
.
id
.
version
=
ps2serkbd
->
id
;
for
(
i
=
0
;
i
<
512
;
i
++
)
for
(
i
=
0
;
i
<
512
;
i
++
)
if
(
ps2serkbd
->
keycode
[
i
]
&&
ps2serkbd
->
keycode
[
i
]
<=
250
)
if
(
ps2serkbd
->
keycode
[
i
]
&&
ps2serkbd
->
keycode
[
i
]
<=
250
)
...
...
drivers/input/keyboard/sunkbd.c
View file @
a2ea21bb
...
@@ -271,10 +271,10 @@ static void sunkbd_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -271,10 +271,10 @@ static void sunkbd_connect(struct serio *serio, struct serio_dev *dev)
sunkbd
->
dev
.
name
=
sunkbd
->
name
;
sunkbd
->
dev
.
name
=
sunkbd
->
name
;
sunkbd
->
dev
.
phys
=
sunkbd
->
phys
;
sunkbd
->
dev
.
phys
=
sunkbd
->
phys
;
sunkbd
->
dev
.
id
bus
=
BUS_RS232
;
sunkbd
->
dev
.
id
.
bustype
=
BUS_RS232
;
sunkbd
->
dev
.
idvendor
=
SERIO_SUNKBD
;
sunkbd
->
dev
.
id
.
vendor
=
SERIO_SUNKBD
;
sunkbd
->
dev
.
idproduct
=
sunkbd
->
type
;
sunkbd
->
dev
.
id
.
product
=
sunkbd
->
type
;
sunkbd
->
dev
.
idversion
=
0x0100
;
sunkbd
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
sunkbd
->
dev
);
input_register_device
(
&
sunkbd
->
dev
);
...
...
drivers/input/keyboard/xtkbd.c
View file @
a2ea21bb
...
@@ -118,10 +118,10 @@ void xtkbd_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -118,10 +118,10 @@ void xtkbd_connect(struct serio *serio, struct serio_dev *dev)
xtkbd
->
dev
.
name
=
xtkbd_name
;
xtkbd
->
dev
.
name
=
xtkbd_name
;
xtkbd
->
dev
.
phys
=
xtkbd
->
phys
;
xtkbd
->
dev
.
phys
=
xtkbd
->
phys
;
xtkbd
->
dev
.
id
bus
=
BUS_XTKBD
;
xtkbd
->
dev
.
id
.
bustype
=
BUS_XTKBD
;
xtkbd
->
dev
.
idvendor
=
0x0001
;
xtkbd
->
dev
.
id
.
vendor
=
0x0001
;
xtkbd
->
dev
.
idproduct
=
0x0001
;
xtkbd
->
dev
.
id
.
product
=
0x0001
;
xtkbd
->
dev
.
idversion
=
0x0100
;
xtkbd
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
xtkbd
->
dev
);
input_register_device
(
&
xtkbd
->
dev
);
...
...
drivers/input/mouse/amimouse.c
View file @
a2ea21bb
...
@@ -110,10 +110,10 @@ static int __init amimouse_init(void)
...
@@ -110,10 +110,10 @@ static int __init amimouse_init(void)
amimouse_dev
.
name
=
amimouse_name
;
amimouse_dev
.
name
=
amimouse_name
;
amimouse_dev
.
phys
=
amimouse_phys
;
amimouse_dev
.
phys
=
amimouse_phys
;
amimouse_dev
.
id
bus
=
BUS_AMIGA
;
amimouse_dev
.
id
.
bustype
=
BUS_AMIGA
;
amimouse_dev
.
idvendor
=
0x0001
;
amimouse_dev
.
id
.
vendor
=
0x0001
;
amimouse_dev
.
idproduct
=
0x0002
;
amimouse_dev
.
id
.
product
=
0x0002
;
amimouse_dev
.
idversion
=
0x0100
;
amimouse_dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
amimouse_dev
);
input_register_device
(
&
amimouse_dev
);
...
...
drivers/input/mouse/inport.c
View file @
a2ea21bb
...
@@ -115,10 +115,6 @@ static struct input_dev inport_dev = {
...
@@ -115,10 +115,6 @@ static struct input_dev inport_dev = {
close:
inport_close
,
close:
inport_close
,
name:
INPORT_NAME
,
name:
INPORT_NAME
,
phys:
"isa023c/input0"
,
phys:
"isa023c/input0"
,
idbus:
BUS_ISA
,
idvendor:
INPORT_VENDOR
,
idproduct:
0x0001
,
idversion:
0x0100
,
};
};
static
void
inport_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
inport_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
@@ -176,6 +172,11 @@ static int __init inport_init(void)
...
@@ -176,6 +172,11 @@ static int __init inport_init(void)
request_region
(
INPORT_BASE
,
INPORT_EXTENT
,
"inport"
);
request_region
(
INPORT_BASE
,
INPORT_EXTENT
,
"inport"
);
input_register_device
(
&
inport_dev
);
input_register_device
(
&
inport_dev
);
inport_dev
.
id
.
bustype
=
BUS_ISA
;
inport_dev
.
id
.
vendor
=
INPORT_VENDOR
;
inport_dev
.
id
.
product
=
0x0001
;
inport_dev
.
id
.
version
=
0x0100
;
printk
(
KERN_INFO
"input: "
INPORT_NAME
" at %#x irq %d
\n
"
,
printk
(
KERN_INFO
"input: "
INPORT_NAME
" at %#x irq %d
\n
"
,
INPORT_BASE
,
inport_irq
);
INPORT_BASE
,
inport_irq
);
...
...
drivers/input/mouse/logibm.c
View file @
a2ea21bb
...
@@ -105,10 +105,6 @@ static struct input_dev logibm_dev = {
...
@@ -105,10 +105,6 @@ static struct input_dev logibm_dev = {
close:
logibm_close
,
close:
logibm_close
,
name:
"Logitech bus mouse"
,
name:
"Logitech bus mouse"
,
phys:
"isa023c/input0"
,
phys:
"isa023c/input0"
,
idbus:
BUS_ISA
,
idvendor:
0x0003
,
idproduct:
0x0001
,
idversion:
0x0100
,
};
};
static
void
logibm_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
logibm_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
@@ -125,13 +121,14 @@ static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -125,13 +121,14 @@ static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
outb
(
LOGIBM_READ_Y_HIGH
,
LOGIBM_CONTROL_PORT
);
outb
(
LOGIBM_READ_Y_HIGH
,
LOGIBM_CONTROL_PORT
);
buttons
=
inb
(
LOGIBM_DATA_PORT
);
buttons
=
inb
(
LOGIBM_DATA_PORT
);
dy
|=
(
buttons
&
0xf
)
<<
4
;
dy
|=
(
buttons
&
0xf
)
<<
4
;
buttons
=
~
buttons
;
buttons
=
~
buttons
>>
5
;
input_report_rel
(
&
logibm_dev
,
REL_X
,
dx
);
input_report_rel
(
&
logibm_dev
,
REL_X
,
dx
);
input_report_rel
(
&
logibm_dev
,
REL_Y
,
255
-
dy
);
input_report_rel
(
&
logibm_dev
,
REL_Y
,
dy
);
input_report_key
(
&
logibm_dev
,
BTN_MIDDLE
,
buttons
&
1
);
input_report_key
(
&
logibm_dev
,
BTN_RIGHT
,
buttons
&
1
);
input_report_key
(
&
logibm_dev
,
BTN_LEFT
,
buttons
&
2
);
input_report_key
(
&
logibm_dev
,
BTN_MIDDLE
,
buttons
&
2
);
input_report_key
(
&
logibm_dev
,
BTN_RIGHT
,
buttons
&
4
);
input_report_key
(
&
logibm_dev
,
BTN_LEFT
,
buttons
&
4
);
outb
(
LOGIBM_ENABLE_IRQ
,
LOGIBM_CONTROL_PORT
);
}
}
#ifndef MODULE
#ifndef MODULE
...
@@ -147,7 +144,7 @@ __setup("logibm_irq=", logibm_setup);
...
@@ -147,7 +144,7 @@ __setup("logibm_irq=", logibm_setup);
static
int
__init
logibm_init
(
void
)
static
int
__init
logibm_init
(
void
)
{
{
if
(
request_region
(
LOGIBM_BASE
,
LOGIBM_EXTENT
,
"logibm"
))
{
if
(
!
request_region
(
LOGIBM_BASE
,
LOGIBM_EXTENT
,
"logibm"
))
{
printk
(
KERN_ERR
"logibm.c: Can't allocate ports at %#x
\n
"
,
LOGIBM_BASE
);
printk
(
KERN_ERR
"logibm.c: Can't allocate ports at %#x
\n
"
,
LOGIBM_BASE
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
...
@@ -166,6 +163,10 @@ static int __init logibm_init(void)
...
@@ -166,6 +163,10 @@ static int __init logibm_init(void)
outb
(
LOGIBM_DISABLE_IRQ
,
LOGIBM_CONTROL_PORT
);
outb
(
LOGIBM_DISABLE_IRQ
,
LOGIBM_CONTROL_PORT
);
input_register_device
(
&
logibm_dev
);
input_register_device
(
&
logibm_dev
);
logibm_dev
.
id
.
bustype
=
BUS_ISA
;
logibm_dev
.
id
.
vendor
=
0x0003
;
logibm_dev
.
id
.
product
=
0x0001
;
logibm_dev
.
id
.
version
=
0x0100
;
printk
(
KERN_INFO
"input: Logitech bus mouse at %#x irq %d
\n
"
,
LOGIBM_BASE
,
logibm_irq
);
printk
(
KERN_INFO
"input: Logitech bus mouse at %#x irq %d
\n
"
,
LOGIBM_BASE
,
logibm_irq
);
...
...
drivers/input/mouse/pc110pad.c
View file @
a2ea21bb
...
@@ -95,14 +95,14 @@ static int pc110pad_open(struct input_dev *dev)
...
@@ -95,14 +95,14 @@ static int pc110pad_open(struct input_dev *dev)
if
(
pc110pad_used
++
)
if
(
pc110pad_used
++
)
return
0
;
return
0
;
save_flags
(
flags
);
__
save_flags
(
flags
);
cli
();
__
cli
();
pc110pad_interrupt
(
0
,
0
,
0
);
pc110pad_interrupt
(
0
,
0
,
0
);
pc110pad_interrupt
(
0
,
0
,
0
);
pc110pad_interrupt
(
0
,
0
,
0
);
pc110pad_interrupt
(
0
,
0
,
0
);
pc110pad_interrupt
(
0
,
0
,
0
);
outb
(
PC110PAD_ON
,
pc110pad_io
+
2
);
outb
(
PC110PAD_ON
,
pc110pad_io
+
2
);
pc110pad_count
=
0
;
pc110pad_count
=
0
;
restore_flags
(
flags
);
__
restore_flags
(
flags
);
return
0
;
return
0
;
}
}
...
@@ -136,10 +136,10 @@ static int __init pc110pad_init(void)
...
@@ -136,10 +136,10 @@ static int __init pc110pad_init(void)
pc110pad_dev
.
name
=
pc110pad_name
;
pc110pad_dev
.
name
=
pc110pad_name
;
pc110pad_dev
.
phys
=
pc110pad_phys
;
pc110pad_dev
.
phys
=
pc110pad_phys
;
pc110pad_dev
.
id
bus
=
BUS_ISA
;
pc110pad_dev
.
id
.
bustype
=
BUS_ISA
;
pc110pad_dev
.
idvendor
=
0x0003
;
pc110pad_dev
.
id
.
vendor
=
0x0003
;
pc110pad_dev
.
idproduct
=
0x0001
;
pc110pad_dev
.
id
.
product
=
0x0001
;
pc110pad_dev
.
idversion
=
0x0100
;
pc110pad_dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
pc110pad_dev
);
input_register_device
(
&
pc110pad_dev
);
...
...
drivers/input/mouse/psmouse.c
View file @
a2ea21bb
...
@@ -142,7 +142,7 @@ static void psmouse_process_packet(struct psmouse *psmouse)
...
@@ -142,7 +142,7 @@ static void psmouse_process_packet(struct psmouse *psmouse)
*/
*/
if
(
psmouse
->
type
==
PSMOUSE_IMEX
)
{
if
(
psmouse
->
type
==
PSMOUSE_IMEX
)
{
input_report_rel
(
dev
,
REL_WHEEL
,
(
int
)
(
packet
[
3
]
&
7
)
-
(
int
)
(
packet
[
2
]
&
8
));
input_report_rel
(
dev
,
REL_WHEEL
,
(
int
)
(
packet
[
3
]
&
7
)
-
(
int
)
(
packet
[
3
]
&
8
));
input_report_key
(
dev
,
BTN_SIDE
,
(
packet
[
3
]
>>
4
)
&
1
);
input_report_key
(
dev
,
BTN_SIDE
,
(
packet
[
3
]
>>
4
)
&
1
);
input_report_key
(
dev
,
BTN_EXTRA
,
(
packet
[
3
]
>>
5
)
&
1
);
input_report_key
(
dev
,
BTN_EXTRA
,
(
packet
[
3
]
>>
5
)
&
1
);
}
}
...
@@ -600,10 +600,10 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -600,10 +600,10 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse
->
dev
.
name
=
psmouse
->
devname
;
psmouse
->
dev
.
name
=
psmouse
->
devname
;
psmouse
->
dev
.
phys
=
psmouse
->
phys
;
psmouse
->
dev
.
phys
=
psmouse
->
phys
;
psmouse
->
dev
.
id
bus
=
BUS_I8042
;
psmouse
->
dev
.
id
.
bustype
=
BUS_I8042
;
psmouse
->
dev
.
idvendor
=
psmouse
->
type
;
psmouse
->
dev
.
id
.
vendor
=
psmouse
->
type
;
psmouse
->
dev
.
idproduct
=
0x0002
;
psmouse
->
dev
.
id
.
product
=
0x0002
;
psmouse
->
dev
.
idversion
=
0x0100
;
psmouse
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
psmouse
->
dev
);
input_register_device
(
&
psmouse
->
dev
);
...
...
drivers/input/mouse/rpcmouse.c
View file @
a2ea21bb
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <linux/ptrace.h>
#include <linux/ptrace.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/input.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/irq.h>
...
@@ -40,10 +41,6 @@ static struct input_dev rpcmouse_dev = {
...
@@ -40,10 +41,6 @@ static struct input_dev rpcmouse_dev = {
relbit:
{
BIT
(
REL_X
)
|
BIT
(
REL_Y
)
},
relbit:
{
BIT
(
REL_X
)
|
BIT
(
REL_Y
)
},
name:
"Acorn RiscPC Mouse"
,
name:
"Acorn RiscPC Mouse"
,
phys:
"rpcmouse/input0"
,
phys:
"rpcmouse/input0"
,
idbus:
BUS_HOST
,
idvendor:
0x0005
,
idproduct:
0x0001
,
idversion:
0x0100
,
};
};
static
void
rpcmouse_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
rpcmouse_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
@@ -63,9 +60,9 @@ static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -63,9 +60,9 @@ static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
input_report_rel
(
&
rpcmouse_dev
,
REL_X
,
dx
);
input_report_rel
(
&
rpcmouse_dev
,
REL_X
,
dx
);
input_report_rel
(
&
rpcmouse_dev
,
REL_Y
,
dy
);
input_report_rel
(
&
rpcmouse_dev
,
REL_Y
,
dy
);
input_report_key
(
&
rpcmouse_dev
,
BTN_LEFT
,
b
uttons
&
0x10
);
input_report_key
(
&
rpcmouse_dev
,
BTN_LEFT
,
b
&
0x10
);
input_report_key
(
&
rpcmouse_dev
,
BTN_MIDDLE
,
b
uttons
&
0x20
);
input_report_key
(
&
rpcmouse_dev
,
BTN_MIDDLE
,
b
&
0x20
);
input_report_key
(
&
rpcmouse_dev
,
BTN_RIGHT
,
b
uttons
&
0x40
);
input_report_key
(
&
rpcmouse_dev
,
BTN_RIGHT
,
b
&
0x40
);
}
}
static
int
__init
rpcmouse_init
(
void
)
static
int
__init
rpcmouse_init
(
void
)
...
@@ -79,6 +76,11 @@ static int __init rpcmouse_init(void)
...
@@ -79,6 +76,11 @@ static int __init rpcmouse_init(void)
}
}
input_register_device
(
&
rpcmouse_dev
);
input_register_device
(
&
rpcmouse_dev
);
rpcmouse
.
id
.
bustype
=
BUS_HOST
,
rpcmouse
.
id
.
vendor
=
0x0005
,
rpcmouse
.
id
.
product
=
0x0001
,
rpcmouse
.
id
.
version
=
0x0100
,
printk
(
KERN_INFO
"input: Acorn RiscPC mouse irq %d"
,
IRQ_VSYNCPULSE
);
printk
(
KERN_INFO
"input: Acorn RiscPC mouse irq %d"
,
IRQ_VSYNCPULSE
);
return
0
;
return
0
;
...
...
drivers/input/mouse/sermouse.c
View file @
a2ea21bb
...
@@ -263,10 +263,10 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -263,10 +263,10 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
sermouse
->
dev
.
name
=
sermouse_protocols
[
sermouse
->
type
];
sermouse
->
dev
.
name
=
sermouse_protocols
[
sermouse
->
type
];
sermouse
->
dev
.
phys
=
sermouse
->
phys
;
sermouse
->
dev
.
phys
=
sermouse
->
phys
;
sermouse
->
dev
.
id
bus
=
BUS_RS232
;
sermouse
->
dev
.
id
.
bustype
=
BUS_RS232
;
sermouse
->
dev
.
idvendor
=
sermouse
->
type
;
sermouse
->
dev
.
id
.
vendor
=
sermouse
->
type
;
sermouse
->
dev
.
idproduct
=
c
;
sermouse
->
dev
.
id
.
product
=
c
;
sermouse
->
dev
.
idversion
=
0x0100
;
sermouse
->
dev
.
id
.
version
=
0x0100
;
if
(
serio_open
(
serio
,
dev
))
{
if
(
serio_open
(
serio
,
dev
))
{
kfree
(
sermouse
);
kfree
(
sermouse
);
...
...
drivers/input/serio/Config.in
View file @
a2ea21bb
...
@@ -12,9 +12,17 @@ if [ "$CONFIG_SERIO_I8042" != "n" ]; then
...
@@ -12,9 +12,17 @@ if [ "$CONFIG_SERIO_I8042" != "n" ]; then
fi
fi
dep_tristate ' Serial port line discipline' CONFIG_SERIO_SERPORT $CONFIG_SERIO
dep_tristate ' Serial port line discipline' CONFIG_SERIO_SERPORT $CONFIG_SERIO
dep_tristate ' ct82c710 Aux port controller' CONFIG_SERIO_CT82C710 $CONFIG_SERIO
dep_tristate ' ct82c710 Aux port controller' CONFIG_SERIO_CT82C710 $CONFIG_SERIO
dep_tristate ' Q40 keyboard controller' CONFIG_SERIO_Q40KBD $CONFIG_SERIO
if [ "$CONFIG_Q40" = "y" ]; then
dep_tristate ' Q40 keyboard controller' CONFIG_SERIO_Q40KBD $CONFIG_SERIO
fi
dep_tristate ' Parallel port keyboard adapter' CONFIG_SERIO_PARKBD $CONFIG_SERIO $CONFIG_PARPORT
dep_tristate ' Parallel port keyboard adapter' CONFIG_SERIO_PARKBD $CONFIG_SERIO $CONFIG_PARPORT
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
dep_tristate ' Acorn RiscPC keyboard controller' CONFIG_SERIO_ACORN $CONFIG_SERIO
dep_tristate ' Acorn RiscPC keyboard controller' CONFIG_SERIO_ACORN $CONFIG_SERIO
fi
fi
if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
dep_tristate ' AMBA KMI keyboard controller' CONFIG_SERIO_AMBAKMI $CONFIG_SERIO
fi
if [ "$CONFIG_SA1111" = "y" ]; then
dep_tristate ' Intel SA1111 keyboard controller' CONFIG_SERIO_SA1111 $CONFIG_SERIO
fi
drivers/input/serio/Makefile
View file @
a2ea21bb
...
@@ -14,6 +14,8 @@ obj-$(CONFIG_SERIO_PARKBD) += parkbd.o
...
@@ -14,6 +14,8 @@ obj-$(CONFIG_SERIO_PARKBD) += parkbd.o
obj-$(CONFIG_SERIO_SERPORT)
+=
serport.o
obj-$(CONFIG_SERIO_SERPORT)
+=
serport.o
obj-$(CONFIG_SERIO_CT82C710)
+=
ct82c710.o
obj-$(CONFIG_SERIO_CT82C710)
+=
ct82c710.o
obj-$(CONFIG_SERIO_RPCKBD)
+=
rpckbd.o
obj-$(CONFIG_SERIO_RPCKBD)
+=
rpckbd.o
obj-$(CONFIG_SERIO_SA1111)
+=
sa1111ps2.o
obj-$(CONFIG_SERIO_AMBAKMI)
+=
ambakmi.o
obj-$(CONFIG_SERIO_Q40KBD)
+=
q40kbd.o
obj-$(CONFIG_SERIO_Q40KBD)
+=
q40kbd.o
# The global Rules.make.
# The global Rules.make.
...
...
drivers/input/serio/ambakmi.c
0 → 100644
View file @
a2ea21bb
/*
* linux/drivers/input/serio/amba_kmi.c
*
* Copyright (C) 2000 Deep Blue Solutions Ltd.
* Copyright (C) 2002 Russell King.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serio.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/hardware/amba_kmi.h>
#include <asm/mach/amba_kmi.h>
extern
struct
pt_regs
*
kbd_pt_regs
;
#define KMI_BASE (kmi->base)
struct
amba_kmi_port
{
struct
serio
io
;
struct
amba_kmi_port
*
next
;
unsigned
long
base
;
unsigned
int
irq
;
unsigned
int
divisor
;
char
name
[
32
];
char
phys
[
16
];
};
static
void
amba_kmi_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
amba_kmi_port
*
kmi
=
dev_id
;
unsigned
int
status
=
__raw_readb
(
KMIIR
);
kbd_pt_regs
=
regs
;
while
(
status
&
KMIIR_RXINTR
)
{
serio_interrupt
(
&
kmi
->
io
,
__raw_readb
(
KMIDATA
),
0
);
status
=
__raw_readb
(
KMIIR
);
}
}
static
int
amba_kmi_write
(
struct
serio
*
io
,
unsigned
char
val
)
{
struct
amba_kmi_port
*
kmi
=
io
->
driver
;
unsigned
int
timeleft
=
10000
;
/* timeout in 100ms */
while
((
__raw_readb
(
KMISTAT
)
&
KMISTAT_TXEMPTY
)
==
0
&&
timeleft
--
)
udelay
(
10
);
if
(
timeleft
)
__raw_writeb
(
val
,
KMIDATA
);
return
timeleft
?
0
:
SERIO_TIMEOUT
;
}
static
int
amba_kmi_open
(
struct
serio
*
io
)
{
struct
amba_kmi_port
*
kmi
=
io
->
driver
;
int
ret
;
__raw_writeb
(
kmi
->
divisor
,
KMICLKDIV
);
__raw_writeb
(
KMICR_EN
,
KMICR
);
ret
=
request_irq
(
kmi
->
irq
,
amba_kmi_int
,
0
,
kmi
->
phys
,
kmi
);
if
(
ret
)
{
printk
(
KERN_ERR
"kmi: failed to claim IRQ%d
\n
"
,
kmi
->
irq
);
__raw_writeb
(
0
,
KMICR
);
return
ret
;
}
__raw_writeb
(
KMICR_EN
|
KMICR_RXINTREN
,
KMICR
);
return
0
;
}
static
void
amba_kmi_close
(
struct
serio
*
io
)
{
struct
amba_kmi_port
*
kmi
=
io
->
driver
;
free_irq
(
kmi
->
irq
,
kmi
);
__raw_writeb
(
0
,
KMICR
);
}
static
struct
amba_kmi_port
*
list
;
static
int
__init
amba_kmi_init_one
(
char
*
type
,
unsigned
long
base
,
int
irq
,
int
nr
)
{
struct
amba_kmi_port
*
kmi
;
kmi
=
kmalloc
(
sizeof
(
struct
amba_kmi_port
),
GFP_KERNEL
);
if
(
!
kmi
)
return
-
ENOMEM
;
memset
(
kmi
,
0
,
sizeof
(
struct
amba_kmi_port
));
kmi
->
io
.
type
=
SERIO_8042
;
kmi
->
io
.
write
=
amba_kmi_write
;
kmi
->
io
.
open
=
amba_kmi_open
;
kmi
->
io
.
close
=
amba_kmi_close
;
kmi
->
io
.
name
=
kmi
->
name
;
kmi
->
io
.
phys
=
kmi
->
phys
;
kmi
->
io
.
driver
=
kmi
;
kmi
->
base
=
base
;
kmi
->
irq
=
irq
;
kmi
->
divisor
=
24
/
8
-
1
;
kmi
->
next
=
list
;
list
=
kmi
;
snprintf
(
kmi
->
name
,
sizeof
(
kmi
->
name
),
"AMBA KMI PS/2 %s port"
,
type
);
snprintf
(
kmi
->
phys
,
sizeof
(
kmi
->
phys
),
"amba/serio%d"
,
nr
);
serio_register_port
(
&
kmi
->
io
);
return
0
;
}
static
int
__init
amba_kmi_init
(
void
)
{
amba_kmi_init_one
(
"keyboard"
,
IO_ADDRESS
(
KMI0_BASE
),
IRQ_KMIINT0
,
0
);
amba_kmi_init_one
(
"mouse"
,
IO_ADDRESS
(
KMI1_BASE
),
IRQ_KMIINT1
,
1
);
return
0
;
}
static
void
__exit
amba_kmi_exit
(
void
)
{
struct
amba_kmi_port
*
kmi
,
*
next
;
kmi
=
list
;
while
(
kmi
)
{
next
=
kmi
->
next
;
serio_unregister_port
(
&
kmi
->
io
);
kfree
(
kmi
);
kmi
=
next
;
}
}
module_init
(
amba_kmi_init
);
module_exit
(
amba_kmi_exit
);
MODULE_AUTHOR
(
"Russell King <rmk@arm.linux.org.uk>"
);
MODULE_DESCRIPTION
(
"AMBA KMI controller driver"
);
MODULE_LICENSE
(
"GPL"
);
drivers/input/serio/i8042-ppcio.h
View file @
a2ea21bb
...
@@ -18,6 +18,9 @@
...
@@ -18,6 +18,9 @@
extern
void
*
kb_cs
;
extern
void
*
kb_cs
;
extern
void
*
kb_data
;
extern
void
*
kb_data
;
#define I8042_COMMAND_REG (*(int *)kb_cs)
#define I8042_DATA_REG (*(int *)kb_data)
static
inline
int
i8042_read_data
(
void
)
static
inline
int
i8042_read_data
(
void
)
{
{
return
readb
(
kb_data
);
return
readb
(
kb_data
);
...
@@ -57,6 +60,9 @@ static inline void i8042_platform_exit(void)
...
@@ -57,6 +60,9 @@ static inline void i8042_platform_exit(void)
#define I8042_KBD_PHYS_DESC "spruceps2/serio0"
#define I8042_KBD_PHYS_DESC "spruceps2/serio0"
#define I8042_AUX_PHYS_DESC "spruceps2/serio1"
#define I8042_AUX_PHYS_DESC "spruceps2/serio1"
#define I8042_COMMAND_REG 0xff810000
#define I8042_DATA_REG 0xff810001
static
inline
int
i8042_read_data
(
void
)
static
inline
int
i8042_read_data
(
void
)
{
{
unsigned
long
kbd_data
;
unsigned
long
kbd_data
;
...
...
drivers/input/serio/i8042.c
View file @
a2ea21bb
...
@@ -31,11 +31,13 @@ MODULE_PARM(i8042_noaux, "1i");
...
@@ -31,11 +31,13 @@ MODULE_PARM(i8042_noaux, "1i");
MODULE_PARM
(
i8042_unlock
,
"1i"
);
MODULE_PARM
(
i8042_unlock
,
"1i"
);
MODULE_PARM
(
i8042_reset
,
"1i"
);
MODULE_PARM
(
i8042_reset
,
"1i"
);
MODULE_PARM
(
i8042_direct
,
"1i"
);
MODULE_PARM
(
i8042_direct
,
"1i"
);
MODULE_PARM
(
i8042_restore_ctr
,
"1i"
);
static
int
i8042_noaux
;
static
int
i8042_noaux
;
static
int
i8042_unlock
;
static
int
i8042_unlock
;
static
int
i8042_reset
;
static
int
i8042_reset
;
static
int
i8042_direct
;
static
int
i8042_direct
;
static
int
i8042_restore_ctr
;
spinlock_t
i8042_lock
=
SPIN_LOCK_UNLOCKED
;
spinlock_t
i8042_lock
=
SPIN_LOCK_UNLOCKED
;
...
@@ -111,8 +113,9 @@ static int i8042_flush(void)
...
@@ -111,8 +113,9 @@ static int i8042_flush(void)
while
((
i8042_read_status
()
&
I8042_STR_OBF
)
&&
(
i
++
<
I8042_BUFFER_SIZE
))
while
((
i8042_read_status
()
&
I8042_STR_OBF
)
&&
(
i
++
<
I8042_BUFFER_SIZE
))
#ifdef I8042_DEBUG_IO
#ifdef I8042_DEBUG_IO
printk
(
KERN_DEBUG
"i8042.c: %02x <- i8042 (flush) [%d]
\n
"
,
printk
(
KERN_DEBUG
"i8042.c: %02x <- i8042 (flush, %s) [%d]
\n
"
,
i8042_read_data
(),
(
int
)
(
jiffies
-
i8042_start
));
i8042_read_data
(),
i8042_read_status
()
&
I8042_STR_AUXDATA
?
"aux"
:
"kbd"
,
(
int
)
(
jiffies
-
i8042_start
));
#else
#else
i8042_read_data
();
i8042_read_data
();
#endif
#endif
...
@@ -123,11 +126,11 @@ static int i8042_flush(void)
...
@@ -123,11 +126,11 @@ static int i8042_flush(void)
}
}
/*
/*
* i8042_command() executes a command on the i8042. It also sends the input
parameter(s)
* i8042_command() executes a command on the i8042. It also sends the input
*
of the commands to it, and receives the output value(s). The parameters are to b
e
*
parameter(s) of the commands to it, and receives the output value(s). Th
e
*
stored in the param array, and the output is placed into the same array. The number
*
parameters are to be stored in the param array, and the output is placed
*
of the parameters and output values is encoded in bits 8-11 of the command
*
into the same array. The number of the parameters and output values is
* number.
*
encoded in bits 8-11 of the command
number.
*/
*/
static
int
i8042_command
(
unsigned
char
*
param
,
int
command
)
static
int
i8042_command
(
unsigned
char
*
param
,
int
command
)
...
@@ -182,9 +185,6 @@ static int i8042_command(unsigned char *param, int command)
...
@@ -182,9 +185,6 @@ static int i8042_command(unsigned char *param, int command)
/*
/*
* i8042_kbd_write() sends a byte out through the keyboard interface.
* i8042_kbd_write() sends a byte out through the keyboard interface.
* It also automatically refreshes the CTR value, since some i8042's
* trash their CTR after attempting to send data to an nonexistent
* device.
*/
*/
static
int
i8042_kbd_write
(
struct
serio
*
port
,
unsigned
char
c
)
static
int
i8042_kbd_write
(
struct
serio
*
port
,
unsigned
char
c
)
...
@@ -222,10 +222,11 @@ static int i8042_aux_write(struct serio *port, unsigned char c)
...
@@ -222,10 +222,11 @@ static int i8042_aux_write(struct serio *port, unsigned char c)
retval
=
i8042_command
(
&
c
,
I8042_CMD_AUX_SEND
);
retval
=
i8042_command
(
&
c
,
I8042_CMD_AUX_SEND
);
/*
/*
* Here we restore the CTR value
. I don't know why, but i8042's in half-AT
* Here we restore the CTR value
if requested. I don't know why, but i8042's in
*
mode tend to trash their CTR when doing the AUX_SEND command.
*
half-AT mode tend to trash their CTR when doing the AUX_SEND command.
*/
*/
if
(
i8042_restore_ctr
)
retval
|=
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
);
retval
|=
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
);
/*
/*
...
@@ -240,16 +241,14 @@ static int i8042_aux_write(struct serio *port, unsigned char c)
...
@@ -240,16 +241,14 @@ static int i8042_aux_write(struct serio *port, unsigned char c)
/*
/*
* i8042_open() is called when a port is open by the higher layer.
* i8042_open() is called when a port is open by the higher layer.
* It allocates
an interrupt and enables the port
.
* It allocates
the interrupt and enables in in the chip
.
*/
*/
static
int
i8042_open
(
struct
serio
*
port
)
static
int
i8042_open
(
struct
serio
*
port
)
{
{
struct
i8042_values
*
values
=
port
->
driver
;
struct
i8042_values
*
values
=
port
->
driver
;
/*
i8042_flush
();
* Allocate the interrupt
*/
if
(
request_irq
(
values
->
irq
,
i8042_interrupt
,
0
,
"i8042"
,
NULL
))
{
if
(
request_irq
(
values
->
irq
,
i8042_interrupt
,
0
,
"i8042"
,
NULL
))
{
printk
(
KERN_ERR
"i8042.c: Can't get irq %d for %s, unregistering the port.
\n
"
,
values
->
irq
,
values
->
name
);
printk
(
KERN_ERR
"i8042.c: Can't get irq %d for %s, unregistering the port.
\n
"
,
values
->
irq
,
values
->
name
);
...
@@ -258,10 +257,6 @@ static int i8042_open(struct serio *port)
...
@@ -258,10 +257,6 @@ static int i8042_open(struct serio *port)
return
-
1
;
return
-
1
;
}
}
/*
* Enable the interrupt.
*/
i8042_ctr
|=
values
->
irqen
;
i8042_ctr
|=
values
->
irqen
;
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
))
{
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
))
{
...
@@ -269,22 +264,21 @@ static int i8042_open(struct serio *port)
...
@@ -269,22 +264,21 @@ static int i8042_open(struct serio *port)
return
-
1
;
return
-
1
;
}
}
i8042_interrupt
(
0
,
NULL
,
NULL
);
return
0
;
return
0
;
}
}
/*
/*
* i8042_close() frees the interrupt, and disables the interface when the
* i8042_close() frees the interrupt, so that it can possibly be used
* upper layer doesn't need it anymore.
* by another driver. We never know - if the user doesn't have a mouse,
* the BIOS could have used the AUX interupt for PCI.
*/
*/
static
void
i8042_close
(
struct
serio
*
port
)
static
void
i8042_close
(
struct
serio
*
port
)
{
{
struct
i8042_values
*
values
=
port
->
driver
;
struct
i8042_values
*
values
=
port
->
driver
;
/*
* Disable the interrupt.
*/
i8042_ctr
&=
~
values
->
irqen
;
i8042_ctr
&=
~
values
->
irqen
;
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
))
{
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
))
{
...
@@ -292,11 +286,9 @@ static void i8042_close(struct serio *port)
...
@@ -292,11 +286,9 @@ static void i8042_close(struct serio *port)
return
;
return
;
}
}
/*
* Free the interrupt
*/
free_irq
(
values
->
irq
,
NULL
);
free_irq
(
values
->
irq
,
NULL
);
i8042_flush
();
}
}
/*
/*
...
@@ -362,7 +354,7 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -362,7 +354,7 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
((
str
&
I8042_STR_TIMEOUT
)
?
SERIO_TIMEOUT
:
0
);
((
str
&
I8042_STR_TIMEOUT
)
?
SERIO_TIMEOUT
:
0
);
#ifdef I8042_DEBUG_IO
#ifdef I8042_DEBUG_IO
printk
(
KERN_DEBUG
"i8042.c: %02x <- i8042 (interrupt
-
%s, %d) [%d]
\n
"
,
printk
(
KERN_DEBUG
"i8042.c: %02x <- i8042 (interrupt
,
%s, %d) [%d]
\n
"
,
data
,
(
str
&
I8042_STR_AUXDATA
)
?
"aux"
:
"kbd"
,
irq
,
(
int
)
(
jiffies
-
i8042_start
));
data
,
(
str
&
I8042_STR_AUXDATA
)
?
"aux"
:
"kbd"
,
irq
,
(
int
)
(
jiffies
-
i8042_start
));
#endif
#endif
...
@@ -391,22 +383,13 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -391,22 +383,13 @@ static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/*
/*
* i8042_controller init initializes the i8042 controller, and,
* i8042_controller init initializes the i8042 controller, and,
* most importantly, sets it into non-xlated mode.
* most importantly, sets it into non-xlated mode if that's
* desired.
*/
*/
static
int
__init
i8042_controller_init
(
void
)
static
int
__init
i8042_controller_init
(
void
)
{
{
/*
* Check the i/o region before we touch it.
*/
#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__)
if
(
check_region
(
I8042_DATA_REG
,
16
))
{
printk
(
KERN_ERR
"i8042.c: %#x port already in use!
\n
"
,
I8042_DATA_REG
);
return
-
1
;
}
#endif
/*
/*
* Test the i8042. We need to know if it thinks it's working correctly
* Test the i8042. We need to know if it thinks it's working correctly
* before doing anything else.
* before doing anything else.
...
@@ -431,7 +414,7 @@ static int __init i8042_controller_init(void)
...
@@ -431,7 +414,7 @@ static int __init i8042_controller_init(void)
}
}
/*
/*
*
Read the CTR
.
*
Save the CTR for restoral on unload / reboot
.
*/
*/
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_RCTR
))
{
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_RCTR
))
{
...
@@ -439,14 +422,10 @@ static int __init i8042_controller_init(void)
...
@@ -439,14 +422,10 @@ static int __init i8042_controller_init(void)
return
-
1
;
return
-
1
;
}
}
/*
* Save the CTR for restoral on unload / reboot.
*/
i8042_initial_ctr
=
i8042_ctr
;
i8042_initial_ctr
=
i8042_ctr
;
/*
/*
* Disable
both interfaces and their interrupts.
* Disable
the keyboard interface and interrupt.
*/
*/
i8042_ctr
|=
I8042_CTR_KBDDIS
;
i8042_ctr
|=
I8042_CTR_KBDDIS
;
...
@@ -625,7 +604,16 @@ static int __init i8042_check_aux(struct i8042_values *values, struct serio *por
...
@@ -625,7 +604,16 @@ static int __init i8042_check_aux(struct i8042_values *values, struct serio *por
static
int
__init
i8042_port_register
(
struct
i8042_values
*
values
,
struct
serio
*
port
)
static
int
__init
i8042_port_register
(
struct
i8042_values
*
values
,
struct
serio
*
port
)
{
{
values
->
exists
=
1
;
values
->
exists
=
1
;
i8042_ctr
&=
~
values
->
disable
;
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
))
{
printk
(
KERN_WARNING
"i8042.c: Can't write CTR while registering.
\n
"
);
return
-
1
;
}
serio_register_port
(
port
);
serio_register_port
(
port
);
printk
(
KERN_INFO
"serio: i8042 %s port at %#x,%#x irq %d
\n
"
,
printk
(
KERN_INFO
"serio: i8042 %s port at %#x,%#x irq %d
\n
"
,
values
->
name
,
I8042_DATA_REG
,
I8042_COMMAND_REG
,
values
->
irq
);
values
->
name
,
I8042_DATA_REG
,
I8042_COMMAND_REG
,
values
->
irq
);
...
@@ -638,45 +626,45 @@ static void i8042_timer_func(unsigned long data)
...
@@ -638,45 +626,45 @@ static void i8042_timer_func(unsigned long data)
mod_timer
(
&
i8042_timer
,
jiffies
+
I8042_POLL_PERIOD
);
mod_timer
(
&
i8042_timer
,
jiffies
+
I8042_POLL_PERIOD
);
}
}
static
void
__init
i8042_start_polling
(
void
)
#ifndef MODULE
static
int
__init
i8042_setup_reset
(
char
*
str
)
{
{
i8042_ctr
&=
~
I8042_CTR_KBDDIS
;
i8042_reset
=
1
;
if
(
i8042_aux_values
.
exists
)
return
1
;
i8042_ctr
&=
~
I8042_CTR_AUXDIS
;
if
(
i8042_command
(
&
i8042_ctr
,
I8042_CMD_CTL_WCTR
))
{
printk
(
KERN_WARNING
"i8042.c: Can't write CTR while starting polling.
\n
"
);
return
;
}
i8042_timer
.
function
=
i8042_timer_func
;
mod_timer
(
&
i8042_timer
,
jiffies
+
I8042_POLL_PERIOD
);
}
}
static
int
__init
i8042_setup_noaux
(
char
*
str
)
static
void
__exit
i8042_stop_polling
(
void
)
{
{
del_timer
(
&
i8042_timer
);
i8042_noaux
=
1
;
return
1
;
}
}
static
int
__init
i8042_setup_unlock
(
char
*
str
)
/*
* Module init and cleanup functions.
*/
void
__init
i8042_setup
(
char
*
str
,
int
*
ints
)
{
{
if
(
!
strcmp
(
str
,
"i8042_reset=1"
))
i8042_reset
=
1
;
if
(
!
strcmp
(
str
,
"i8042_noaux=1"
))
i8042_noaux
=
1
;
if
(
!
strcmp
(
str
,
"i8042_unlock=1"
))
i8042_unlock
=
1
;
i8042_unlock
=
1
;
if
(
!
strcmp
(
str
,
"i8042_direct=1"
))
return
1
;
}
static
int
__init
i8042_setup_direct
(
char
*
str
)
{
i8042_direct
=
1
;
i8042_direct
=
1
;
return
1
;
}
static
int
__init
i8042_setup_restore_ctr
(
char
*
str
)
{
i8042_restore_ctr
=
1
;
return
1
;
}
}
__setup
(
"i8042_reset"
,
i8042_setup_reset
);
__setup
(
"i8042_noaux"
,
i8042_setup_noaux
);
__setup
(
"i8042_unlock"
,
i8042_setup_unlock
);
__setup
(
"i8042_direct"
,
i8042_setup_direct
);
__setup
(
"i8042_restore_ctr"
,
i8042_setup_restore_ctr
);
#endif
/*
/*
* Reset the 8042 back to original mode.
* We need to reset the 8042 back to original mode on system shutdown,
* because otherwise BIOSes will be confused.
*/
*/
static
int
i8042_notify_sys
(
struct
notifier_block
*
this
,
unsigned
long
code
,
static
int
i8042_notify_sys
(
struct
notifier_block
*
this
,
unsigned
long
code
,
void
*
unused
)
void
*
unused
)
{
{
...
@@ -698,18 +686,23 @@ int __init i8042_init(void)
...
@@ -698,18 +686,23 @@ int __init i8042_init(void)
i8042_start
=
jiffies
;
i8042_start
=
jiffies
;
#endif
#endif
#if !defined(__i386__) && !defined(__x86_64__)
i8042_reset
=
1
;
#endif
if
(
!
i8042_platform_init
())
if
(
!
i8042_platform_init
())
return
-
EBUSY
;
return
-
EBUSY
;
if
(
i8042_controller_init
())
if
(
i8042_controller_init
())
return
-
ENODEV
;
return
-
ENODEV
;
i8042_port_register
(
&
i8042_kbd_values
,
&
i8042_kbd_port
);
if
(
!
i8042_noaux
&&
!
i8042_check_aux
(
&
i8042_aux_values
,
&
i8042_aux_port
))
if
(
!
i8042_noaux
&&
!
i8042_check_aux
(
&
i8042_aux_values
,
&
i8042_aux_port
))
i8042_port_register
(
&
i8042_aux_values
,
&
i8042_aux_port
);
i8042_port_register
(
&
i8042_aux_values
,
&
i8042_aux_port
);
i8042_start_polling
();
i8042_port_register
(
&
i8042_kbd_values
,
&
i8042_kbd_port
);
i8042_timer
.
function
=
i8042_timer_func
;
mod_timer
(
&
i8042_timer
,
jiffies
+
I8042_POLL_PERIOD
);
register_reboot_notifier
(
&
i8042_notifier
);
register_reboot_notifier
(
&
i8042_notifier
);
...
@@ -720,7 +713,7 @@ void __exit i8042_exit(void)
...
@@ -720,7 +713,7 @@ void __exit i8042_exit(void)
{
{
unregister_reboot_notifier
(
&
i8042_notifier
);
unregister_reboot_notifier
(
&
i8042_notifier
);
i8042_stop_polling
(
);
del_timer
(
&
i8042_timer
);
if
(
i8042_kbd_values
.
exists
)
if
(
i8042_kbd_values
.
exists
)
serio_unregister_port
(
&
i8042_kbd_port
);
serio_unregister_port
(
&
i8042_kbd_port
);
...
@@ -735,3 +728,5 @@ void __exit i8042_exit(void)
...
@@ -735,3 +728,5 @@ void __exit i8042_exit(void)
module_init
(
i8042_init
);
module_init
(
i8042_init
);
module_exit
(
i8042_exit
);
module_exit
(
i8042_exit
);
drivers/input/serio/rpckbd.c
View file @
a2ea21bb
...
@@ -47,8 +47,10 @@ MODULE_LICENSE("GPL");
...
@@ -47,8 +47,10 @@ MODULE_LICENSE("GPL");
static
inline
void
rpckbd_write
(
unsigned
char
val
)
static
inline
void
rpckbd_write
(
unsigned
char
val
)
{
{
while
(
!
(
inb
(
IOMD_KCTRL
)
&
(
1
<<
7
)));
while
(
!
(
iomd_readb
(
IOMD_KCTRL
)
&
(
1
<<
7
)))
outb
(
val
,
IOMD_KARTTX
);
cpu_relax
();
iomd_writeb
(
val
,
IOMD_KARTTX
);
}
}
static
struct
serio
rpckbd_port
=
static
struct
serio
rpckbd_port
=
...
@@ -61,11 +63,14 @@ static struct serio rpckbd_port =
...
@@ -61,11 +63,14 @@ static struct serio rpckbd_port =
static
void
rpckbd_rx
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
rpckbd_rx
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
unsigned
int
byte
;
kbd_pt_regs
=
regs
;
kbd_pt_regs
=
regs
;
while
(
i
nb
(
IOMD_KCTRL
)
&
(
1
<<
5
))
while
(
i
omd_readb
(
IOMD_KCTRL
)
&
(
1
<<
5
))
{
serio_interrupt
(
&
rpckbd_port
,
inb
(
IOMD_KARTRX
),
0
);
byte
=
iomd_readb
(
IOMD_KARTRX
);
serio_interrupt
(
&
rpckbd_port
,
byte
,
0
);
}
}
}
static
void
rpckbd_tx
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
void
rpckbd_tx
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
@@ -74,13 +79,10 @@ static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -74,13 +79,10 @@ static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs)
static
int
__init
rpckbd_init
(
void
)
static
int
__init
rpckbd_init
(
void
)
{
{
unsigned
long
flags
;
/* Reset the keyboard state machine. */
/* Reset the keyboard state machine. */
outb
(
0
,
IOMD_KCTRL
);
iomd_writeb
(
0
,
IOMD_KCTRL
);
outb
(
8
,
IOMD_KCTRL
);
iomd_writeb
(
8
,
IOMD_KCTRL
);
iomd_readb
(
IOMD_KARTRX
);
save_flags_cli
(
flags
);
if
(
request_irq
(
IRQ_KEYBOARDRX
,
rpckbd_rx
,
0
,
"rpckbd"
,
NULL
)
!=
0
)
{
if
(
request_irq
(
IRQ_KEYBOARDRX
,
rpckbd_rx
,
0
,
"rpckbd"
,
NULL
)
!=
0
)
{
printk
(
KERN_ERR
"rpckbd.c: Could not allocate keyboard receive IRQ!
\n
"
)
printk
(
KERN_ERR
"rpckbd.c: Could not allocate keyboard receive IRQ!
\n
"
)
...
@@ -93,14 +95,7 @@ static int __init rpckbd_init(void)
...
@@ -93,14 +95,7 @@ static int __init rpckbd_init(void)
return
-
EBUSY
;
return
-
EBUSY
;
}
}
disable_irq
(
IRQ_KEYBOARDTX
);
(
void
)
IOMD_KARTRX
;
restore_flags
(
flags
);
register_serio_port
(
&
rpckbd_port
);
register_serio_port
(
&
rpckbd_port
);
printk
(
KERN_INFO
"serio: RiscPC PS/2 kbd port irq %d %d
\n
"
,
IRQ_KEYBOARDRX
,
IRQ_KEYBOARDTX
);
return
0
;
return
0
;
}
}
...
...
drivers/input/serio/sa1111ps2.c
0 → 100644
View file @
a2ea21bb
/*
* linux/drivers/input/serio/sa1111ps2.c
*
* Copyright (C) 2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serio.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <asm/hardware/sa1111.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/system.h>
extern
struct
pt_regs
*
kbd_pt_regs
;
struct
ps2if
{
struct
serio
io
;
struct
resource
*
res
;
unsigned
long
base
;
unsigned
int
irq
;
unsigned
int
skpcr_mask
;
};
/*
* Read all bytes waiting in the PS2 port. There should be
* at the most one, but we loop for safety. If there was a
* framing error, we have to manually clear the status.
*/
static
void
ps2_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
ps2if
*
sa
=
dev_id
;
unsigned
int
scancode
,
flag
,
status
;
kbd_pt_regs
=
regs
;
status
=
sa1111_readl
(
sa
->
base
+
SA1111_PS2STAT
);
while
(
status
&
PS2STAT_RXF
)
{
if
(
status
&
PS2STAT_STP
)
sa1111_writel
(
PS2STAT_STP
,
sa
->
base
+
SA1111_PS2STAT
);
flag
=
(
status
&
PS2STAT_STP
?
SERIO_FRAME
:
0
)
|
(
status
&
PS2STAT_RXP
?
0
:
SERIO_PARITY
);
scancode
=
sa1111_readl
(
sa
->
base
+
SA1111_PS2DATA
)
&
0xff
;
if
(
hweight8
(
scancode
)
&
1
)
flag
^=
SERIO_PARITY
;
serio_interrupt
(
&
sa
->
io
,
scancode
,
flag
);
status
=
sa1111_readl
(
sa
->
base
+
SA1111_PS2STAT
);
}
}
/*
* Write a byte to the PS2 port. We have to wait for the
* port to indicate that the transmitter is empty.
*/
static
int
ps2_write
(
struct
serio
*
io
,
unsigned
char
val
)
{
struct
ps2if
*
sa
=
io
->
driver
;
unsigned
int
timeleft
=
10000
;
/* timeout in 100ms */
while
((
sa1111_readl
(
sa
->
base
+
SA1111_PS2STAT
)
&
PS2STAT_TXE
)
==
0
&&
timeleft
--
)
udelay
(
10
);
if
(
timeleft
)
sa1111_writel
(
val
,
sa
->
base
+
SA1111_PS2DATA
);
return
timeleft
?
0
:
SERIO_TIMEOUT
;
}
static
int
ps2_open
(
struct
serio
*
io
)
{
struct
ps2if
*
sa
=
io
->
driver
;
int
ret
;
sa1111_enable_device
(
sa
->
skpcr_mask
);
ret
=
request_irq
(
sa
->
irq
,
ps2_int
,
0
,
"ps2"
,
sa
);
if
(
ret
)
{
printk
(
KERN_ERR
"sa1111ps2: could not allocate IRQ%d: %d
\n
"
,
sa
->
irq
,
ret
);
return
ret
;
}
sa1111_writel
(
PS2CR_ENA
,
sa
->
base
+
SA1111_PS2CR
);
return
0
;
}
static
void
ps2_close
(
struct
serio
*
io
)
{
struct
ps2if
*
sa
=
io
->
driver
;
sa1111_writel
(
0
,
sa
->
base
+
SA1111_PS2CR
);
free_irq
(
sa
->
irq
,
sa
);
sa1111_disable_device
(
sa
->
skpcr_mask
);
}
/*
* Clear the input buffer.
*/
static
void
__init
ps2_clear_input
(
struct
ps2if
*
sa
)
{
int
maxread
=
100
;
while
(
maxread
--
)
{
if
((
sa1111_readl
(
sa
->
base
+
SA1111_PS2DATA
)
&
0xff
)
==
0xff
)
break
;
}
}
static
inline
unsigned
int
ps2_test_one
(
struct
ps2if
*
sa
,
unsigned
int
mask
)
{
unsigned
int
val
;
sa1111_writel
(
PS2CR_ENA
|
mask
,
sa
->
base
+
SA1111_PS2CR
);
udelay
(
2
);
val
=
sa1111_readl
(
sa
->
base
+
SA1111_PS2STAT
);
return
val
&
(
PS2STAT_KBC
|
PS2STAT_KBD
);
}
/*
* Test the keyboard interface. We basically check to make sure that
* we can drive each line to the keyboard independently of each other.
*/
static
int
__init
ps2_test
(
struct
ps2if
*
sa
)
{
unsigned
int
stat
;
int
ret
=
0
;
stat
=
ps2_test_one
(
sa
,
PS2CR_FKC
);
if
(
stat
!=
PS2STAT_KBD
)
{
printk
(
"Keyboard interface test failed[1]: %02x
\n
"
,
stat
);
ret
=
-
ENODEV
;
}
stat
=
ps2_test_one
(
sa
,
0
);
if
(
stat
!=
(
PS2STAT_KBC
|
PS2STAT_KBD
))
{
printk
(
"Keyboard interface test failed[2]: %02x
\n
"
,
stat
);
ret
=
-
ENODEV
;
}
stat
=
ps2_test_one
(
sa
,
PS2CR_FKD
);
if
(
stat
!=
PS2STAT_KBC
)
{
printk
(
"Keyboard interface test failed[3]: %02x
\n
"
,
stat
);
ret
=
-
ENODEV
;
}
sa1111_writel
(
0
,
sa
->
base
+
SA1111_PS2CR
);
return
ret
;
}
/*
* Initialise one PS/2 port.
*/
static
int
__init
ps2_init_one
(
struct
sa1111_device
*
dev
,
struct
ps2if
*
sa
)
{
int
ret
;
/*
* Request the physical region for this PS2 port.
*/
sa
->
res
=
request_mem_region
(
_SA1111
(
sa
->
base
),
512
,
"ps2"
);
if
(
!
sa
->
res
)
return
-
EBUSY
;
/*
* Convert the chip offset to virtual address.
*/
sa
->
base
+=
(
unsigned
long
)
dev
->
base
;
sa1111_enable_device
(
sa
->
skpcr_mask
);
/* Incoming clock is 8MHz */
sa1111_writel
(
0
,
sa
->
base
+
SA1111_PS2CLKDIV
);
sa1111_writel
(
127
,
sa
->
base
+
SA1111_PS2PRECNT
);
/*
* Flush any pending input.
*/
ps2_clear_input
(
sa
);
/*
* Test the keyboard interface.
*/
ret
=
ps2_test
(
sa
);
if
(
ret
)
goto
out
;
/*
* Flush any pending input.
*/
ps2_clear_input
(
sa
);
sa1111_disable_device
(
sa
->
skpcr_mask
);
serio_register_port
(
&
sa
->
io
);
return
0
;
out:
sa1111_disable_device
(
sa
->
skpcr_mask
);
release_resource
(
sa
->
res
);
return
ret
;
}
/*
* Remove one PS/2 port.
*/
static
void
__exit
ps2_remove_one
(
struct
ps2if
*
sa
)
{
serio_unregister_port
(
&
sa
->
io
);
release_resource
(
sa
->
res
);
}
static
struct
ps2if
ps2_kbd_port
=
{
io:
{
type:
SERIO_8042
,
write:
ps2_write
,
open:
ps2_open
,
close:
ps2_close
,
name:
"SA1111 PS/2 kbd port"
,
phys:
"sa1111/serio0"
,
driver:
&
ps2_kbd_port
,
},
base:
SA1111_KBD
,
irq:
IRQ_TPRXINT
,
skpcr_mask:
SKPCR_PTCLKEN
,
};
static
struct
ps2if
ps2_mse_port
=
{
io:
{
type:
SERIO_8042
,
write:
ps2_write
,
open:
ps2_open
,
close:
ps2_close
,
name:
"SA1111 PS/2 mouse port"
,
phys:
"sa1111/serio1"
,
driver:
&
ps2_mse_port
,
},
base:
SA1111_MSE
,
irq:
IRQ_MSRXINT
,
skpcr_mask:
SKPCR_PMCLKEN
,
};
static
int
__init
ps2_init
(
void
)
{
int
ret
=
-
ENODEV
;
if
(
sa1111
)
{
ret
=
ps2_init_one
(
sa1111
,
&
ps2_kbd_port
);
}
return
ret
;
}
static
void
__exit
ps2_exit
(
void
)
{
ps2_remove_one
(
&
ps2_kbd_port
);
}
module_init
(
ps2_init
);
module_exit
(
ps2_exit
);
MODULE_AUTHOR
(
"Russell King <rmk@arm.linux.org.uk>"
);
MODULE_DESCRIPTION
(
"SA1111 PS2 controller driver"
);
MODULE_LICENSE
(
"GPL"
);
drivers/input/serio/serio.c
View file @
a2ea21bb
...
@@ -42,6 +42,7 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
...
@@ -42,6 +42,7 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION
(
"Serio abstraction core"
);
MODULE_DESCRIPTION
(
"Serio abstraction core"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
EXPORT_SYMBOL
(
serio_interrupt
);
EXPORT_SYMBOL
(
serio_register_port
);
EXPORT_SYMBOL
(
serio_register_port
);
EXPORT_SYMBOL
(
serio_unregister_port
);
EXPORT_SYMBOL
(
serio_unregister_port
);
EXPORT_SYMBOL
(
serio_register_device
);
EXPORT_SYMBOL
(
serio_register_device
);
...
...
drivers/input/touchscreen/gunze.c
View file @
a2ea21bb
...
@@ -134,10 +134,10 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -134,10 +134,10 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev)
gunze
->
dev
.
private
=
gunze
;
gunze
->
dev
.
private
=
gunze
;
gunze
->
dev
.
name
=
gunze_name
;
gunze
->
dev
.
name
=
gunze_name
;
gunze
->
dev
.
phys
=
gunze
->
phys
;
gunze
->
dev
.
phys
=
gunze
->
phys
;
gunze
->
dev
.
id
bus
=
BUS_RS232
;
gunze
->
dev
.
id
.
bustype
=
BUS_RS232
;
gunze
->
dev
.
idvendor
=
SERIO_GUNZE
;
gunze
->
dev
.
id
.
vendor
=
SERIO_GUNZE
;
gunze
->
dev
.
idproduct
=
0x0051
;
gunze
->
dev
.
id
.
product
=
0x0051
;
gunze
->
dev
.
idversion
=
0x0100
;
gunze
->
dev
.
id
.
version
=
0x0100
;
if
(
serio_open
(
serio
,
dev
))
{
if
(
serio_open
(
serio
,
dev
))
{
kfree
(
gunze
);
kfree
(
gunze
);
...
...
drivers/input/touchscreen/h3600_ts_input.c
View file @
a2ea21bb
...
@@ -418,10 +418,10 @@ static void h3600ts_connect(struct serio *serio, struct serio_dev *dev)
...
@@ -418,10 +418,10 @@ static void h3600ts_connect(struct serio *serio, struct serio_dev *dev)
ts
->
dev
.
private
=
ts
;
ts
->
dev
.
private
=
ts
;
ts
->
dev
.
name
=
h3600_name
;
ts
->
dev
.
name
=
h3600_name
;
ts
->
dev
.
phys
=
ts
->
phys
;
ts
->
dev
.
phys
=
ts
->
phys
;
ts
->
dev
.
id
bus
=
BUS_RS232
;
ts
->
dev
.
id
.
bustype
=
BUS_RS232
;
ts
->
dev
.
idvendor
=
SERIO_H3600
;
ts
->
dev
.
id
.
vendor
=
SERIO_H3600
;
ts
->
dev
.
idproduct
=
0x0666
;
/* FIXME !!! We can ask the hardware */
ts
->
dev
.
id
.
product
=
0x0666
;
/* FIXME !!! We can ask the hardware */
ts
->
dev
.
idversion
=
0x0100
;
ts
->
dev
.
id
.
version
=
0x0100
;
if
(
serio_open
(
serio
,
dev
))
{
if
(
serio_open
(
serio
,
dev
))
{
free_irq
(
IRQ_GPIO_BITSY_ACTION_BUTTON
,
ts
);
free_irq
(
IRQ_GPIO_BITSY_ACTION_BUTTON
,
ts
);
...
...
drivers/input/uinput.c
View file @
a2ea21bb
...
@@ -162,10 +162,10 @@ static int uinput_alloc_device(struct file *file, const char *buffer, size_t cou
...
@@ -162,10 +162,10 @@ static int uinput_alloc_device(struct file *file, const char *buffer, size_t cou
strncpy
(
dev
->
name
,
user_dev
.
name
,
size
);
strncpy
(
dev
->
name
,
user_dev
.
name
,
size
);
dev
->
name
[
size
]
=
'\0'
;
dev
->
name
[
size
]
=
'\0'
;
dev
->
id
bus
=
user_dev
.
idbus
;
dev
->
id
.
bustype
=
user_dev
.
id
.
bustype
;
dev
->
id
vendor
=
user_dev
.
id
vendor
;
dev
->
id
.
vendor
=
user_dev
.
id
.
vendor
;
dev
->
id
product
=
user_dev
.
id
product
;
dev
->
id
.
product
=
user_dev
.
id
.
product
;
dev
->
id
version
=
user_dev
.
id
version
;
dev
->
id
.
version
=
user_dev
.
id
.
version
;
dev
->
ff_effects_max
=
user_dev
.
ff_effects_max
;
dev
->
ff_effects_max
=
user_dev
.
ff_effects_max
;
size
=
sizeof
(
unsigned
long
)
*
NBITS
(
ABS_MAX
+
1
);
size
=
sizeof
(
unsigned
long
)
*
NBITS
(
ABS_MAX
+
1
);
...
...
drivers/macintosh/adbhid.c
View file @
a2ea21bb
...
@@ -479,10 +479,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
...
@@ -479,10 +479,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
adbhid
[
id
]
->
input
.
private
=
adbhid
[
id
];
adbhid
[
id
]
->
input
.
private
=
adbhid
[
id
];
adbhid
[
id
]
->
input
.
name
=
adbhid
[
id
]
->
name
;
adbhid
[
id
]
->
input
.
name
=
adbhid
[
id
]
->
name
;
adbhid
[
id
]
->
input
.
phys
=
adbhid
[
id
]
->
phys
;
adbhid
[
id
]
->
input
.
phys
=
adbhid
[
id
]
->
phys
;
adbhid
[
id
]
->
input
.
id
bus
=
BUS_ADB
;
adbhid
[
id
]
->
input
.
id
.
bustype
=
BUS_ADB
;
adbhid
[
id
]
->
input
.
idvendor
=
0x0001
;
adbhid
[
id
]
->
input
.
id
.
vendor
=
0x0001
;
adbhid
[
id
]
->
input
.
idproduct
=
(
id
<<
12
)
|
(
default_id
<<
8
)
|
original_handler_id
;
adbhid
[
id
]
->
input
.
id
.
product
=
(
id
<<
12
)
|
(
default_id
<<
8
)
|
original_handler_id
;
adbhid
[
id
]
->
input
.
idversion
=
0x0100
;
adbhid
[
id
]
->
input
.
id
.
version
=
0x0100
;
switch
(
default_id
)
{
switch
(
default_id
)
{
case
ADB_KEYBOARD
:
case
ADB_KEYBOARD
:
...
@@ -607,7 +607,7 @@ adbhid_input_reregister(int id, int default_id, int org_handler_id,
...
@@ -607,7 +607,7 @@ adbhid_input_reregister(int id, int default_id, int org_handler_id,
int
cur_handler_id
,
int
mk
)
int
cur_handler_id
,
int
mk
)
{
{
if
(
adbhid
[
id
])
{
if
(
adbhid
[
id
])
{
if
(
adbhid
[
id
]
->
input
.
idproduct
!=
if
(
adbhid
[
id
]
->
input
.
id
.
product
!=
((
id
<<
12
)
|
(
default_id
<<
8
)
|
org_handler_id
))
{
((
id
<<
12
)
|
(
default_id
<<
8
)
|
org_handler_id
))
{
adbhid_input_unregister
(
id
);
adbhid_input_unregister
(
id
);
adbhid_input_register
(
id
,
default_id
,
org_handler_id
,
adbhid_input_register
(
id
,
default_id
,
org_handler_id
,
...
...
drivers/macintosh/mac_hid.c
View file @
a2ea21bb
...
@@ -181,10 +181,10 @@ static void emumousebtn_input_register(void)
...
@@ -181,10 +181,10 @@ static void emumousebtn_input_register(void)
emumousebtn
.
keybit
[
LONG
(
BTN_MOUSE
)]
=
BIT
(
BTN_LEFT
)
|
BIT
(
BTN_MIDDLE
)
|
BIT
(
BTN_RIGHT
);
emumousebtn
.
keybit
[
LONG
(
BTN_MOUSE
)]
=
BIT
(
BTN_LEFT
)
|
BIT
(
BTN_MIDDLE
)
|
BIT
(
BTN_RIGHT
);
emumousebtn
.
relbit
[
0
]
=
BIT
(
REL_X
)
|
BIT
(
REL_Y
);
emumousebtn
.
relbit
[
0
]
=
BIT
(
REL_X
)
|
BIT
(
REL_Y
);
emumousebtn
.
id
bus
=
BUS_ADB
;
emumousebtn
.
id
.
bustype
=
BUS_ADB
;
emumousebtn
.
idvendor
=
0x0001
;
emumousebtn
.
id
.
vendor
=
0x0001
;
emumousebtn
.
idproduct
=
0x0001
;
emumousebtn
.
id
.
product
=
0x0001
;
emumousebtn
.
idversion
=
0x0100
;
emumousebtn
.
id
.
version
=
0x0100
;
input_register_device
(
&
emumousebtn
);
input_register_device
(
&
emumousebtn
);
...
...
drivers/usb/input/aiptek.c
View file @
a2ea21bb
...
@@ -277,10 +277,10 @@ aiptek_probe(struct usb_device *dev, unsigned int ifnum,
...
@@ -277,10 +277,10 @@ aiptek_probe(struct usb_device *dev, unsigned int ifnum,
aiptek
->
dev
.
close
=
aiptek_close
;
aiptek
->
dev
.
close
=
aiptek_close
;
aiptek
->
dev
.
name
=
aiptek
->
features
->
name
;
aiptek
->
dev
.
name
=
aiptek
->
features
->
name
;
aiptek
->
dev
.
id
bus
=
BUS_USB
;
aiptek
->
dev
.
id
.
bustype
=
BUS_USB
;
aiptek
->
dev
.
idvendor
=
dev
->
descriptor
.
idVendor
;
aiptek
->
dev
.
id
.
vendor
=
dev
->
descriptor
.
idVendor
;
aiptek
->
dev
.
idproduct
=
dev
->
descriptor
.
idProduct
;
aiptek
->
dev
.
id
.
product
=
dev
->
descriptor
.
idProduct
;
aiptek
->
dev
.
idversion
=
dev
->
descriptor
.
bcdDevice
;
aiptek
->
dev
.
id
.
version
=
dev
->
descriptor
.
bcdDevice
;
aiptek
->
usbdev
=
dev
;
aiptek
->
usbdev
=
dev
;
endpoint
=
dev
->
config
[
0
].
interface
[
ifnum
].
altsetting
[
0
].
endpoint
+
0
;
endpoint
=
dev
->
config
[
0
].
interface
[
ifnum
].
altsetting
[
0
].
endpoint
+
0
;
...
...
drivers/usb/input/hid-input.c
View file @
a2ea21bb
...
@@ -490,10 +490,10 @@ int hidinput_connect(struct hid_device *hid)
...
@@ -490,10 +490,10 @@ int hidinput_connect(struct hid_device *hid)
hid
->
input
.
name
=
hid
->
name
;
hid
->
input
.
name
=
hid
->
name
;
hid
->
input
.
phys
=
hid
->
phys
;
hid
->
input
.
phys
=
hid
->
phys
;
hid
->
input
.
uniq
=
hid
->
uniq
;
hid
->
input
.
uniq
=
hid
->
uniq
;
hid
->
input
.
id
bus
=
BUS_USB
;
hid
->
input
.
id
.
bustype
=
BUS_USB
;
hid
->
input
.
idvendor
=
dev
->
descriptor
.
idVendor
;
hid
->
input
.
id
.
vendor
=
dev
->
descriptor
.
idVendor
;
hid
->
input
.
idproduct
=
dev
->
descriptor
.
idProduct
;
hid
->
input
.
id
.
product
=
dev
->
descriptor
.
idProduct
;
hid
->
input
.
idversion
=
dev
->
descriptor
.
bcdDevice
;
hid
->
input
.
id
.
version
=
dev
->
descriptor
.
bcdDevice
;
for
(
k
=
HID_INPUT_REPORT
;
k
<=
HID_OUTPUT_REPORT
;
k
++
)
{
for
(
k
=
HID_INPUT_REPORT
;
k
<=
HID_OUTPUT_REPORT
;
k
++
)
{
report_enum
=
hid
->
report_enum
+
k
;
report_enum
=
hid
->
report_enum
+
k
;
...
...
drivers/usb/input/powermate.c
View file @
a2ea21bb
...
@@ -293,10 +293,10 @@ static void *powermate_probe(struct usb_device *udev, unsigned int ifnum, const
...
@@ -293,10 +293,10 @@ static void *powermate_probe(struct usb_device *udev, unsigned int ifnum, const
pm
->
input
.
keybit
[
LONG
(
BTN_0
)]
=
BIT
(
BTN_0
);
pm
->
input
.
keybit
[
LONG
(
BTN_0
)]
=
BIT
(
BTN_0
);
pm
->
input
.
relbit
[
LONG
(
REL_DIAL
)]
=
BIT
(
REL_DIAL
);
pm
->
input
.
relbit
[
LONG
(
REL_DIAL
)]
=
BIT
(
REL_DIAL
);
pm
->
input
.
mscbit
[
LONG
(
MSC_PULSELED
)]
=
BIT
(
MSC_PULSELED
);
pm
->
input
.
mscbit
[
LONG
(
MSC_PULSELED
)]
=
BIT
(
MSC_PULSELED
);
pm
->
input
.
id
bus
=
BUS_USB
;
pm
->
input
.
id
.
bustype
=
BUS_USB
;
pm
->
input
.
idvendor
=
udev
->
descriptor
.
idVendor
;
pm
->
input
.
id
.
vendor
=
udev
->
descriptor
.
idVendor
;
pm
->
input
.
idproduct
=
udev
->
descriptor
.
idProduct
;
pm
->
input
.
id
.
product
=
udev
->
descriptor
.
idProduct
;
pm
->
input
.
idversion
=
udev
->
descriptor
.
bcdDevice
;
pm
->
input
.
id
.
version
=
udev
->
descriptor
.
bcdDevice
;
pm
->
input
.
event
=
powermate_input_event
;
pm
->
input
.
event
=
powermate_input_event
;
input_register_device
(
&
pm
->
input
);
input_register_device
(
&
pm
->
input
);
...
...
drivers/usb/input/usbkbd.c
View file @
a2ea21bb
...
@@ -236,10 +236,10 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
...
@@ -236,10 +236,10 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
kbd
->
dev
.
name
=
kbd
->
name
;
kbd
->
dev
.
name
=
kbd
->
name
;
kbd
->
dev
.
phys
=
kbd
->
phys
;
kbd
->
dev
.
phys
=
kbd
->
phys
;
kbd
->
dev
.
idbus
=
BUS_USB
;
kbd
->
dev
.
id
.
bus
=
BUS_USB
;
kbd
->
dev
.
idvendor
=
dev
->
descriptor
.
idVendor
;
kbd
->
dev
.
id
.
vendor
=
dev
->
descriptor
.
idVendor
;
kbd
->
dev
.
idproduct
=
dev
->
descriptor
.
idProduct
;
kbd
->
dev
.
id
.
product
=
dev
->
descriptor
.
idProduct
;
kbd
->
dev
.
idversion
=
dev
->
descriptor
.
bcdDevice
;
kbd
->
dev
.
id
.
version
=
dev
->
descriptor
.
bcdDevice
;
if
(
!
(
buf
=
kmalloc
(
63
,
GFP_KERNEL
)))
{
if
(
!
(
buf
=
kmalloc
(
63
,
GFP_KERNEL
)))
{
kfree
(
kbd
);
kfree
(
kbd
);
...
@@ -255,7 +255,7 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
...
@@ -255,7 +255,7 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
if
(
!
strlen
(
kbd
->
name
))
if
(
!
strlen
(
kbd
->
name
))
sprintf
(
kbd
->
name
,
"USB HIDBP Keyboard %04x:%04x"
,
sprintf
(
kbd
->
name
,
"USB HIDBP Keyboard %04x:%04x"
,
kbd
->
dev
.
id
vendor
,
kbd
->
dev
.
id
product
);
kbd
->
dev
.
id
.
vendor
,
kbd
->
dev
.
id
.
product
);
kfree
(
buf
);
kfree
(
buf
);
...
...
drivers/usb/input/usbmouse.c
View file @
a2ea21bb
...
@@ -145,10 +145,10 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
...
@@ -145,10 +145,10 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
mouse
->
dev
.
name
=
mouse
->
name
;
mouse
->
dev
.
name
=
mouse
->
name
;
mouse
->
dev
.
phys
=
mouse
->
phys
;
mouse
->
dev
.
phys
=
mouse
->
phys
;
mouse
->
dev
.
idbus
=
BUS_USB
;
mouse
->
dev
.
id
.
bus
=
BUS_USB
;
mouse
->
dev
.
idvendor
=
dev
->
descriptor
.
idVendor
;
mouse
->
dev
.
id
.
vendor
=
dev
->
descriptor
.
idVendor
;
mouse
->
dev
.
idproduct
=
dev
->
descriptor
.
idProduct
;
mouse
->
dev
.
id
.
product
=
dev
->
descriptor
.
idProduct
;
mouse
->
dev
.
idversion
=
dev
->
descriptor
.
bcdDevice
;
mouse
->
dev
.
id
.
version
=
dev
->
descriptor
.
bcdDevice
;
if
(
!
(
buf
=
kmalloc
(
63
,
GFP_KERNEL
)))
{
if
(
!
(
buf
=
kmalloc
(
63
,
GFP_KERNEL
)))
{
kfree
(
mouse
);
kfree
(
mouse
);
...
@@ -164,7 +164,7 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
...
@@ -164,7 +164,7 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
if
(
!
strlen
(
mouse
->
name
))
if
(
!
strlen
(
mouse
->
name
))
sprintf
(
mouse
->
name
,
"USB HIDBP Mouse %04x:%04x"
,
sprintf
(
mouse
->
name
,
"USB HIDBP Mouse %04x:%04x"
,
mouse
->
dev
.
id
vendor
,
mouse
->
dev
.
id
product
);
mouse
->
dev
.
id
.
vendor
,
mouse
->
dev
.
id
.
product
);
kfree
(
buf
);
kfree
(
buf
);
...
...
drivers/usb/input/wacom.c
View file @
a2ea21bb
...
@@ -400,10 +400,10 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum, const struc
...
@@ -400,10 +400,10 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum, const struc
wacom
->
dev
.
name
=
wacom
->
features
->
name
;
wacom
->
dev
.
name
=
wacom
->
features
->
name
;
wacom
->
dev
.
phys
=
wacom
->
phys
;
wacom
->
dev
.
phys
=
wacom
->
phys
;
wacom
->
dev
.
id
bus
=
BUS_USB
;
wacom
->
dev
.
id
.
bustype
=
BUS_USB
;
wacom
->
dev
.
idvendor
=
dev
->
descriptor
.
idVendor
;
wacom
->
dev
.
id
.
vendor
=
dev
->
descriptor
.
idVendor
;
wacom
->
dev
.
idproduct
=
dev
->
descriptor
.
idProduct
;
wacom
->
dev
.
id
.
product
=
dev
->
descriptor
.
idProduct
;
wacom
->
dev
.
idversion
=
dev
->
descriptor
.
bcdDevice
;
wacom
->
dev
.
id
.
version
=
dev
->
descriptor
.
bcdDevice
;
wacom
->
usbdev
=
dev
;
wacom
->
usbdev
=
dev
;
endpoint
=
dev
->
config
[
0
].
interface
[
ifnum
].
altsetting
[
0
].
endpoint
+
0
;
endpoint
=
dev
->
config
[
0
].
interface
[
ifnum
].
altsetting
[
0
].
endpoint
+
0
;
...
...
drivers/usb/input/xpad.c
View file @
a2ea21bb
/*
/*
*
USB XBOX HID Gamecontroller - v0.0.3
*
X-Box gamepad - v0.0.5
*
*
* Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de>
* Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de>
*
*
...
@@ -25,44 +25,46 @@
...
@@ -25,44 +25,46 @@
* - the skeleton-driver drivers/usb/usb-skeleton.c
* - the skeleton-driver drivers/usb/usb-skeleton.c
*
*
* Thanks to:
* Thanks to:
* - ITO Takayuki for providing xpad information on his website
* - ITO Takayuki for providing
essential
xpad information on his website
* - Vojtech Pavlik - iforce driver / input subsystem
* - Vojtech Pavlik - iforce driver / input subsystem
* - Greg Kroah-Hartman - usb-skeleton driver
* - Greg Kroah-Hartman - usb-skeleton driver
*
*
* TODO:
* TODO:
* - get the black button to work
* - fine tune axes
* - fine tune axes
*
- fix "analog" buttons
*
- fix "analog" buttons (reported as digital now)
* - get rumble working
* - get rumble working
*
*
* History:
* History:
*
*
* 2002-06-27 - 0.0.1
-
first version, just said "XBOX HID controller"
* 2002-06-27 - 0.0.1
:
first version, just said "XBOX HID controller"
*
*
* 2002-07-02 - 0.0.2
-
basic working version
* 2002-07-02 - 0.0.2
:
basic working version
*
all axes and 9 of the 10 buttons work (german InterAct device)
*
-
all axes and 9 of the 10 buttons work (german InterAct device)
*
the black button does not work
*
-
the black button does not work
*
*
* 2002-07-14 - 0.0.3 : rework by Vojtech Pavlik
* - indentation fixes
* - usb + input init sequence fixes
*
* 2002-07-16 - 0.0.4 : minor changes, merge with Vojtech's v0.0.3
* - verified the lack of HID and report descriptors
* - verified that ALL buttons WORK
* - fixed d-pad to axes mapping
*
* 2002-07-17 - 0.0.5 : simplified d-pad handling
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/input.h>
#include <linux/input.h>
#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/fcntl.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/usb.h>
#include <linux/usb.h>
#define DRIVER_VERSION "v0.0.
3
"
#define DRIVER_VERSION "v0.0.
5
"
#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
#define DRIVER_DESC "X-Box pad driver"
#define DRIVER_DESC "X-Box pad driver"
...
@@ -75,13 +77,13 @@ static struct xpad_device {
...
@@ -75,13 +77,13 @@ static struct xpad_device {
}
xpad_device
[]
=
{
}
xpad_device
[]
=
{
{
0x045e
,
0x0202
,
"Microsoft X-Box pad (US)"
},
{
0x045e
,
0x0202
,
"Microsoft X-Box pad (US)"
},
{
0x045e
,
0x0285
,
"Microsoft X-Box pad (Japan)"
},
{
0x045e
,
0x0285
,
"Microsoft X-Box pad (Japan)"
},
{
0x05fd
,
0x107a
,
"InterAct X-Box pad (Germany)"
},
{
0x05fd
,
0x107a
,
"InterAct
'PowerPad Pro'
X-Box pad (Germany)"
},
{
0x0000
,
0x0000
,
"X-Box pad"
}
{
0x0000
,
0x0000
,
"X-Box pad"
}
};
};
static
signed
short
xpad_btn
[]
=
{
static
signed
short
xpad_btn
[]
=
{
BTN_A
,
BTN_B
,
BTN_C
,
BTN_X
,
BTN_Y
,
BTN_Z
,
/* 6
"analog" buttons */
BTN_A
,
BTN_B
,
BTN_C
,
BTN_X
,
BTN_Y
,
BTN_Z
,
/*
"analog" buttons */
BTN_START
,
BTN_BACK
,
BTN_THUMBL
,
BTN_THUMBR
,
/* start/back + stick pres
s */
BTN_START
,
BTN_BACK
,
BTN_THUMBL
,
BTN_THUMBR
,
/* start/back/stick
s */
-
1
/* terminating entry */
-
1
/* terminating entry */
};
};
...
@@ -89,15 +91,10 @@ static signed short xpad_abs[] = {
...
@@ -89,15 +91,10 @@ static signed short xpad_abs[] = {
ABS_X
,
ABS_Y
,
/* left stick */
ABS_X
,
ABS_Y
,
/* left stick */
ABS_RX
,
ABS_RY
,
/* right stick */
ABS_RX
,
ABS_RY
,
/* right stick */
ABS_Z
,
ABS_RZ
,
/* triggers left/right */
ABS_Z
,
ABS_RZ
,
/* triggers left/right */
ABS_HAT0X
,
ABS_HAT0Y
,
/* dpad */
ABS_HAT0X
,
ABS_HAT0Y
,
/* d
igital
pad */
-
1
/* terminating entry */
-
1
/* terminating entry */
};
};
static
struct
{
__s32
x
;
__s32
y
;
}
xpad_hat_to_axis
[]
=
{
{
0
,
0
},
{
0
,
-
1
},
{
1
,
-
1
},
{
1
,
0
},
{
1
,
1
},
{
0
,
1
},
{
-
1
,
1
},
{
-
1
,
0
},
{
-
1
,
-
1
}
};
static
struct
usb_device_id
xpad_table
[]
=
{
static
struct
usb_device_id
xpad_table
[]
=
{
{
USB_INTERFACE_INFO
(
'X'
,
'B'
,
0
)
},
/* X-Box USB-IF not approved class */
{
USB_INTERFACE_INFO
(
'X'
,
'B'
,
0
)
},
/* X-Box USB-IF not approved class */
{
}
{
}
...
@@ -113,28 +110,17 @@ struct usb_xpad {
...
@@ -113,28 +110,17 @@ struct usb_xpad {
unsigned
char
idata
[
XPAD_PKT_LEN
];
/* input data */
unsigned
char
idata
[
XPAD_PKT_LEN
];
/* input data */
char
phys
[
65
];
/* physical device path */
char
phys
[
65
];
/* physical device path */
int
open_count
;
/*
how many times has this been opened
*/
int
open_count
;
/*
reference count
*/
};
};
/*
/*
* xpad_process_packet
* xpad_process_packet
*
*
* Completes a request by converting the data into events for the input subsystem.
* Completes a request by converting the data into events for the
* input subsystem.
*
*
*
The used report descriptor given below
was taken from ITO Takayukis website:
*
The used report descriptor
was taken from ITO Takayukis website:
* http://euc.jp/periphs/xbox-controller.ja.html
* http://euc.jp/periphs/xbox-controller.ja.html
*
* ----------------------------------------------------------------------------------------------------------------
* | padding | byte-cnt | dpad sb12 | reserved | bt A | bt B | bt X | bt Y | bt black | bt white |
* | 01234567 | 01234567 | 0123 4567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 |
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
* ----------------------------------------------------------------------------------------------------------------
*
* ---------------------------------------------------------------------------------------------------------------
* | trig L | trig R | left stick X | left stick Y | right stick X | right stick Y |
* | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 | 01234567 |
* | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
* ---------------------------------------------------------------------------------------------------------------
*/
*/
static
void
xpad_process_packet
(
struct
usb_xpad
*
xpad
,
u16
cmd
,
unsigned
char
*
data
)
static
void
xpad_process_packet
(
struct
usb_xpad
*
xpad
,
u16
cmd
,
unsigned
char
*
data
)
...
@@ -154,8 +140,8 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
...
@@ -154,8 +140,8 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
input_report_abs
(
dev
,
ABS_RZ
,
data
[
11
]);
input_report_abs
(
dev
,
ABS_RZ
,
data
[
11
]);
/* digital pad */
/* digital pad */
input_report_abs
(
dev
,
ABS_HAT0X
,
xpad_hat_to_axis
[
data
[
2
]
&
0x0f
].
x
);
input_report_abs
(
dev
,
ABS_HAT0X
,
!!
(
data
[
2
]
&
0x08
)
-
!!
(
data
[
2
]
&
0x04
)
);
input_report_abs
(
dev
,
ABS_HAT0Y
,
xpad_hat_to_axis
[
data
[
2
]
&
0x0f
].
y
);
input_report_abs
(
dev
,
ABS_HAT0Y
,
!!
(
data
[
2
]
&
0x02
)
-
!!
(
data
[
2
]
&
0x01
)
);
/* start/back buttons and stick press left/right */
/* start/back buttons and stick press left/right */
input_report_key
(
dev
,
BTN_START
,
(
data
[
2
]
&
0x10
)
>>
4
);
input_report_key
(
dev
,
BTN_START
,
(
data
[
2
]
&
0x10
)
>>
4
);
...
@@ -234,15 +220,17 @@ static void * xpad_probe(struct usb_device *udev, unsigned int ifnum, const stru
...
@@ -234,15 +220,17 @@ static void * xpad_probe(struct usb_device *udev, unsigned int ifnum, const stru
ep_irq_in
=
udev
->
actconfig
->
interface
[
ifnum
].
altsetting
[
0
].
endpoint
+
0
;
ep_irq_in
=
udev
->
actconfig
->
interface
[
ifnum
].
altsetting
[
0
].
endpoint
+
0
;
FILL_INT_URB
(
xpad
->
irq_in
,
udev
,
usb_rcvintpipe
(
udev
,
ep_irq_in
->
bEndpointAddress
),
FILL_INT_URB
(
xpad
->
irq_in
,
udev
,
xpad
->
idata
,
XPAD_PKT_LEN
,
xpad_irq_in
,
xpad
,
ep_irq_in
->
bInterval
);
usb_rcvintpipe
(
udev
,
ep_irq_in
->
bEndpointAddress
),
xpad
->
idata
,
XPAD_PKT_LEN
,
xpad_irq_in
,
xpad
,
ep_irq_in
->
bInterval
);
xpad
->
udev
=
udev
;
xpad
->
udev
=
udev
;
xpad
->
dev
.
id
bus
=
BUS_USB
;
xpad
->
dev
.
id
.
bustype
=
BUS_USB
;
xpad
->
dev
.
idvendor
=
udev
->
descriptor
.
idVendor
;
xpad
->
dev
.
id
.
vendor
=
udev
->
descriptor
.
idVendor
;
xpad
->
dev
.
idproduct
=
udev
->
descriptor
.
idProduct
;
xpad
->
dev
.
id
.
product
=
udev
->
descriptor
.
idProduct
;
xpad
->
dev
.
idversion
=
udev
->
descriptor
.
bcdDevice
;
xpad
->
dev
.
id
.
version
=
udev
->
descriptor
.
bcdDevice
;
xpad
->
dev
.
private
=
xpad
;
xpad
->
dev
.
private
=
xpad
;
xpad
->
dev
.
name
=
xpad_device
[
i
].
name
;
xpad
->
dev
.
name
=
xpad_device
[
i
].
name
;
xpad
->
dev
.
phys
=
xpad
->
phys
;
xpad
->
dev
.
phys
=
xpad
->
phys
;
...
@@ -267,19 +255,19 @@ static void * xpad_probe(struct usb_device *udev, unsigned int ifnum, const stru
...
@@ -267,19 +255,19 @@ static void * xpad_probe(struct usb_device *udev, unsigned int ifnum, const stru
case
ABS_X
:
case
ABS_X
:
case
ABS_Y
:
case
ABS_Y
:
case
ABS_RX
:
case
ABS_RX
:
case
ABS_RY
:
case
ABS_RY
:
/* the two sticks */
xpad
->
dev
.
absmax
[
t
]
=
32767
;
xpad
->
dev
.
absmax
[
t
]
=
32767
;
xpad
->
dev
.
absmin
[
t
]
=
-
32768
;
xpad
->
dev
.
absmin
[
t
]
=
-
32768
;
xpad
->
dev
.
absflat
[
t
]
=
128
;
xpad
->
dev
.
absflat
[
t
]
=
128
;
xpad
->
dev
.
absfuzz
[
t
]
=
16
;
xpad
->
dev
.
absfuzz
[
t
]
=
16
;
break
;
break
;
case
ABS_Z
:
case
ABS_Z
:
case
ABS_RZ
:
case
ABS_RZ
:
/* the triggers */
xpad
->
dev
.
absmax
[
t
]
=
255
;
xpad
->
dev
.
absmax
[
t
]
=
255
;
xpad
->
dev
.
absmin
[
t
]
=
0
;
xpad
->
dev
.
absmin
[
t
]
=
0
;
break
;
break
;
case
ABS_HAT0X
:
case
ABS_HAT0X
:
case
ABS_HAT0Y
:
case
ABS_HAT0Y
:
/* the d-pad */
xpad
->
dev
.
absmax
[
t
]
=
1
;
xpad
->
dev
.
absmax
[
t
]
=
1
;
xpad
->
dev
.
absmin
[
t
]
=
-
1
;
xpad
->
dev
.
absmin
[
t
]
=
-
1
;
break
;
break
;
...
...
include/asm-ppc/keyboard.h
View file @
a2ea21bb
...
@@ -25,10 +25,6 @@
...
@@ -25,10 +25,6 @@
#include <linux/ioport.h>
#include <linux/ioport.h>
#include <linux/kd.h>
#include <linux/kd.h>
#include <asm/io.h>
#include <asm/io.h>
/* IBM Spruce platform is different. */
#ifdef CONFIG_SPRUCE
#include <platforms/spruce.h>
#endif
#ifndef KEYBOARD_IRQ
#ifndef KEYBOARD_IRQ
#define KEYBOARD_IRQ 1
#define KEYBOARD_IRQ 1
...
...
include/linux/gameport.h
View file @
a2ea21bb
...
@@ -39,10 +39,7 @@ struct gameport {
...
@@ -39,10 +39,7 @@ struct gameport {
char
*
name
;
char
*
name
;
char
*
phys
;
char
*
phys
;
unsigned
short
idbus
;
struct
input_devinfo
id
;
unsigned
short
idvendor
;
unsigned
short
idproduct
;
unsigned
short
idversion
;
int
io
;
int
io
;
int
speed
;
int
speed
;
...
...
include/linux/input.h
View file @
a2ea21bb
...
@@ -56,8 +56,15 @@ struct input_event {
...
@@ -56,8 +56,15 @@ struct input_event {
* IOCTLs (0x00 - 0x7f)
* IOCTLs (0x00 - 0x7f)
*/
*/
struct
input_devinfo
{
uint16_t
bustype
;
uint16_t
vendor
;
uint16_t
product
;
uint16_t
version
;
};
#define EVIOCGVERSION _IOR('E', 0x01, int)
/* get driver version */
#define EVIOCGVERSION _IOR('E', 0x01, int)
/* get driver version */
#define EVIOCGID _IOR('E', 0x02, s
hort[4])
/* get device ID */
#define EVIOCGID _IOR('E', 0x02, s
truct input_devinfo)
/* get device ID */
#define EVIOCGREP _IOR('E', 0x03, int[2])
/* get repeat settings */
#define EVIOCGREP _IOR('E', 0x03, int[2])
/* get repeat settings */
#define EVIOCSREP _IOW('E', 0x03, int[2])
/* get repeat settings */
#define EVIOCSREP _IOW('E', 0x03, int[2])
/* get repeat settings */
#define EVIOCGKEYCODE _IOR('E', 0x04, int[2])
/* get keycode */
#define EVIOCGKEYCODE _IOR('E', 0x04, int[2])
/* get keycode */
...
@@ -454,17 +461,15 @@ struct input_event {
...
@@ -454,17 +461,15 @@ struct input_event {
#define KEY_FIRST 0x194
#define KEY_FIRST 0x194
#define KEY_LAST 0x195
#define KEY_LAST 0x195
#define KEY_AB 0x196
#define KEY_AB 0x196
#define KEY_
PLAY
0x197
#define KEY_
NEXT
0x197
#define KEY_RESTART 0x198
#define KEY_RESTART 0x198
#define KEY_SLOW 0x199
#define KEY_SLOW 0x199
#define KEY_SHUFFLE 0x19a
#define KEY_SHUFFLE 0x19a
#define KEY_
FASTFORWARD 0x19
b
#define KEY_
BREAK 0x1a
b
#define KEY_PREVIOUS 0x19c
#define KEY_PREVIOUS 0x19c
#define KEY_NEXT 0x19d
#define KEY_DIGITS 0x19d
#define KEY_DIGITS 0x19e
#define KEY_TEEN 0x19e
#define KEY_TEEN 0x19f
#define KEY_TWEN 0x1af
#define KEY_TWEN 0x1a0
#define KEY_BREAK 0x1a1
#define KEY_MAX 0x1ff
#define KEY_MAX 0x1ff
...
@@ -742,10 +747,7 @@ struct input_dev {
...
@@ -742,10 +747,7 @@ struct input_dev {
char
*
name
;
char
*
name
;
char
*
phys
;
char
*
phys
;
char
*
uniq
;
char
*
uniq
;
unsigned
short
idbus
;
struct
input_devinfo
id
;
unsigned
short
idvendor
;
unsigned
short
idproduct
;
unsigned
short
idversion
;
unsigned
long
evbit
[
NBITS
(
EV_MAX
)];
unsigned
long
evbit
[
NBITS
(
EV_MAX
)];
unsigned
long
keybit
[
NBITS
(
KEY_MAX
)];
unsigned
long
keybit
[
NBITS
(
KEY_MAX
)];
...
@@ -818,10 +820,7 @@ struct input_device_id {
...
@@ -818,10 +820,7 @@ struct input_device_id {
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
short
idbus
;
struct
input_devinfo
id
;
unsigned
short
idvendor
;
unsigned
short
idproduct
;
unsigned
short
idversion
;
unsigned
long
evbit
[
NBITS
(
EV_MAX
)];
unsigned
long
evbit
[
NBITS
(
EV_MAX
)];
unsigned
long
keybit
[
NBITS
(
KEY_MAX
)];
unsigned
long
keybit
[
NBITS
(
KEY_MAX
)];
...
...
include/linux/serio.h
View file @
a2ea21bb
...
@@ -94,8 +94,12 @@ static __inline__ void serio_dev_write_wakeup(struct serio *serio)
...
@@ -94,8 +94,12 @@ static __inline__ void serio_dev_write_wakeup(struct serio *serio)
serio
->
dev
->
write_wakeup
(
serio
);
serio
->
dev
->
write_wakeup
(
serio
);
}
}
/*
* bit masks for use in "interrupt" flags (3rd argument)
*/
#define SERIO_TIMEOUT 1
#define SERIO_TIMEOUT 1
#define SERIO_PARITY 2
#define SERIO_PARITY 2
#define SERIO_FRAME 4
#define SERIO_TYPE 0xff000000UL
#define SERIO_TYPE 0xff000000UL
#define SERIO_XT 0x00000000UL
#define SERIO_XT 0x00000000UL
...
...
include/linux/uinput.h
View file @
a2ea21bb
...
@@ -64,10 +64,7 @@ struct uinput_device {
...
@@ -64,10 +64,7 @@ struct uinput_device {
#define UINPUT_MAX_NAME_SIZE 80
#define UINPUT_MAX_NAME_SIZE 80
struct
uinput_user_dev
{
struct
uinput_user_dev
{
char
name
[
UINPUT_MAX_NAME_SIZE
];
char
name
[
UINPUT_MAX_NAME_SIZE
];
unsigned
short
idbus
;
struct
input_devinfo
id
;
unsigned
short
idvendor
;
unsigned
short
idproduct
;
unsigned
short
idversion
;
int
ff_effects_max
;
int
ff_effects_max
;
int
absmax
[
ABS_MAX
+
1
];
int
absmax
[
ABS_MAX
+
1
];
int
absmin
[
ABS_MAX
+
1
];
int
absmin
[
ABS_MAX
+
1
];
...
...
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