Skip to content

Commit 519f014

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits) Input: add switch for dock events Input: add microphone insert switch definition Input: i8042 - add Arima-Rioworks HDAMB board to noloop list Input: sgi_btns - add support for SGI Indy volume buttons Input: add option to disable HP SDC driver Input: serio - trivial documentation fix Input: add new serio driver for Xilinx XPS PS2 IP Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen Input: new driver for SGI O2 volume buttons Input: yealink - reliably kill urbs Input: q40kbd - make q40kbd_lock static Input: gtco - eliminate early return Input: i8042 - add Dritek quirk for Acer Aspire 5720 Input: usbtouchscreen - ignore eGalax screens supporting HID protocol Input: i8042 - add Medion NAM 2070 to noloop blacklist Input: i8042 - add Gericom Bellagio to nomux blacklist Input: i8042 - add Acer Aspire 1360 to nomux blacklist Input: hp_sdc_mlc.c - make a struct static Input: hil_mlc.c - make code static Input: wistron - generate normal key event if bluetooth or wifi not present ...
2 parents f8b71a3 + 908cf4b commit 519f014

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2283
-550
lines changed

Documentation/input/gameport-programming.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
$Id: gameport-programming.txt,v 1.3 2001/04/24 13:51:37 vojtech Exp $
2-
31
Programming gameport drivers
42
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53

Documentation/input/input.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Linux Input drivers v1.0
22
(c) 1999-2001 Vojtech Pavlik <vojtech@ucw.cz>
33
Sponsored by SuSE
4-
$Id: input.txt,v 1.8 2002/05/29 03:15:01 bradleym Exp $
54
----------------------------------------------------------------------------
65

76
0. Disclaimer

Documentation/input/joystick-api.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
7 Aug 1998
77

8-
$Id: joystick-api.txt,v 1.2 2001/05/08 21:21:23 vojtech Exp $
9-
108
1. Initialization
119
~~~~~~~~~~~~~~~~~
1210

Documentation/input/joystick-parport.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
(c) 1998-2000 Vojtech Pavlik <vojtech@ucw.cz>
33
(c) 1998 Andree Borrmann <a.borrmann@tu-bs.de>
44
Sponsored by SuSE
5-
$Id: joystick-parport.txt,v 1.6 2001/09/25 09:31:32 vojtech Exp $
65
----------------------------------------------------------------------------
76

87
0. Disclaimer

