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
e0d7ff16
Commit
e0d7ff16
authored
Jul 29, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
parents
ca49a601
33fdfa97
Changes
34
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
530 additions
and
520 deletions
+530
-520
drivers/char/keyboard.c
drivers/char/keyboard.c
+2
-2
drivers/char/sonypi.c
drivers/char/sonypi.c
+65
-81
drivers/input/evdev.c
drivers/input/evdev.c
+1
-0
drivers/input/input.c
drivers/input/input.c
+198
-191
drivers/input/joydev.c
drivers/input/joydev.c
+2
-4
drivers/input/misc/uinput.c
drivers/input/misc/uinput.c
+88
-93
drivers/input/mouse/alps.c
drivers/input/mouse/alps.c
+9
-20
drivers/input/mouse/logips2pp.c
drivers/input/mouse/logips2pp.c
+0
-2
drivers/input/mouse/psmouse-base.c
drivers/input/mouse/psmouse-base.c
+2
-0
drivers/input/mouse/synaptics.c
drivers/input/mouse/synaptics.c
+11
-3
drivers/input/serio/Kconfig
drivers/input/serio/Kconfig
+1
-1
drivers/input/serio/i8042-x86ia64io.h
drivers/input/serio/i8042-x86ia64io.h
+14
-0
drivers/input/serio/i8042.c
drivers/input/serio/i8042.c
+32
-28
drivers/input/serio/serio.c
drivers/input/serio/serio.c
+26
-16
drivers/input/serio/serio_raw.c
drivers/input/serio/serio_raw.c
+1
-0
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Kconfig
+1
-1
drivers/usb/input/acecad.c
drivers/usb/input/acecad.c
+6
-8
drivers/usb/input/aiptek.c
drivers/usb/input/aiptek.c
+2
-4
drivers/usb/input/ati_remote.c
drivers/usb/input/ati_remote.c
+3
-5
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+14
-10
drivers/usb/input/hid-input.c
drivers/usb/input/hid-input.c
+2
-4
drivers/usb/input/itmtouch.c
drivers/usb/input/itmtouch.c
+2
-4
drivers/usb/input/kbtab.c
drivers/usb/input/kbtab.c
+2
-4
drivers/usb/input/mtouchusb.c
drivers/usb/input/mtouchusb.c
+2
-4
drivers/usb/input/powermate.c
drivers/usb/input/powermate.c
+2
-4
drivers/usb/input/touchkitusb.c
drivers/usb/input/touchkitusb.c
+2
-5
drivers/usb/input/usbkbd.c
drivers/usb/input/usbkbd.c
+2
-4
drivers/usb/input/usbmouse.c
drivers/usb/input/usbmouse.c
+2
-4
drivers/usb/input/wacom.c
drivers/usb/input/wacom.c
+2
-4
drivers/usb/input/xpad.c
drivers/usb/input/xpad.c
+2
-4
drivers/usb/media/konicawc.c
drivers/usb/media/konicawc.c
+2
-4
include/linux/input.h
include/linux/input.h
+3
-3
include/linux/uinput.h
include/linux/uinput.h
+2
-3
include/linux/usb_input.h
include/linux/usb_input.h
+25
-0
No files found.
drivers/char/keyboard.c
View file @
e0d7ff16
...
@@ -198,10 +198,10 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
...
@@ -198,10 +198,10 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
if
(
scancode
>=
dev
->
keycodemax
)
if
(
scancode
>=
dev
->
keycodemax
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
keycode
>
KEY_MAX
)
return
-
EINVAL
;
if
(
keycode
<
0
||
keycode
>
KEY_MAX
)
if
(
keycode
<
0
||
keycode
>
KEY_MAX
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
keycode
>>
(
dev
->
keycodesize
*
8
))
return
-
EINVAL
;
oldkey
=
SET_INPUT_KEYCODE
(
dev
,
scancode
,
keycode
);
oldkey
=
SET_INPUT_KEYCODE
(
dev
,
scancode
,
keycode
);
...
...
drivers/char/sonypi.c
View file @
e0d7ff16
...
@@ -439,6 +439,11 @@ static struct {
...
@@ -439,6 +439,11 @@ static struct {
{
0
,
0
},
{
0
,
0
},
};
};
struct
sonypi_keypress
{
struct
input_dev
*
dev
;
int
key
;
};
static
struct
sonypi_device
{
static
struct
sonypi_device
{
struct
pci_dev
*
dev
;
struct
pci_dev
*
dev
;
struct
platform_device
*
pdev
;
struct
platform_device
*
pdev
;
...
@@ -710,22 +715,61 @@ static void sonypi_setbluetoothpower(u8 state)
...
@@ -710,22 +715,61 @@ static void sonypi_setbluetoothpower(u8 state)
static
void
input_keyrelease
(
void
*
data
)
static
void
input_keyrelease
(
void
*
data
)
{
{
struct
input_dev
*
input_dev
;
struct
sonypi_keypress
kp
;
int
key
;
while
(
1
)
{
if
(
kfifo_get
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
input_dev
,
sizeof
(
input_dev
))
!=
sizeof
(
input_dev
))
return
;
if
(
kfifo_get
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
key
,
sizeof
(
key
))
!=
sizeof
(
key
))
return
;
while
(
kfifo_get
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
kp
,
sizeof
(
kp
))
==
sizeof
(
kp
))
{
msleep
(
10
);
msleep
(
10
);
input_report_key
(
input_dev
,
key
,
0
);
input_report_key
(
kp
.
dev
,
kp
.
key
,
0
);
input_sync
(
input_dev
);
input_sync
(
kp
.
dev
);
}
}
static
void
sonypi_report_input_event
(
u8
event
)
{
struct
input_dev
*
jog_dev
=
&
sonypi_device
.
input_jog_dev
;
struct
input_dev
*
key_dev
=
&
sonypi_device
.
input_key_dev
;
struct
sonypi_keypress
kp
=
{
NULL
};
int
i
;
switch
(
event
)
{
case
SONYPI_EVENT_JOGDIAL_UP
:
case
SONYPI_EVENT_JOGDIAL_UP_PRESSED
:
input_report_rel
(
jog_dev
,
REL_WHEEL
,
1
);
input_sync
(
jog_dev
);
break
;
case
SONYPI_EVENT_JOGDIAL_DOWN
:
case
SONYPI_EVENT_JOGDIAL_DOWN_PRESSED
:
input_report_rel
(
jog_dev
,
REL_WHEEL
,
-
1
);
input_sync
(
jog_dev
);
break
;
case
SONYPI_EVENT_JOGDIAL_PRESSED
:
kp
.
key
=
BTN_MIDDLE
;
kp
.
dev
=
jog_dev
;
break
;
case
SONYPI_EVENT_FNKEY_RELEASED
:
/* Nothing, not all VAIOs generate this event */
break
;
default:
for
(
i
=
0
;
sonypi_inputkeys
[
i
].
sonypiev
;
i
++
)
if
(
event
==
sonypi_inputkeys
[
i
].
sonypiev
)
{
kp
.
dev
=
key_dev
;
kp
.
key
=
sonypi_inputkeys
[
i
].
inputev
;
break
;
}
break
;
}
if
(
kp
.
dev
)
{
input_report_key
(
kp
.
dev
,
kp
.
key
,
1
);
input_sync
(
kp
.
dev
);
kfifo_put
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
kp
,
sizeof
(
kp
));
schedule_work
(
&
sonypi_device
.
input_work
);
}
}
}
}
...
@@ -768,51 +812,8 @@ static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -768,51 +812,8 @@ static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs)
printk
(
KERN_INFO
printk
(
KERN_INFO
"sonypi: event port1=0x%02x,port2=0x%02x
\n
"
,
v1
,
v2
);
"sonypi: event port1=0x%02x,port2=0x%02x
\n
"
,
v1
,
v2
);
if
(
useinput
)
{
if
(
useinput
)
struct
input_dev
*
input_jog_dev
=
&
sonypi_device
.
input_jog_dev
;
sonypi_report_input_event
(
event
);
struct
input_dev
*
input_key_dev
=
&
sonypi_device
.
input_key_dev
;
switch
(
event
)
{
case
SONYPI_EVENT_JOGDIAL_UP
:
case
SONYPI_EVENT_JOGDIAL_UP_PRESSED
:
input_report_rel
(
input_jog_dev
,
REL_WHEEL
,
1
);
break
;
case
SONYPI_EVENT_JOGDIAL_DOWN
:
case
SONYPI_EVENT_JOGDIAL_DOWN_PRESSED
:
input_report_rel
(
input_jog_dev
,
REL_WHEEL
,
-
1
);
break
;
case
SONYPI_EVENT_JOGDIAL_PRESSED
:
{
int
key
=
BTN_MIDDLE
;
input_report_key
(
input_jog_dev
,
key
,
1
);
kfifo_put
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
input_jog_dev
,
sizeof
(
input_jog_dev
));
kfifo_put
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
key
,
sizeof
(
key
));
break
;
}
case
SONYPI_EVENT_FNKEY_RELEASED
:
/* Nothing, not all VAIOs generate this event */
break
;
}
input_sync
(
input_jog_dev
);
for
(
i
=
0
;
sonypi_inputkeys
[
i
].
sonypiev
;
i
++
)
{
int
key
;
if
(
event
!=
sonypi_inputkeys
[
i
].
sonypiev
)
continue
;
key
=
sonypi_inputkeys
[
i
].
inputev
;
input_report_key
(
input_key_dev
,
key
,
1
);
kfifo_put
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
input_key_dev
,
sizeof
(
input_key_dev
));
kfifo_put
(
sonypi_device
.
input_fifo
,
(
unsigned
char
*
)
&
key
,
sizeof
(
key
));
}
input_sync
(
input_key_dev
);
schedule_work
(
&
sonypi_device
.
input_work
);
}
kfifo_put
(
sonypi_device
.
fifo
,
(
unsigned
char
*
)
&
event
,
sizeof
(
event
));
kfifo_put
(
sonypi_device
.
fifo
,
(
unsigned
char
*
)
&
event
,
sizeof
(
event
));
kill_fasync
(
&
sonypi_device
.
fifo_async
,
SIGIO
,
POLL_IN
);
kill_fasync
(
&
sonypi_device
.
fifo_async
,
SIGIO
,
POLL_IN
);
...
@@ -1227,14 +1228,7 @@ static int __devinit sonypi_probe(void)
...
@@ -1227,14 +1228,7 @@ static int __devinit sonypi_probe(void)
sonypi_device
.
input_jog_dev
.
keybit
[
LONG
(
BTN_MOUSE
)]
=
sonypi_device
.
input_jog_dev
.
keybit
[
LONG
(
BTN_MOUSE
)]
=
BIT
(
BTN_MIDDLE
);
BIT
(
BTN_MIDDLE
);
sonypi_device
.
input_jog_dev
.
relbit
[
0
]
=
BIT
(
REL_WHEEL
);
sonypi_device
.
input_jog_dev
.
relbit
[
0
]
=
BIT
(
REL_WHEEL
);
sonypi_device
.
input_jog_dev
.
name
=
sonypi_device
.
input_jog_dev
.
name
=
SONYPI_JOG_INPUTNAME
;
kmalloc
(
sizeof
(
SONYPI_JOG_INPUTNAME
),
GFP_KERNEL
);
if
(
!
sonypi_device
.
input_jog_dev
.
name
)
{
printk
(
KERN_ERR
"sonypi: kmalloc failed
\n
"
);
ret
=
-
ENOMEM
;
goto
out_inkmallocinput1
;
}
sprintf
(
sonypi_device
.
input_jog_dev
.
name
,
SONYPI_JOG_INPUTNAME
);
sonypi_device
.
input_jog_dev
.
id
.
bustype
=
BUS_ISA
;
sonypi_device
.
input_jog_dev
.
id
.
bustype
=
BUS_ISA
;
sonypi_device
.
input_jog_dev
.
id
.
vendor
=
PCI_VENDOR_ID_SONY
;
sonypi_device
.
input_jog_dev
.
id
.
vendor
=
PCI_VENDOR_ID_SONY
;
...
@@ -1248,14 +1242,7 @@ static int __devinit sonypi_probe(void)
...
@@ -1248,14 +1242,7 @@ static int __devinit sonypi_probe(void)
if
(
sonypi_inputkeys
[
i
].
inputev
)
if
(
sonypi_inputkeys
[
i
].
inputev
)
set_bit
(
sonypi_inputkeys
[
i
].
inputev
,
set_bit
(
sonypi_inputkeys
[
i
].
inputev
,
sonypi_device
.
input_key_dev
.
keybit
);
sonypi_device
.
input_key_dev
.
keybit
);
sonypi_device
.
input_key_dev
.
name
=
sonypi_device
.
input_key_dev
.
name
=
SONYPI_KEY_INPUTNAME
;
kmalloc
(
sizeof
(
SONYPI_KEY_INPUTNAME
),
GFP_KERNEL
);
if
(
!
sonypi_device
.
input_key_dev
.
name
)
{
printk
(
KERN_ERR
"sonypi: kmalloc failed
\n
"
);
ret
=
-
ENOMEM
;
goto
out_inkmallocinput2
;
}
sprintf
(
sonypi_device
.
input_key_dev
.
name
,
SONYPI_KEY_INPUTNAME
);
sonypi_device
.
input_key_dev
.
id
.
bustype
=
BUS_ISA
;
sonypi_device
.
input_key_dev
.
id
.
bustype
=
BUS_ISA
;
sonypi_device
.
input_key_dev
.
id
.
vendor
=
PCI_VENDOR_ID_SONY
;
sonypi_device
.
input_key_dev
.
id
.
vendor
=
PCI_VENDOR_ID_SONY
;
...
@@ -1313,11 +1300,7 @@ static int __devinit sonypi_probe(void)
...
@@ -1313,11 +1300,7 @@ static int __devinit sonypi_probe(void)
kfifo_free
(
sonypi_device
.
input_fifo
);
kfifo_free
(
sonypi_device
.
input_fifo
);
out_infifo:
out_infifo:
input_unregister_device
(
&
sonypi_device
.
input_key_dev
);
input_unregister_device
(
&
sonypi_device
.
input_key_dev
);
kfree
(
sonypi_device
.
input_key_dev
.
name
);
out_inkmallocinput2:
input_unregister_device
(
&
sonypi_device
.
input_jog_dev
);
input_unregister_device
(
&
sonypi_device
.
input_jog_dev
);
kfree
(
sonypi_device
.
input_jog_dev
.
name
);
out_inkmallocinput1:
free_irq
(
sonypi_device
.
irq
,
sonypi_irq
);
free_irq
(
sonypi_device
.
irq
,
sonypi_irq
);
out_reqirq:
out_reqirq:
release_region
(
sonypi_device
.
ioport1
,
sonypi_device
.
region_size
);
release_region
(
sonypi_device
.
ioport1
,
sonypi_device
.
region_size
);
...
@@ -1337,13 +1320,14 @@ static void __devexit sonypi_remove(void)
...
@@ -1337,13 +1320,14 @@ static void __devexit sonypi_remove(void)
{
{
sonypi_disable
();
sonypi_disable
();
synchronize_sched
();
/* Allow sonypi interrupt to complete. */
flush_scheduled_work
();
platform_device_unregister
(
sonypi_device
.
pdev
);
platform_device_unregister
(
sonypi_device
.
pdev
);
if
(
useinput
)
{
if
(
useinput
)
{
input_unregister_device
(
&
sonypi_device
.
input_key_dev
);
input_unregister_device
(
&
sonypi_device
.
input_key_dev
);
kfree
(
sonypi_device
.
input_key_dev
.
name
);
input_unregister_device
(
&
sonypi_device
.
input_jog_dev
);
input_unregister_device
(
&
sonypi_device
.
input_jog_dev
);
kfree
(
sonypi_device
.
input_jog_dev
.
name
);
kfifo_free
(
sonypi_device
.
input_fifo
);
kfifo_free
(
sonypi_device
.
input_fifo
);
}
}
...
...
drivers/input/evdev.c
View file @
e0d7ff16
...
@@ -320,6 +320,7 @@ static long evdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
...
@@ -320,6 +320,7 @@ static long evdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if
(
t
<
0
||
t
>=
dev
->
keycodemax
||
!
dev
->
keycodesize
)
return
-
EINVAL
;
if
(
t
<
0
||
t
>=
dev
->
keycodemax
||
!
dev
->
keycodesize
)
return
-
EINVAL
;
if
(
get_user
(
v
,
ip
+
1
))
return
-
EFAULT
;
if
(
get_user
(
v
,
ip
+
1
))
return
-
EFAULT
;
if
(
v
<
0
||
v
>
KEY_MAX
)
return
-
EINVAL
;
if
(
v
<
0
||
v
>
KEY_MAX
)
return
-
EINVAL
;
if
(
v
>>
(
dev
->
keycodesize
*
8
))
return
-
EINVAL
;
u
=
SET_INPUT_KEYCODE
(
dev
,
t
,
v
);
u
=
SET_INPUT_KEYCODE
(
dev
,
t
,
v
);
clear_bit
(
u
,
dev
->
keybit
);
clear_bit
(
u
,
dev
->
keybit
);
set_bit
(
v
,
dev
->
keybit
);
set_bit
(
v
,
dev
->
keybit
);
...
...
drivers/input/input.c
View file @
e0d7ff16
This diff is collapsed.
Click to expand it.
drivers/input/joydev.c
View file @
e0d7ff16
...
@@ -37,8 +37,6 @@ MODULE_LICENSE("GPL");
...
@@ -37,8 +37,6 @@ MODULE_LICENSE("GPL");
#define JOYDEV_MINORS 16
#define JOYDEV_MINORS 16
#define JOYDEV_BUFFER_SIZE 64
#define JOYDEV_BUFFER_SIZE 64
#define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
struct
joydev
{
struct
joydev
{
int
exist
;
int
exist
;
int
open
;
int
open
;
...
@@ -117,7 +115,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
...
@@ -117,7 +115,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
return
;
return
;
}
}
event
.
time
=
MSECS
(
jiffies
);
event
.
time
=
jiffies_to_msecs
(
jiffies
);
list_for_each_entry
(
list
,
&
joydev
->
list
,
node
)
{
list_for_each_entry
(
list
,
&
joydev
->
list
,
node
)
{
...
@@ -245,7 +243,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo
...
@@ -245,7 +243,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo
struct
js_event
event
;
struct
js_event
event
;
event
.
time
=
MSECS
(
jiffies
);
event
.
time
=
jiffies_to_msecs
(
jiffies
);
if
(
list
->
startup
<
joydev
->
nkey
)
{
if
(
list
->
startup
<
joydev
->
nkey
)
{
event
.
type
=
JS_EVENT_BUTTON
|
JS_EVENT_INIT
;
event
.
type
=
JS_EVENT_BUTTON
|
JS_EVENT_INIT
;
...
...
drivers/input/misc/uinput.c
View file @
e0d7ff16
This diff is collapsed.
Click to expand it.
drivers/input/mouse/alps.c
View file @
e0d7ff16
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ALPS touchpad PS/2 mouse driver
* ALPS touchpad PS/2 mouse driver
*
*
* Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au>
* Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au>
* Copyright (c) 2003 Peter Osterlund <petero2@telia.com>
* Copyright (c) 2003
-2005
Peter Osterlund <petero2@telia.com>
* Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
* Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
* Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
* Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
*
*
...
@@ -350,7 +350,6 @@ static int alps_tap_mode(struct psmouse *psmouse, int enable)
...
@@ -350,7 +350,6 @@ static int alps_tap_mode(struct psmouse *psmouse, int enable)
static
int
alps_reconnect
(
struct
psmouse
*
psmouse
)
static
int
alps_reconnect
(
struct
psmouse
*
psmouse
)
{
{
struct
alps_data
*
priv
=
psmouse
->
private
;
struct
alps_data
*
priv
=
psmouse
->
private
;
unsigned
char
param
[
4
];
int
version
;
int
version
;
psmouse_reset
(
psmouse
);
psmouse_reset
(
psmouse
);
...
@@ -358,21 +357,20 @@ static int alps_reconnect(struct psmouse *psmouse)
...
@@ -358,21 +357,20 @@ static int alps_reconnect(struct psmouse *psmouse)
if
(
!
(
priv
->
i
=
alps_get_model
(
psmouse
,
&
version
)))
if
(
!
(
priv
->
i
=
alps_get_model
(
psmouse
,
&
version
)))
return
-
1
;
return
-
1
;
if
(
priv
->
i
->
flags
&
ALPS_PASS
&&
alps_passthrough_mode
(
psmouse
,
1
))
if
(
(
priv
->
i
->
flags
&
ALPS_PASS
)
&&
alps_passthrough_mode
(
psmouse
,
1
))
return
-
1
;
return
-
1
;
if
(
alps_get_status
(
psmouse
,
param
))
if
(
alps_tap_mode
(
psmouse
,
1
))
{
printk
(
KERN_WARNING
"alps.c: Failed to reenable hardware tapping
\n
"
);
return
-
1
;
return
-
1
;
}
if
(
!
(
param
[
0
]
&
0x04
))
alps_tap_mode
(
psmouse
,
1
);
if
(
alps_absolute_mode
(
psmouse
))
{
if
(
alps_absolute_mode
(
psmouse
))
{
printk
(
KERN_ERR
"alps.c: Failed to enable absolute mode
\n
"
);
printk
(
KERN_ERR
"alps.c: Failed to
re
enable absolute mode
\n
"
);
return
-
1
;
return
-
1
;
}
}
if
(
priv
->
i
->
flags
==
ALPS_PASS
&&
alps_passthrough_mode
(
psmouse
,
0
))
if
(
(
priv
->
i
->
flags
&
ALPS_PASS
)
&&
alps_passthrough_mode
(
psmouse
,
0
))
return
-
1
;
return
-
1
;
return
0
;
return
0
;
...
@@ -389,7 +387,6 @@ static void alps_disconnect(struct psmouse *psmouse)
...
@@ -389,7 +387,6 @@ static void alps_disconnect(struct psmouse *psmouse)
int
alps_init
(
struct
psmouse
*
psmouse
)
int
alps_init
(
struct
psmouse
*
psmouse
)
{
{
struct
alps_data
*
priv
;
struct
alps_data
*
priv
;
unsigned
char
param
[
4
];
int
version
;
int
version
;
psmouse
->
private
=
priv
=
kmalloc
(
sizeof
(
struct
alps_data
),
GFP_KERNEL
);
psmouse
->
private
=
priv
=
kmalloc
(
sizeof
(
struct
alps_data
),
GFP_KERNEL
);
...
@@ -403,16 +400,8 @@ int alps_init(struct psmouse *psmouse)
...
@@ -403,16 +400,8 @@ int alps_init(struct psmouse *psmouse)
if
((
priv
->
i
->
flags
&
ALPS_PASS
)
&&
alps_passthrough_mode
(
psmouse
,
1
))
if
((
priv
->
i
->
flags
&
ALPS_PASS
)
&&
alps_passthrough_mode
(
psmouse
,
1
))
goto
init_fail
;
goto
init_fail
;
if
(
alps_get_status
(
psmouse
,
param
))
{
if
(
alps_tap_mode
(
psmouse
,
1
))
printk
(
KERN_ERR
"alps.c: touchpad status report request failed
\n
"
);
printk
(
KERN_WARNING
"alps.c: Failed to enable hardware tapping
\n
"
);
goto
init_fail
;
}
if
(
param
[
0
]
&
0x04
)
{
printk
(
KERN_INFO
"alps.c: Enabling hardware tapping
\n
"
);
if
(
alps_tap_mode
(
psmouse
,
1
))
printk
(
KERN_WARNING
"alps.c: Failed to enable hardware tapping
\n
"
);
}
if
(
alps_absolute_mode
(
psmouse
))
{
if
(
alps_absolute_mode
(
psmouse
))
{
printk
(
KERN_ERR
"alps.c: Failed to enable absolute mode
\n
"
);
printk
(
KERN_ERR
"alps.c: Failed to enable absolute mode
\n
"
);
...
...
drivers/input/mouse/logips2pp.c
View file @
e0d7ff16
...
@@ -385,8 +385,6 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
...
@@ -385,8 +385,6 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
if
(
buttons
<
3
)
if
(
buttons
<
3
)
clear_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
clear_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
if
(
buttons
<
2
)
clear_bit
(
BTN_RIGHT
,
psmouse
->
dev
.
keybit
);
if
(
model_info
)
if
(
model_info
)
ps2pp_set_model_properties
(
psmouse
,
model_info
,
use_ps2pp
);
ps2pp_set_model_properties
(
psmouse
,
model_info
,
use_ps2pp
);
...
...
drivers/input/mouse/psmouse-base.c
View file @
e0d7ff16
...
@@ -344,6 +344,7 @@ static int intellimouse_detect(struct psmouse *psmouse, int set_properties)
...
@@ -344,6 +344,7 @@ static int intellimouse_detect(struct psmouse *psmouse, int set_properties)
return
-
1
;
return
-
1
;
if
(
set_properties
)
{
if
(
set_properties
)
{
set_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
if
(
!
psmouse
->
vendor
)
psmouse
->
vendor
=
"Generic"
;
if
(
!
psmouse
->
vendor
)
psmouse
->
vendor
=
"Generic"
;
...
@@ -376,6 +377,7 @@ static int im_explorer_detect(struct psmouse *psmouse, int set_properties)
...
@@ -376,6 +377,7 @@ static int im_explorer_detect(struct psmouse *psmouse, int set_properties)
return
-
1
;
return
-
1
;
if
(
set_properties
)
{
if
(
set_properties
)
{
set_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
BTN_SIDE
,
psmouse
->
dev
.
keybit
);
set_bit
(
BTN_SIDE
,
psmouse
->
dev
.
keybit
);
set_bit
(
BTN_EXTRA
,
psmouse
->
dev
.
keybit
);
set_bit
(
BTN_EXTRA
,
psmouse
->
dev
.
keybit
);
...
...
drivers/input/mouse/synaptics.c
View file @
e0d7ff16
...
@@ -219,7 +219,7 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet
...
@@ -219,7 +219,7 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet
serio_interrupt
(
ptport
,
packet
[
1
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
1
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
4
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
4
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
5
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
5
],
0
,
NULL
);
if
(
child
->
type
>=
PSMOUSE_GENPS
)
if
(
child
->
pktsize
==
4
)
serio_interrupt
(
ptport
,
packet
[
2
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
2
],
0
,
NULL
);
}
else
}
else
serio_interrupt
(
ptport
,
packet
[
1
],
0
,
NULL
);
serio_interrupt
(
ptport
,
packet
[
1
],
0
,
NULL
);
...
@@ -233,7 +233,7 @@ static void synaptics_pt_activate(struct psmouse *psmouse)
...
@@ -233,7 +233,7 @@ static void synaptics_pt_activate(struct psmouse *psmouse)
/* adjust the touchpad to child's choice of protocol */
/* adjust the touchpad to child's choice of protocol */
if
(
child
)
{
if
(
child
)
{
if
(
child
->
type
>=
PSMOUSE_GENPS
)
if
(
child
->
pktsize
==
4
)
priv
->
mode
|=
SYN_BIT_FOUR_BYTE_CLIENT
;
priv
->
mode
|=
SYN_BIT_FOUR_BYTE_CLIENT
;
else
else
priv
->
mode
&=
~
SYN_BIT_FOUR_BYTE_CLIENT
;
priv
->
mode
&=
~
SYN_BIT_FOUR_BYTE_CLIENT
;
...
@@ -608,6 +608,13 @@ static struct dmi_system_id toshiba_dmi_table[] = {
...
@@ -608,6 +608,13 @@ static struct dmi_system_id toshiba_dmi_table[] = {
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Satellite"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Satellite"
),
},
},
},
},
{
.
ident
=
"Toshiba Dynabook"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"TOSHIBA"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"dynabook"
),
},
},
{
}
{
}
};
};
#endif
#endif
...
@@ -656,7 +663,8 @@ int synaptics_init(struct psmouse *psmouse)
...
@@ -656,7 +663,8 @@ int synaptics_init(struct psmouse *psmouse)
* thye same as rate of standard PS/2 mouse.
* thye same as rate of standard PS/2 mouse.
*/
*/
if
(
psmouse
->
rate
>=
80
&&
dmi_check_system
(
toshiba_dmi_table
))
{
if
(
psmouse
->
rate
>=
80
&&
dmi_check_system
(
toshiba_dmi_table
))
{
printk
(
KERN_INFO
"synaptics: Toshiba Satellite detected, limiting rate to 40pps.
\n
"
);
printk
(
KERN_INFO
"synaptics: Toshiba %s detected, limiting rate to 40pps.
\n
"
,
dmi_get_system_info
(
DMI_PRODUCT_NAME
));
psmouse
->
rate
=
40
;
psmouse
->
rate
=
40
;
}
}
#endif
#endif
...
...
drivers/input/serio/Kconfig
View file @
e0d7ff16
...
@@ -175,7 +175,7 @@ config SERIO_RAW
...
@@ -175,7 +175,7 @@ config SERIO_RAW
allocating minor 1 (that historically corresponds to /dev/psaux)
allocating minor 1 (that historically corresponds to /dev/psaux)
first. To bind this driver to a serio port use sysfs interface:
first. To bind this driver to a serio port use sysfs interface:
echo -n "serio_raw" > /sys/bus/serio/devices/serioX/dr
iver
echo -n "serio_raw" > /sys/bus/serio/devices/serioX/dr
vctl
To compile this driver as a module, choose M here: the
To compile this driver as a module, choose M here: the
module will be called serio_raw.
module will be called serio_raw.
...
...
drivers/input/serio/i8042-x86ia64io.h
View file @
e0d7ff16
...
@@ -130,6 +130,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
...
@@ -130,6 +130,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"FMVLT70H"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"FMVLT70H"
),
},
},
},
},
{
.
ident
=
"Fujitsu-Siemens Lifebook T3010"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"FUJITSU SIEMENS"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"LIFEBOOK T3010"
),
},
},
{
{
.
ident
=
"Toshiba P10"
,
.
ident
=
"Toshiba P10"
,
.
matches
=
{
.
matches
=
{
...
@@ -137,6 +144,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
...
@@ -137,6 +144,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Satellite P10"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Satellite P10"
),
},
},
},
},
{
.
ident
=
"Alienware Sentia"
,
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"ALIENWARE"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"Sentia"
),
},
},
{
}
{
}
};
};
...
...
drivers/input/serio/i8042.c
View file @
e0d7ff16
...
@@ -100,7 +100,7 @@ struct i8042_port {
...
@@ -100,7 +100,7 @@ struct i8042_port {
static
struct
i8042_port
i8042_ports
[
I8042_NUM_PORTS
]
=
{
static
struct
i8042_port
i8042_ports
[
I8042_NUM_PORTS
]
=
{
{
{
.
disable
=
I8042_CTR_KBDDIS
,
.
disable
=
I8042_CTR_KBDDIS
,
.
irqen
=
I8042_CTR_KBDINT
,
.
irqen
=
I8042_CTR_KBDINT
,
.
mux
=
-
1
,
.
mux
=
-
1
,
.
name
=
"KBD"
,
.
name
=
"KBD"
,
},
},
...
@@ -191,41 +191,45 @@ static int i8042_flush(void)
...
@@ -191,41 +191,45 @@ static int i8042_flush(void)
static
int
i8042_command
(
unsigned
char
*
param
,
int
command
)
static
int
i8042_command
(
unsigned
char
*
param
,
int
command
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
int
retval
=
0
,
i
=
0
;
int
i
,
retval
,
auxerr
=
0
;
if
(
i8042_noloop
&&
command
==
I8042_CMD_AUX_LOOP
)
if
(
i8042_noloop
&&
command
==
I8042_CMD_AUX_LOOP
)
return
-
1
;
return
-
1
;
spin_lock_irqsave
(
&
i8042_lock
,
flags
);
spin_lock_irqsave
(
&
i8042_lock
,
flags
);
retval
=
i8042_wait_write
();
if
((
retval
=
i8042_wait_write
()))
if
(
!
retval
)
{
goto
out
;
dbg
(
"%02x -> i8042 (command)"
,
command
&
0xff
);
i8042_write_command
(
command
&
0xff
);
dbg
(
"%02x -> i8042 (command)"
,
command
&
0xff
);
i8042_write_command
(
command
&
0xff
);
for
(
i
=
0
;
i
<
((
command
>>
12
)
&
0xf
);
i
++
)
{
if
((
retval
=
i8042_wait_write
()))
goto
out
;
dbg
(
"%02x -> i8042 (parameter)"
,
param
[
i
]);
i8042_write_data
(
param
[
i
]);
}
}
if
(
!
retval
)
for
(
i
=
0
;
i
<
((
command
>>
8
)
&
0xf
);
i
++
)
{
for
(
i
=
0
;
i
<
((
command
>>
12
)
&
0xf
);
i
++
)
{
if
((
retval
=
i8042_wait_read
()))
if
((
retval
=
i8042_wait_write
()))
break
;
goto
out
;
dbg
(
"%02x -> i8042 (parameter)"
,
param
[
i
]);
i8042_write_data
(
param
[
i
]);
}
if
(
!
retval
)
if
(
command
==
I8042_CMD_AUX_LOOP
&&
for
(
i
=
0
;
i
<
((
command
>>
8
)
&
0xf
);
i
++
)
{
!
(
i8042_read_status
()
&
I8042_STR_AUXDATA
))
{
if
((
retval
=
i8042_wait_read
()))
break
;
retval
=
auxerr
=
-
1
;
if
(
i8042_read_status
()
&
I8042_STR_AUXDATA
)
goto
out
;
param
[
i
]
=
~
i8042_read_data
();
else
param
[
i
]
=
i8042_read_data
();
dbg
(
"%02x <- i8042 (return)"
,
param
[
i
]);
}
}
spin_unlock_irqrestore
(
&
i8042_lock
,
flags
);
param
[
i
]
=
i8042_read_data
();
dbg
(
"%02x <- i8042 (return)"
,
param
[
i
]);
}
if
(
retval
)
if
(
retval
)
dbg
(
" -- i8042 (
timeout)
"
);
dbg
(
" -- i8042 (
%s)"
,
auxerr
?
"auxerr"
:
"timeout
"
);
out:
spin_unlock_irqrestore
(
&
i8042_lock
,
flags
);
return
retval
;
return
retval
;
}
}
...
@@ -507,17 +511,17 @@ static int i8042_set_mux_mode(unsigned int mode, unsigned char *mux_version)
...
@@ -507,17 +511,17 @@ static int i8042_set_mux_mode(unsigned int mode, unsigned char *mux_version)
*/
*/
param
=
0xf0
;
param
=
0xf0
;
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
!=
0x
0f
)
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
!=
0x
f0
)
return
-
1
;
return
-
1
;
param
=
mode
?
0x56
:
0xf6
;
param
=
mode
?
0x56
:
0xf6
;
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
!=
(
mode
?
0x
a9
:
0x09
))
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
!=
(
mode
?
0x
56
:
0xf6
))
return
-
1
;
return
-
1
;
param
=
mode
?
0xa4
:
0xa5
;
param
=
mode
?
0xa4
:
0xa5
;
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
==
(
mode
?
0x
5b
:
0x5a
))
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
==
(
mode
?
0x
a4
:
0xa5
))
return
-
1
;
return
-
1
;
if
(
mux_version
)
if
(
mux_version
)
*
mux_version
=
~
param
;
*
mux_version
=
param
;
return
0
;
return
0
;
}
}
...
@@ -619,7 +623,7 @@ static int __init i8042_check_aux(void)
...
@@ -619,7 +623,7 @@ static int __init i8042_check_aux(void)
*/
*/
param
=
0x5a
;
param
=
0x5a
;
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
!=
0x
a5
)
{
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_LOOP
)
||
param
!=
0x
5a
)
{
/*
/*
* External connection test - filters out AT-soldered PS/2 i8042's
* External connection test - filters out AT-soldered PS/2 i8042's
...
@@ -630,7 +634,7 @@ static int __init i8042_check_aux(void)
...
@@ -630,7 +634,7 @@ static int __init i8042_check_aux(void)
*/
*/
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_TEST
)
if
(
i8042_command
(
&
param
,
I8042_CMD_AUX_TEST
)
||
(
param
&&
param
!=
0xfa
&&
param
!=
0xff
))
||
(
param
&&
param
!=
0xfa
&&
param
!=
0xff
))
return
-
1
;
return
-
1
;
}
}
...
...
drivers/input/serio/serio.c
View file @
e0d7ff16
...
@@ -389,6 +389,14 @@ static ssize_t serio_show_description(struct device *dev, struct device_attribut
...
@@ -389,6 +389,14 @@ static ssize_t serio_show_description(struct device *dev, struct device_attribut
return
sprintf
(
buf
,
"%s
\n
"
,
serio
->
name
);
return
sprintf
(
buf
,
"%s
\n
"
,
serio
->
name
);
}
}
static
ssize_t
serio_show_modalias
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
struct
serio
*
serio
=
to_serio_port
(
dev
);
return
sprintf
(
buf
,
"serio:ty%02Xpr%02Xid%02Xex%02X
\n
"
,
serio
->
id
.
type
,
serio
->
id
.
proto
,
serio
->
id
.
id
,
serio
->
id
.
extra
);
}
static
ssize_t
serio_show_id_type
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
static
ssize_t
serio_show_id_type
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
{
struct
serio
*
serio
=
to_serio_port
(
dev
);
struct
serio
*
serio
=
to_serio_port
(
dev
);
...
@@ -487,6 +495,7 @@ static ssize_t serio_set_bind_mode(struct device *dev, struct device_attribute *
...
@@ -487,6 +495,7 @@ static ssize_t serio_set_bind_mode(struct device *dev, struct device_attribute *
static
struct
device_attribute
serio_device_attrs
[]
=
{
static
struct
device_attribute
serio_device_attrs
[]
=
{
__ATTR
(
description
,
S_IRUGO
,
serio_show_description
,
NULL
),
__ATTR
(
description
,
S_IRUGO
,
serio_show_description
,
NULL
),
__ATTR
(
modalias
,
S_IRUGO
,
serio_show_modalias
,
NULL
),
__ATTR
(
drvctl
,
S_IWUSR
,
NULL
,
serio_rebind_driver
),
__ATTR
(
drvctl
,
S_IWUSR
,
NULL
,
serio_rebind_driver
),
__ATTR
(
bind_mode
,
S_IWUSR
|
S_IRUGO
,
serio_show_bind_mode
,
serio_set_bind_mode
),
__ATTR
(
bind_mode
,
S_IWUSR
|
S_IRUGO
,
serio_show_bind_mode
,
serio_set_bind_mode
),
__ATTR_NULL
__ATTR_NULL
...
@@ -785,36 +794,37 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv)
...
@@ -785,36 +794,37 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv)
#ifdef CONFIG_HOTPLUG
#ifdef CONFIG_HOTPLUG
#define
PUT_ENVP(fmt, val)
\
#define
SERIO_ADD_HOTPLUG_VAR(fmt, val...)
\
do {
\
do {
\
envp[i++] = buffer;
\
int err = add_hotplug_env_var(envp, num_envp, &i,
\
length += snprintf(buffer, buffer_size - length, fmt, val);
\
buffer, buffer_size, &len,
\
if (buffer_size - length <= 0 || i >= num_envp)
\
fmt, val);
\
return -ENOMEM;
\
if (err)
\
length++;
\
return err;
\
buffer += length; \
} while (0)
} while (0)
static
int
serio_hotplug
(
struct
device
*
dev
,
char
**
envp
,
int
num_envp
,
char
*
buffer
,
int
buffer_size
)
static
int
serio_hotplug
(
struct
device
*
dev
,
char
**
envp
,
int
num_envp
,
char
*
buffer
,
int
buffer_size
)
{
{
struct
serio
*
serio
;
struct
serio
*
serio
;
int
i
=
0
;
int
i
=
0
;
int
len
gth
=
0
;
int
len
=
0
;
if
(
!
dev
)
if
(
!
dev
)
return
-
ENODEV
;
return
-
ENODEV
;
serio
=
to_serio_port
(
dev
);
serio
=
to_serio_port
(
dev
);
PUT_ENVP
(
"SERIO_TYPE=%02x"
,
serio
->
id
.
type
);
SERIO_ADD_HOTPLUG_VAR
(
"SERIO_TYPE=%02x"
,
serio
->
id
.
type
);
PUT_ENVP
(
"SERIO_PROTO=%02x"
,
serio
->
id
.
proto
);
SERIO_ADD_HOTPLUG_VAR
(
"SERIO_PROTO=%02x"
,
serio
->
id
.
proto
);
PUT_ENVP
(
"SERIO_ID=%02x"
,
serio
->
id
.
id
);
SERIO_ADD_HOTPLUG_VAR
(
"SERIO_ID=%02x"
,
serio
->
id
.
id
);
PUT_ENVP
(
"SERIO_EXTRA=%02x"
,
serio
->
id
.
extra
);
SERIO_ADD_HOTPLUG_VAR
(
"SERIO_EXTRA=%02x"
,
serio
->
id
.
extra
);
SERIO_ADD_HOTPLUG_VAR
(
"MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X"
,
serio
->
id
.
type
,
serio
->
id
.
proto
,
serio
->
id
.
id
,
serio
->
id
.
extra
);
envp
[
i
]
=
NULL
;
envp
[
i
]
=
NULL
;
return
0
;
return
0
;
}
}
#undef
PUT_ENVP
#undef
SERIO_ADD_HOTPLUG_VAR
#else
#else
...
...
drivers/input/serio/serio_raw.c
View file @
e0d7ff16
...
@@ -299,6 +299,7 @@ static int serio_raw_connect(struct serio *serio, struct serio_driver *drv)
...
@@ -299,6 +299,7 @@ static int serio_raw_connect(struct serio *serio, struct serio_driver *drv)
serio_raw
->
dev
.
minor
=
PSMOUSE_MINOR
;
serio_raw
->
dev
.
minor
=
PSMOUSE_MINOR
;
serio_raw
->
dev
.
name
=
serio_raw
->
name
;
serio_raw
->
dev
.
name
=
serio_raw
->
name
;
serio_raw
->
dev
.
dev
=
&
serio
->
dev
;
serio_raw
->
dev
.
fops
=
&
serio_raw_fops
;
serio_raw
->
dev
.
fops
=
&
serio_raw_fops
;
err
=
misc_register
(
&
serio_raw
->
dev
);
err
=
misc_register
(
&
serio_raw
->
dev
);
...
...
drivers/input/touchscreen/Kconfig
View file @
e0d7ff16
...
@@ -58,7 +58,7 @@ config TOUCHSCREEN_ELO
...
@@ -58,7 +58,7 @@ config TOUCHSCREEN_ELO
If unsure, say N.
If unsure, say N.
To compile this driver as a module, choose M here: the
To compile this driver as a module, choose M here: the
module will be called
gunze
.
module will be called
elo
.
config TOUCHSCREEN_MTOUCH
config TOUCHSCREEN_MTOUCH
tristate "MicroTouch serial touchscreens"
tristate "MicroTouch serial touchscreens"
...
...
drivers/usb/input/acecad.c
View file @
e0d7ff16
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
/*
/*
* Version Information
* Version Information
...
@@ -87,8 +88,8 @@ static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs)
...
@@ -87,8 +88,8 @@ static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs)
if
(
prox
)
{
if
(
prox
)
{
int
x
=
data
[
1
]
|
(
data
[
2
]
<<
8
);
int
x
=
data
[
1
]
|
(
data
[
2
]
<<
8
);
int
y
=
data
[
3
]
|
(
data
[
4
]
<<
8
);
int
y
=
data
[
3
]
|
(
data
[
4
]
<<
8
);
/*
Pressure should compute the same way for flair and 302
*/
/*
Pressure should compute the same way for flair and 302
*/
int
pressure
=
data
[
5
]
|
(
(
int
)
data
[
6
]
<<
8
);
int
pressure
=
data
[
5
]
|
(
data
[
6
]
<<
8
);
int
touch
=
data
[
0
]
&
0x01
;
int
touch
=
data
[
0
]
&
0x01
;
int
stylus
=
(
data
[
0
]
&
0x10
)
>>
4
;
int
stylus
=
(
data
[
0
]
&
0x10
)
>>
4
;
int
stylus2
=
(
data
[
0
]
&
0x20
)
>>
5
;
int
stylus2
=
(
data
[
0
]
&
0x20
)
>>
5
;
...
@@ -104,9 +105,9 @@ static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs)
...
@@ -104,9 +105,9 @@ static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs)
input_sync
(
dev
);
input_sync
(
dev
);
resubmit:
resubmit:
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
status
=
usb_submit_urb
(
urb
,
GFP_ATOMIC
);
if
(
status
)
if
(
status
)
err
(
"can't resubmit intr, %s-%s/input0, status %d"
,
err
(
"can't resubmit intr, %s-%s/input0, status %d"
,
acecad
->
usbdev
->
bus
->
bus_name
,
acecad
->
usbdev
->
devpath
,
status
);
acecad
->
usbdev
->
bus
->
bus_name
,
acecad
->
usbdev
->
devpath
,
status
);
}
}
...
@@ -212,10 +213,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
...
@@ -212,10 +213,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
acecad
->
dev
.
name
=
acecad
->
name
;
acecad
->
dev
.
name
=
acecad
->
name
;
acecad
->
dev
.
phys
=
acecad
->
phys
;
acecad
->
dev
.
phys
=
acecad
->
phys
;
acecad
->
dev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
acecad
->
dev
.
id
);
acecad
->
dev
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
acecad
->
dev
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
acecad
->
dev
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
acecad
->
dev
.
dev
=
&
intf
->
dev
;
acecad
->
dev
.
dev
=
&
intf
->
dev
;
usb_fill_int_urb
(
acecad
->
irq
,
dev
,
pipe
,
usb_fill_int_urb
(
acecad
->
irq
,
dev
,
pipe
,
...
...
drivers/usb/input/aiptek.c
View file @
e0d7ff16
...
@@ -77,6 +77,7 @@
...
@@ -77,6 +77,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/unaligned.h>
#include <asm/unaligned.h>
...
@@ -2125,10 +2126,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
...
@@ -2125,10 +2126,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
aiptek
->
inputdev
.
absflat
[
ABS_WHEEL
]
=
0
;
aiptek
->
inputdev
.
absflat
[
ABS_WHEEL
]
=
0
;
aiptek
->
inputdev
.
name
=
"Aiptek"
;
aiptek
->
inputdev
.
name
=
"Aiptek"
;
aiptek
->
inputdev
.
phys
=
aiptek
->
features
.
usbPath
;
aiptek
->
inputdev
.
phys
=
aiptek
->
features
.
usbPath
;
aiptek
->
inputdev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
usbdev
,
&
aiptek
->
inputdev
.
id
);
aiptek
->
inputdev
.
id
.
vendor
=
le16_to_cpu
(
usbdev
->
descriptor
.
idVendor
);
aiptek
->
inputdev
.
id
.
product
=
le16_to_cpu
(
usbdev
->
descriptor
.
idProduct
);
aiptek
->
inputdev
.
id
.
version
=
le16_to_cpu
(
usbdev
->
descriptor
.
bcdDevice
);
aiptek
->
inputdev
.
dev
=
&
intf
->
dev
;
aiptek
->
inputdev
.
dev
=
&
intf
->
dev
;
aiptek
->
usbdev
=
usbdev
;
aiptek
->
usbdev
=
usbdev
;
...
...
drivers/usb/input/ati_remote.c
View file @
e0d7ff16
...
@@ -94,6 +94,7 @@
...
@@ -94,6 +94,7 @@
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>
#include <linux/input.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#include <linux/wait.h>
#include <linux/wait.h>
/*
/*
...
@@ -635,11 +636,8 @@ static void ati_remote_input_init(struct ati_remote *ati_remote)
...
@@ -635,11 +636,8 @@ static void ati_remote_input_init(struct ati_remote *ati_remote)
idev
->
name
=
ati_remote
->
name
;
idev
->
name
=
ati_remote
->
name
;
idev
->
phys
=
ati_remote
->
phys
;
idev
->
phys
=
ati_remote
->
phys
;
idev
->
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
ati_remote
->
udev
,
&
idev
->
id
);
idev
->
id
.
vendor
=
le16_to_cpu
(
ati_remote
->
udev
->
descriptor
.
idVendor
);
idev
->
dev
=
&
ati_remote
->
udev
->
dev
;
idev
->
id
.
product
=
le16_to_cpu
(
ati_remote
->
udev
->
descriptor
.
idProduct
);
idev
->
id
.
version
=
le16_to_cpu
(
ati_remote
->
udev
->
descriptor
.
bcdDevice
);
idev
->
dev
=
&
(
ati_remote
->
udev
->
dev
);
}
}
static
int
ati_remote_initialize
(
struct
ati_remote
*
ati_remote
)
static
int
ati_remote_initialize
(
struct
ati_remote
*
ati_remote
)
...
...
drivers/usb/input/hid-core.c
View file @
e0d7ff16
...
@@ -789,12 +789,12 @@ static __inline__ int search(__s32 *array, __s32 value, unsigned n)
...
@@ -789,12 +789,12 @@ static __inline__ int search(__s32 *array, __s32 value, unsigned n)
return
-
1
;
return
-
1
;
}
}
static
void
hid_process_event
(
struct
hid_device
*
hid
,
struct
hid_field
*
field
,
struct
hid_usage
*
usage
,
__s32
value
,
struct
pt_regs
*
regs
)
static
void
hid_process_event
(
struct
hid_device
*
hid
,
struct
hid_field
*
field
,
struct
hid_usage
*
usage
,
__s32
value
,
int
interrupt
,
struct
pt_regs
*
regs
)
{
{
hid_dump_input
(
usage
,
value
);
hid_dump_input
(
usage
,
value
);
if
(
hid
->
claimed
&
HID_CLAIMED_INPUT
)
if
(
hid
->
claimed
&
HID_CLAIMED_INPUT
)
hidinput_hid_event
(
hid
,
field
,
usage
,
value
,
regs
);
hidinput_hid_event
(
hid
,
field
,
usage
,
value
,
regs
);
if
(
hid
->
claimed
&
HID_CLAIMED_HIDDEV
)
if
(
hid
->
claimed
&
HID_CLAIMED_HIDDEV
&&
interrupt
)
hiddev_hid_event
(
hid
,
field
,
usage
,
value
,
regs
);
hiddev_hid_event
(
hid
,
field
,
usage
,
value
,
regs
);
}
}
...
@@ -804,7 +804,7 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s
...
@@ -804,7 +804,7 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s
* reporting to the layer).
* reporting to the layer).
*/
*/
static
void
hid_input_field
(
struct
hid_device
*
hid
,
struct
hid_field
*
field
,
__u8
*
data
,
struct
pt_regs
*
regs
)
static
void
hid_input_field
(
struct
hid_device
*
hid
,
struct
hid_field
*
field
,
__u8
*
data
,
int
interrupt
,
struct
pt_regs
*
regs
)
{
{
unsigned
n
;
unsigned
n
;
unsigned
count
=
field
->
report_count
;
unsigned
count
=
field
->
report_count
;
...
@@ -831,19 +831,19 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
...
@@ -831,19 +831,19 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
for
(
n
=
0
;
n
<
count
;
n
++
)
{
for
(
n
=
0
;
n
<
count
;
n
++
)
{
if
(
HID_MAIN_ITEM_VARIABLE
&
field
->
flags
)
{
if
(
HID_MAIN_ITEM_VARIABLE
&
field
->
flags
)
{
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
n
],
value
[
n
],
regs
);
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
n
],
value
[
n
],
interrupt
,
regs
);
continue
;
continue
;
}
}
if
(
field
->
value
[
n
]
>=
min
&&
field
->
value
[
n
]
<=
max
if
(
field
->
value
[
n
]
>=
min
&&
field
->
value
[
n
]
<=
max
&&
field
->
usage
[
field
->
value
[
n
]
-
min
].
hid
&&
field
->
usage
[
field
->
value
[
n
]
-
min
].
hid
&&
search
(
value
,
field
->
value
[
n
],
count
))
&&
search
(
value
,
field
->
value
[
n
],
count
))
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
field
->
value
[
n
]
-
min
],
0
,
regs
);
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
field
->
value
[
n
]
-
min
],
0
,
interrupt
,
regs
);
if
(
value
[
n
]
>=
min
&&
value
[
n
]
<=
max
if
(
value
[
n
]
>=
min
&&
value
[
n
]
<=
max
&&
field
->
usage
[
value
[
n
]
-
min
].
hid
&&
field
->
usage
[
value
[
n
]
-
min
].
hid
&&
search
(
field
->
value
,
value
[
n
],
count
))
&&
search
(
field
->
value
,
value
[
n
],
count
))
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
value
[
n
]
-
min
],
1
,
regs
);
hid_process_event
(
hid
,
field
,
&
field
->
usage
[
value
[
n
]
-
min
],
1
,
interrupt
,
regs
);
}
}
memcpy
(
field
->
value
,
value
,
count
*
sizeof
(
__s32
));
memcpy
(
field
->
value
,
value
,
count
*
sizeof
(
__s32
));
...
@@ -851,7 +851,7 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
...
@@ -851,7 +851,7 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u
kfree
(
value
);
kfree
(
value
);
}
}
static
int
hid_input_report
(
int
type
,
struct
urb
*
urb
,
struct
pt_regs
*
regs
)
static
int
hid_input_report
(
int
type
,
struct
urb
*
urb
,
int
interrupt
,
struct
pt_regs
*
regs
)
{
{
struct
hid_device
*
hid
=
urb
->
context
;
struct
hid_device
*
hid
=
urb
->
context
;
struct
hid_report_enum
*
report_enum
=
hid
->
report_enum
+
type
;
struct
hid_report_enum
*
report_enum
=
hid
->
report_enum
+
type
;
...
@@ -899,7 +899,7 @@ static int hid_input_report(int type, struct urb *urb, struct pt_regs *regs)
...
@@ -899,7 +899,7 @@ static int hid_input_report(int type, struct urb *urb, struct pt_regs *regs)
hiddev_report_event
(
hid
,
report
);
hiddev_report_event
(
hid
,
report
);
for
(
n
=
0
;
n
<
report
->
maxfield
;
n
++
)
for
(
n
=
0
;
n
<
report
->
maxfield
;
n
++
)
hid_input_field
(
hid
,
report
->
field
[
n
],
data
,
regs
);
hid_input_field
(
hid
,
report
->
field
[
n
],
data
,
interrupt
,
regs
);
if
(
hid
->
claimed
&
HID_CLAIMED_INPUT
)
if
(
hid
->
claimed
&
HID_CLAIMED_INPUT
)
hidinput_report_event
(
hid
,
report
);
hidinput_report_event
(
hid
,
report
);
...
@@ -918,7 +918,7 @@ static void hid_irq_in(struct urb *urb, struct pt_regs *regs)
...
@@ -918,7 +918,7 @@ static void hid_irq_in(struct urb *urb, struct pt_regs *regs)
switch
(
urb
->
status
)
{
switch
(
urb
->
status
)
{
case
0
:
/* success */
case
0
:
/* success */
hid_input_report
(
HID_INPUT_REPORT
,
urb
,
regs
);
hid_input_report
(
HID_INPUT_REPORT
,
urb
,
1
,
regs
);
break
;
break
;
case
-
ECONNRESET
:
/* unlink */
case
-
ECONNRESET
:
/* unlink */
case
-
ENOENT
:
case
-
ENOENT
:
...
@@ -1142,7 +1142,7 @@ static void hid_ctrl(struct urb *urb, struct pt_regs *regs)
...
@@ -1142,7 +1142,7 @@ static void hid_ctrl(struct urb *urb, struct pt_regs *regs)
switch
(
urb
->
status
)
{
switch
(
urb
->
status
)
{
case
0
:
/* success */
case
0
:
/* success */
if
(
hid
->
ctrl
[
hid
->
ctrltail
].
dir
==
USB_DIR_IN
)
if
(
hid
->
ctrl
[
hid
->
ctrltail
].
dir
==
USB_DIR_IN
)
hid_input_report
(
hid
->
ctrl
[
hid
->
ctrltail
].
report
->
type
,
urb
,
regs
);
hid_input_report
(
hid
->
ctrl
[
hid
->
ctrltail
].
report
->
type
,
urb
,
0
,
regs
);
case
-
ESHUTDOWN
:
/* unplug */
case
-
ESHUTDOWN
:
/* unplug */
case
-
EILSEQ
:
/* unplug timectrl on uhci */
case
-
EILSEQ
:
/* unplug timectrl on uhci */
unplug
=
1
;
unplug
=
1
;
...
@@ -1372,6 +1372,9 @@ void hid_init_reports(struct hid_device *hid)
...
@@ -1372,6 +1372,9 @@ void hid_init_reports(struct hid_device *hid)
#define USB_VENDOR_ID_A4TECH 0x09da
#define USB_VENDOR_ID_A4TECH 0x09da
#define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
#define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
#define USB_VENDOR_ID_AASHIMA 0x06D6
#define USB_DEVICE_ID_AASHIMA_GAMEPAD 0x0025
#define USB_VENDOR_ID_CYPRESS 0x04b4
#define USB_VENDOR_ID_CYPRESS 0x04b4
#define USB_DEVICE_ID_CYPRESS_MOUSE 0x0001
#define USB_DEVICE_ID_CYPRESS_MOUSE 0x0001
#define USB_DEVICE_ID_CYPRESS_HIDCOM 0x5500
#define USB_DEVICE_ID_CYPRESS_HIDCOM 0x5500
...
@@ -1548,6 +1551,7 @@ static struct hid_blacklist {
...
@@ -1548,6 +1551,7 @@ static struct hid_blacklist {
{
USB_VENDOR_ID_A4TECH
,
USB_DEVICE_ID_A4TECH_WCP32PU
,
HID_QUIRK_2WHEEL_MOUSE_HACK_7
},
{
USB_VENDOR_ID_A4TECH
,
USB_DEVICE_ID_A4TECH_WCP32PU
,
HID_QUIRK_2WHEEL_MOUSE_HACK_7
},
{
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_MOUSE
,
HID_QUIRK_2WHEEL_MOUSE_HACK_5
},
{
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_MOUSE
,
HID_QUIRK_2WHEEL_MOUSE_HACK_5
},
{
USB_VENDOR_ID_AASHIMA
,
USB_DEVICE_ID_AASHIMA_GAMEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_ALPS
,
USB_DEVICE_ID_IBM_GAMEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_ALPS
,
USB_DEVICE_ID_IBM_GAMEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_CHIC
,
USB_DEVICE_ID_CHIC_GAMEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_CHIC
,
USB_DEVICE_ID_CHIC_GAMEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_HAPP
,
USB_DEVICE_ID_UGCI_DRIVING
,
HID_QUIRK_BADPAD
|
HID_QUIRK_MULTI_INPUT
},
{
USB_VENDOR_ID_HAPP
,
USB_DEVICE_ID_UGCI_DRIVING
,
HID_QUIRK_BADPAD
|
HID_QUIRK_MULTI_INPUT
},
...
...
drivers/usb/input/hid-input.c
View file @
e0d7ff16
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/input.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#undef DEBUG
#undef DEBUG
...
@@ -581,10 +582,7 @@ int hidinput_connect(struct hid_device *hid)
...
@@ -581,10 +582,7 @@ int hidinput_connect(struct hid_device *hid)
hidinput
->
input
.
name
=
hid
->
name
;
hidinput
->
input
.
name
=
hid
->
name
;
hidinput
->
input
.
phys
=
hid
->
phys
;
hidinput
->
input
.
phys
=
hid
->
phys
;
hidinput
->
input
.
uniq
=
hid
->
uniq
;
hidinput
->
input
.
uniq
=
hid
->
uniq
;
hidinput
->
input
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
hidinput
->
input
.
id
);
hidinput
->
input
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
hidinput
->
input
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
hidinput
->
input
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
hidinput
->
input
.
dev
=
&
hid
->
intf
->
dev
;
hidinput
->
input
.
dev
=
&
hid
->
intf
->
dev
;
}
}
...
...
drivers/usb/input/itmtouch.c
View file @
e0d7ff16
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
/* only an 8 byte buffer necessary for a single packet */
/* only an 8 byte buffer necessary for a single packet */
#define ITM_BUFSIZE 8
#define ITM_BUFSIZE 8
...
@@ -184,10 +185,7 @@ static int itmtouch_probe(struct usb_interface *intf, const struct usb_device_id
...
@@ -184,10 +185,7 @@ static int itmtouch_probe(struct usb_interface *intf, const struct usb_device_id
itmtouch
->
inputdev
.
name
=
itmtouch
->
name
;
itmtouch
->
inputdev
.
name
=
itmtouch
->
name
;
itmtouch
->
inputdev
.
phys
=
itmtouch
->
phys
;
itmtouch
->
inputdev
.
phys
=
itmtouch
->
phys
;
itmtouch
->
inputdev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
udev
,
&
itmtouch
->
inputdev
.
id
);
itmtouch
->
inputdev
.
id
.
vendor
=
udev
->
descriptor
.
idVendor
;
itmtouch
->
inputdev
.
id
.
product
=
udev
->
descriptor
.
idProduct
;
itmtouch
->
inputdev
.
id
.
version
=
udev
->
descriptor
.
bcdDevice
;
itmtouch
->
inputdev
.
dev
=
&
intf
->
dev
;
itmtouch
->
inputdev
.
dev
=
&
intf
->
dev
;
if
(
!
strlen
(
itmtouch
->
name
))
if
(
!
strlen
(
itmtouch
->
name
))
...
...
drivers/usb/input/kbtab.c
View file @
e0d7ff16
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#include <asm/unaligned.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>
#include <asm/byteorder.h>
...
@@ -167,10 +168,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
...
@@ -167,10 +168,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
kbtab
->
dev
.
name
=
"KB Gear Tablet"
;
kbtab
->
dev
.
name
=
"KB Gear Tablet"
;
kbtab
->
dev
.
phys
=
kbtab
->
phys
;
kbtab
->
dev
.
phys
=
kbtab
->
phys
;
kbtab
->
dev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
kbtab
->
dev
.
id
);
kbtab
->
dev
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
kbtab
->
dev
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
kbtab
->
dev
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
kbtab
->
dev
.
dev
=
&
intf
->
dev
;
kbtab
->
dev
.
dev
=
&
intf
->
dev
;
kbtab
->
usbdev
=
dev
;
kbtab
->
usbdev
=
dev
;
...
...
drivers/usb/input/mtouchusb.c
View file @
e0d7ff16
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#define MTOUCHUSB_MIN_XC 0x0
#define MTOUCHUSB_MIN_XC 0x0
#define MTOUCHUSB_MAX_RAW_XC 0x4000
#define MTOUCHUSB_MAX_RAW_XC 0x4000
...
@@ -232,10 +233,7 @@ static int mtouchusb_probe(struct usb_interface *intf, const struct usb_device_i
...
@@ -232,10 +233,7 @@ static int mtouchusb_probe(struct usb_interface *intf, const struct usb_device_i
mtouch
->
input
.
name
=
mtouch
->
name
;
mtouch
->
input
.
name
=
mtouch
->
name
;
mtouch
->
input
.
phys
=
mtouch
->
phys
;
mtouch
->
input
.
phys
=
mtouch
->
phys
;
mtouch
->
input
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
udev
,
&
mtouch
->
input
.
id
);
mtouch
->
input
.
id
.
vendor
=
le16_to_cpu
(
udev
->
descriptor
.
idVendor
);
mtouch
->
input
.
id
.
product
=
le16_to_cpu
(
udev
->
descriptor
.
idProduct
);
mtouch
->
input
.
id
.
version
=
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
);
mtouch
->
input
.
dev
=
&
intf
->
dev
;
mtouch
->
input
.
dev
=
&
intf
->
dev
;
mtouch
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
mtouch
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/usb/input/powermate.c
View file @
e0d7ff16
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#define POWERMATE_VENDOR 0x077d
/* Griffin Technology, Inc. */
#define POWERMATE_VENDOR 0x077d
/* Griffin Technology, Inc. */
#define POWERMATE_PRODUCT_NEW 0x0410
/* Griffin PowerMate */
#define POWERMATE_PRODUCT_NEW 0x0410
/* Griffin PowerMate */
...
@@ -389,10 +390,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
...
@@ -389,10 +390,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
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
.
bustype
=
BUS_USB
;
usb_to_input_id
(
udev
,
&
pm
->
input
.
id
);
pm
->
input
.
id
.
vendor
=
le16_to_cpu
(
udev
->
descriptor
.
idVendor
);
pm
->
input
.
id
.
product
=
le16_to_cpu
(
udev
->
descriptor
.
idProduct
);
pm
->
input
.
id
.
version
=
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
);
pm
->
input
.
event
=
powermate_input_event
;
pm
->
input
.
event
=
powermate_input_event
;
pm
->
input
.
dev
=
&
intf
->
dev
;
pm
->
input
.
dev
=
&
intf
->
dev
;
pm
->
input
.
phys
=
pm
->
phys
;
pm
->
input
.
phys
=
pm
->
phys
;
...
...
drivers/usb/input/touchkitusb.c
View file @
e0d7ff16
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#define DEBUG
#define DEBUG
#endif
#endif
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#define TOUCHKIT_MIN_XC 0x0
#define TOUCHKIT_MIN_XC 0x0
#define TOUCHKIT_MAX_XC 0x07ff
#define TOUCHKIT_MAX_XC 0x07ff
...
@@ -202,10 +202,7 @@ static int touchkit_probe(struct usb_interface *intf,
...
@@ -202,10 +202,7 @@ static int touchkit_probe(struct usb_interface *intf,
touchkit
->
input
.
name
=
touchkit
->
name
;
touchkit
->
input
.
name
=
touchkit
->
name
;
touchkit
->
input
.
phys
=
touchkit
->
phys
;
touchkit
->
input
.
phys
=
touchkit
->
phys
;
touchkit
->
input
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
udev
,
&
touchkit
->
input
.
id
);
touchkit
->
input
.
id
.
vendor
=
le16_to_cpu
(
udev
->
descriptor
.
idVendor
);
touchkit
->
input
.
id
.
product
=
le16_to_cpu
(
udev
->
descriptor
.
idProduct
);
touchkit
->
input
.
id
.
version
=
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
);
touchkit
->
input
.
dev
=
&
intf
->
dev
;
touchkit
->
input
.
dev
=
&
intf
->
dev
;
touchkit
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
touchkit
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
);
...
...
drivers/usb/input/usbkbd.c
View file @
e0d7ff16
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <linux/input.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
/*
/*
* Version Information
* Version Information
...
@@ -288,10 +289,7 @@ static int usb_kbd_probe(struct usb_interface *iface,
...
@@ -288,10 +289,7 @@ static int usb_kbd_probe(struct usb_interface *iface,
kbd
->
dev
.
name
=
kbd
->
name
;
kbd
->
dev
.
name
=
kbd
->
name
;
kbd
->
dev
.
phys
=
kbd
->
phys
;
kbd
->
dev
.
phys
=
kbd
->
phys
;
kbd
->
dev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
kbd
->
dev
.
id
);
kbd
->
dev
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
kbd
->
dev
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
kbd
->
dev
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
kbd
->
dev
.
dev
=
&
iface
->
dev
;
kbd
->
dev
.
dev
=
&
iface
->
dev
;
if
(
dev
->
manufacturer
)
if
(
dev
->
manufacturer
)
...
...
drivers/usb/input/usbmouse.c
View file @
e0d7ff16
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
/*
/*
* Version Information
* Version Information
...
@@ -171,10 +172,7 @@ static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_
...
@@ -171,10 +172,7 @@ static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_
mouse
->
dev
.
name
=
mouse
->
name
;
mouse
->
dev
.
name
=
mouse
->
name
;
mouse
->
dev
.
phys
=
mouse
->
phys
;
mouse
->
dev
.
phys
=
mouse
->
phys
;
mouse
->
dev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
mouse
->
dev
.
id
);
mouse
->
dev
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
mouse
->
dev
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
mouse
->
dev
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
mouse
->
dev
.
dev
=
&
intf
->
dev
;
mouse
->
dev
.
dev
=
&
intf
->
dev
;
if
(
dev
->
manufacturer
)
if
(
dev
->
manufacturer
)
...
...
drivers/usb/input/wacom.c
View file @
e0d7ff16
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#include <asm/unaligned.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>
#include <asm/byteorder.h>
...
@@ -823,10 +824,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
...
@@ -823,10 +824,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
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
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
wacom
->
dev
.
id
);
wacom
->
dev
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
wacom
->
dev
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
wacom
->
dev
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
wacom
->
dev
.
dev
=
&
intf
->
dev
;
wacom
->
dev
.
dev
=
&
intf
->
dev
;
wacom
->
usbdev
=
dev
;
wacom
->
usbdev
=
dev
;
...
...
drivers/usb/input/xpad.c
View file @
e0d7ff16
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/usb_input.h>
#define DRIVER_VERSION "v0.0.5"
#define DRIVER_VERSION "v0.0.5"
#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
...
@@ -256,10 +257,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
...
@@ -256,10 +257,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
xpad
->
udev
=
udev
;
xpad
->
udev
=
udev
;
xpad
->
dev
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
udev
,
&
xpad
->
dev
.
id
);
xpad
->
dev
.
id
.
vendor
=
le16_to_cpu
(
udev
->
descriptor
.
idVendor
);
xpad
->
dev
.
id
.
product
=
le16_to_cpu
(
udev
->
descriptor
.
idProduct
);
xpad
->
dev
.
id
.
version
=
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
);
xpad
->
dev
.
dev
=
&
intf
->
dev
;
xpad
->
dev
.
dev
=
&
intf
->
dev
;
xpad
->
dev
.
private
=
xpad
;
xpad
->
dev
.
private
=
xpad
;
xpad
->
dev
.
name
=
xpad_device
[
i
].
name
;
xpad
->
dev
.
name
=
xpad_device
[
i
].
name
;
...
...
drivers/usb/media/konicawc.c
View file @
e0d7ff16
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input.h>
#include <linux/usb_input.h>
#include "usbvideo.h"
#include "usbvideo.h"
...
@@ -845,10 +846,7 @@ static int konicawc_probe(struct usb_interface *intf, const struct usb_device_id
...
@@ -845,10 +846,7 @@ static int konicawc_probe(struct usb_interface *intf, const struct usb_device_id
cam
->
input
.
private
=
cam
;
cam
->
input
.
private
=
cam
;
cam
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
);
cam
->
input
.
evbit
[
0
]
=
BIT
(
EV_KEY
);
cam
->
input
.
keybit
[
LONG
(
BTN_0
)]
=
BIT
(
BTN_0
);
cam
->
input
.
keybit
[
LONG
(
BTN_0
)]
=
BIT
(
BTN_0
);
cam
->
input
.
id
.
bustype
=
BUS_USB
;
usb_to_input_id
(
dev
,
&
cam
->
input
.
id
);
cam
->
input
.
id
.
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
cam
->
input
.
id
.
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
cam
->
input
.
id
.
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
input_register_device
(
&
cam
->
input
);
input_register_device
(
&
cam
->
input
);
usb_make_path
(
dev
,
cam
->
input_physname
,
56
);
usb_make_path
(
dev
,
cam
->
input_physname
,
56
);
...
...
include/linux/input.h
View file @
e0d7ff16
...
@@ -811,9 +811,9 @@ struct input_dev {
...
@@ -811,9 +811,9 @@ struct input_dev {
void
*
private
;
void
*
private
;
char
*
name
;
c
onst
c
har
*
name
;
char
*
phys
;
c
onst
c
har
*
phys
;
char
*
uniq
;
c
onst
c
har
*
uniq
;
struct
input_id
id
;
struct
input_id
id
;
unsigned
long
evbit
[
NBITS
(
EV_MAX
)];
unsigned
long
evbit
[
NBITS
(
EV_MAX
)];
...
...
include/linux/uinput.h
View file @
e0d7ff16
...
@@ -42,8 +42,7 @@ struct uinput_request {
...
@@ -42,8 +42,7 @@ struct uinput_request {
int
code
;
/* UI_FF_UPLOAD, UI_FF_ERASE */
int
code
;
/* UI_FF_UPLOAD, UI_FF_ERASE */
int
retval
;
int
retval
;
wait_queue_head_t
waitq
;
struct
completion
done
;
int
completed
;
union
{
union
{
int
effect_id
;
int
effect_id
;
...
@@ -62,7 +61,7 @@ struct uinput_device {
...
@@ -62,7 +61,7 @@ struct uinput_device {
struct
uinput_request
*
requests
[
UINPUT_NUM_REQUESTS
];
struct
uinput_request
*
requests
[
UINPUT_NUM_REQUESTS
];
wait_queue_head_t
requests_waitq
;
wait_queue_head_t
requests_waitq
;
s
truct
semaphore
requests_sem
;
s
pinlock_t
requests_lock
;
};
};
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
include/linux/usb_input.h
0 → 100644
View file @
e0d7ff16
#ifndef __USB_INPUT_H
#define __USB_INPUT_H
/*
* Copyright (C) 2005 Dmitry Torokhov
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
#include <linux/usb.h>
#include <linux/input.h>
#include <asm/byteorder.h>
static
inline
void
usb_to_input_id
(
const
struct
usb_device
*
dev
,
struct
input_id
*
id
)
{
id
->
bustype
=
BUS_USB
;
id
->
vendor
=
le16_to_cpu
(
dev
->
descriptor
.
idVendor
);
id
->
product
=
le16_to_cpu
(
dev
->
descriptor
.
idProduct
);
id
->
version
=
le16_to_cpu
(
dev
->
descriptor
.
bcdDevice
);
}
#endif
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