Documentation/input/joystick.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Linux Joystick driver v2.0.0
22
(c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz>
33
Sponsored by SuSE
4-
$Id: joystick.txt,v 1.12 2002/03/03 12:13:07 jdeneux Exp $
54
----------------------------------------------------------------------------
65

76
0. Disclaimer

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,12 @@ M: mikulas@artax.karlin.mff.cuni.cz
19881988
W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
19891989
S: Maintained
19901990

1991+
HTCPEN TOUCHSCREEN DRIVER
1992+
P: Pau Oliva Fora
1993+
M: pof@eslack.org
1994+
L: linux-input@vger.kernel.org
1995+
S: Maintained
1996+
19911997
HUGETLB FILESYSTEM
19921998
P: William Irwin
19931999
M: wli@holomorphy.com

drivers/char/keyboard.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646

4747
extern void ctrl_alt_del(void);
4848

49+
#define to_handle_h(n) container_of(n, struct input_handle, h_node)
50+
4951
/*
5052
* Exported functions/variables
5153
*/

drivers/hwmon/hdaps.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ static int __init hdaps_init(void)
581581
/* initialize the input class */
582582
idev = hdaps_idev->input;
583583
idev->name = "hdaps";
584+
idev->phys = "isa1600/input0";
585+
idev->id.bustype = BUS_ISA;
584586
idev->dev.parent = &pdev->dev;
585587
idev->evbit[0] = BIT_MASK(EV_ABS);
586588
input_set_abs_params(idev, ABS_X,

drivers/input/evbug.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: evbug.c,v 1.10 2001/09/25 10:12:07 vojtech Exp $
3-
*
42
* Copyright (c) 1999-2001 Vojtech Pavlik
53
*/
64

@@ -41,7 +39,7 @@ MODULE_LICENSE("GPL");
4139
static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
4240
{
4341
printk(KERN_DEBUG "evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
44-
handle->dev->phys, type, code, value);
42+
handle->dev->dev.bus_id, type, code, value);
4543
}
4644

4745
static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
@@ -66,7 +64,10 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
6664
if (error)
6765
goto err_unregister_handle;
6866

69-
printk(KERN_DEBUG "evbug.c: Connected device: \"%s\", %s\n", dev->name, dev->phys);
67+
printk(KERN_DEBUG "evbug.c: Connected device: %s (%s at %s)\n",
68+
dev->dev.bus_id,
69+
dev->name ?: "unknown",
70+
dev->phys ?: "unknown");
7071

7172
return 0;
7273

@@ -79,7 +80,8 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
7980

8081
static void evbug_disconnect(struct input_handle *handle)
8182
{
82-
printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n", handle->dev->phys);
83+
printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n",
84+
handle->dev->dev.bus_id);
8385

8486
input_close_device(handle);
8587
input_unregister_handle(handle);

drivers/input/evdev.c

Lines changed: 90 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,35 @@ struct input_event_compat {
300300
__s32 value;
301301
};
302302

303+
struct ff_periodic_effect_compat {
304+
__u16 waveform;
305+
__u16 period;
306+
__s16 magnitude;
307+
__s16 offset;
308+
__u16 phase;
309+
310+
struct ff_envelope envelope;
311+
312+
__u32 custom_len;
313+
compat_uptr_t custom_data;
314+
};
315+
316+
struct ff_effect_compat {
317+
__u16 type;
318+
__s16 id;
319+
__u16 direction;
320+
struct ff_trigger trigger;
321+
struct ff_replay replay;
322+
323+
union {
324+
struct ff_constant_effect constant;
325+
struct ff_ramp_effect ramp;
326+
struct ff_periodic_effect_compat periodic;
327+
struct ff_condition_effect condition[2]; /* One for each axis */
328+
struct ff_rumble_effect rumble;
329+
} u;
330+
};
331+
303332
/* Note to the author of this code: did it ever occur to
304333
you why the ifdefs are needed? Think about it again. -AK */
305334
#ifdef CONFIG_X86_64
@@ -368,6 +397,42 @@ static int evdev_event_to_user(char __user *buffer,
368397
return 0;
369398
}
370399

400+
static int evdev_ff_effect_from_user(const char __user *buffer, size_t size,
401+
struct ff_effect *effect)
402+
{
403+
if (COMPAT_TEST) {
404+
struct ff_effect_compat *compat_effect;
405+
406+
if (size != sizeof(struct ff_effect_compat))
407+
return -EINVAL;
408+
409+
/*
410+
* It so happens that the pointer which needs to be changed
411+
* is the last field in the structure, so we can copy the
412+
* whole thing and replace just the pointer.
413+
*/
414+
415+
compat_effect = (struct ff_effect_compat *)effect;
416+
417+
if (copy_from_user(compat_effect, buffer,
418+
sizeof(struct ff_effect_compat)))
419+
return -EFAULT;
420+
421+
if (compat_effect->type == FF_PERIODIC &&
422+
compat_effect->u.periodic.waveform == FF_CUSTOM)
423+
effect->u.periodic.custom_data =
424+
compat_ptr(compat_effect->u.periodic.custom_data);
425+
} else {
426+
if (size != sizeof(struct ff_effect))
427+
return -EINVAL;
428+
429+
if (copy_from_user(effect, buffer, sizeof(struct ff_effect)))
430+
return -EFAULT;
431+
}
432+
433+
return 0;
434+
}
435+
371436
#else
372437

373438
static inline size_t evdev_event_size(void)
@@ -393,6 +458,18 @@ static int evdev_event_to_user(char __user *buffer,
393458
return 0;
394459
}
395460

461+
static int evdev_ff_effect_from_user(const char __user *buffer, size_t size,
462+
struct ff_effect *effect)
463+
{
464+
if (size != sizeof(struct ff_effect))
465+
return -EINVAL;
466+
467+
if (copy_from_user(effect, buffer, sizeof(struct ff_effect)))
468+
return -EFAULT;
469+
470+
return 0;
471+
}
472+
396473
#endif /* CONFIG_COMPAT */
397474

398475
static ssize_t evdev_write(struct file *file, const char __user *buffer,
@@ -633,17 +710,6 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
633710

634711
return input_set_keycode(dev, t, v);
635712

636-
case EVIOCSFF:
637-
if (copy_from_user(&effect, p, sizeof(effect)))
638-
return -EFAULT;
639-
640-
error = input_ff_upload(dev, &effect, file);
641-
642-
if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
643-
return -EFAULT;
644-
645-
return error;
646-
647713
case EVIOCRMFF:
648714
return input_ff_erase(dev, (int)(unsigned long) p, file);
649715

@@ -733,6 +799,19 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
733799

734800
if (_IOC_DIR(cmd) == _IOC_WRITE) {
735801

802+
if (_IOC_NR(cmd) == _IOC_NR(EVIOCSFF)) {
803+
804+
if (evdev_ff_effect_from_user(p, _IOC_SIZE(cmd), &effect))
805+
return -EFAULT;
806+
807+
error = input_ff_upload(dev, &effect, file);
808+
809+
if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
810+
return -EFAULT;
811+
812+
return error;
813+
}
814+
736815
if ((_IOC_NR(cmd) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) {
737816

738817
t = _IOC_NR(cmd) & ABS_MAX;

drivers/input/ff-memless.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ static void ml_combine_effects(struct ff_effect *effect,
247247
* in s8, this should be changed to something more generic
248248
*/
249249
effect->u.ramp.start_level =
250-
max(min(effect->u.ramp.start_level + x, 0x7f), -0x80);
250+
clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f);
251251
effect->u.ramp.end_level =
252-
max(min(effect->u.ramp.end_level + y, 0x7f), -0x80);
252+
clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f);
253253
break;
254254

255255
case FF_RUMBLE:

drivers/input/gameport/emu10k1-gp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: emu10k1-gp.c,v 1.8 2002/01/22 20:40:46 vojtech Exp $
3-
*
42
* Copyright (c) 2001 Vojtech Pavlik
53
*/
64

drivers/input/gameport/gameport.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ EXPORT_SYMBOL(__gameport_register_driver);
3636
EXPORT_SYMBOL(gameport_unregister_driver);
3737
EXPORT_SYMBOL(gameport_open);
3838
EXPORT_SYMBOL(gameport_close);
39-
EXPORT_SYMBOL(gameport_rescan);
4039
EXPORT_SYMBOL(gameport_set_phys);
4140
EXPORT_SYMBOL(gameport_start_polling);
4241
EXPORT_SYMBOL(gameport_stop_polling);
@@ -230,8 +229,6 @@ static void gameport_find_driver(struct gameport *gameport)
230229
*/
231230

232231
enum gameport_event_type {
233-
GAMEPORT_RESCAN,
234-
GAMEPORT_RECONNECT,
235232
GAMEPORT_REGISTER_PORT,
236233
GAMEPORT_REGISTER_DRIVER,
237234
};
@@ -365,15 +362,6 @@ static void gameport_handle_event(void)
365362
gameport_add_port(event->object);
366363
break;
367364

368-
case GAMEPORT_RECONNECT:
369-
gameport_reconnect_port(event->object);
370-
break;
371-
372-
case GAMEPORT_RESCAN:
373-
gameport_disconnect_port(event->object);
374-
gameport_find_driver(event->object);
375-
break;
376-
377365
case GAMEPORT_REGISTER_DRIVER:
378366
gameport_add_driver(event->object);
379367
break;
@@ -651,16 +639,6 @@ static void gameport_disconnect_port(struct gameport *gameport)
651639
device_release_driver(&gameport->dev);
652640
}
653641

654-
void gameport_rescan(struct gameport *gameport)
655-
{
656-
gameport_queue_event(gameport, NULL, GAMEPORT_RESCAN);
657-
}
658-
659-
void gameport_reconnect(struct gameport *gameport)
660-
{
661-
gameport_queue_event(gameport, NULL, GAMEPORT_RECONNECT);
662-
}
663-
664642
/*
665643
* Submits register request to kgameportd for subsequent execution.
666644
* Note that port registration is always asynchronous.

drivers/input/gameport/lightning.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: lightning.c,v 1.20 2002/01/22 20:41:31 vojtech Exp $
3-
*
42
* Copyright (c) 1998-2001 Vojtech Pavlik
53
*/
64

drivers/input/gameport/ns558.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: ns558.c,v 1.43 2002/01/24 19:23:21 vojtech Exp $
3-
*
42
* Copyright (c) 1999-2001 Vojtech Pavlik
53
* Copyright (c) 1999 Brian Gerst
64
*/

drivers/input/input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static void input_handle_event(struct input_dev *dev,
242242
break;
243243
}
244244

245-
if (type != EV_SYN)
245+
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
246246
dev->sync = 0;
247247

248248
if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)

drivers/input/joystick/a3d.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: a3d.c,v 1.21 2002/01/22 20:11:50 vojtech Exp $
3-
*
42
* Copyright (c) 1998-2001 Vojtech Pavlik
53
*/
64

drivers/input/joystick/amijoy.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: amijoy.c,v 1.13 2002/01/22 20:26:32 vojtech Exp $
3-
*
42
* Copyright (c) 1998-2001 Vojtech Pavlik
53
*/
64

drivers/input/joystick/cobra.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: cobra.c,v 1.19 2002/01/22 20:26:52 vojtech Exp $
3-
*
42
* Copyright (c) 1999-2001 Vojtech Pavlik
53
*/
64

drivers/input/joystick/db9.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: db9.c,v 1.13 2002/04/07 20:13:37 vojtech Exp $
3-
*
42
* Copyright (c) 1999-2001 Vojtech Pavlik
53
*
64
* Based on the work of:

drivers/input/joystick/gf2k.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: gf2k.c,v 1.19 2002/01/22 20:27:43 vojtech Exp $
3-
*
42
* Copyright (c) 1998-2001 Vojtech Pavlik
53
*/
64

drivers/input/joystick/grip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: grip.c,v 1.21 2002/01/22 20:27:57 vojtech Exp $
3-
*
42
* Copyright (c) 1998-2001 Vojtech Pavlik
53
*/
64

drivers/input/joystick/grip_mp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: grip_mp.c,v 1.9 2002/07/20 19:28:45 bonnland Exp $
3-
*
42
* Driver for the Gravis Grip Multiport, a gamepad "hub" that
53
* connects up to four 9-pin digital gamepads/joysticks.
64
* Driver tested on SMP and UP kernel versions 2.4.18-4 and 2.4.18-5.

drivers/input/joystick/guillemot.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: guillemot.c,v 1.10 2002/01/22 20:28:12 vojtech Exp $
3-
*
42
* Copyright (c) 2001 Vojtech Pavlik
53
*/
64

drivers/input/joystick/iforce/iforce-ff.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/*
2-
* $Id: iforce-ff.c,v 1.9 2002/02/02 19:28:35 jdeneux Exp $
3-
*
42
* Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz>
53
* Copyright (c) 2001-2002, 2007 Johann Deneux <johann.deneux@gmail.com>
64
*

0 commit comments

Comments
 (0)