mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
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 ...
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
$Id: gameport-programming.txt,v 1.3 2001/04/24 13:51:37 vojtech Exp $
|
||||
|
||||
Programming gameport drivers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Linux Input drivers v1.0
|
||||
(c) 1999-2001 Vojtech Pavlik <vojtech@ucw.cz>
|
||||
Sponsored by SuSE
|
||||
$Id: input.txt,v 1.8 2002/05/29 03:15:01 bradleym Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Disclaimer
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
7 Aug 1998
|
||||
|
||||
$Id: joystick-api.txt,v 1.2 2001/05/08 21:21:23 vojtech Exp $
|
||||
|
||||
1. Initialization
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
(c) 1998-2000 Vojtech Pavlik <vojtech@ucw.cz>
|
||||
(c) 1998 Andree Borrmann <a.borrmann@tu-bs.de>
|
||||
Sponsored by SuSE
|
||||
$Id: joystick-parport.txt,v 1.6 2001/09/25 09:31:32 vojtech Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Disclaimer
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Linux Joystick driver v2.0.0
|
||||
(c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz>
|
||||
Sponsored by SuSE
|
||||
$Id: joystick.txt,v 1.12 2002/03/03 12:13:07 jdeneux Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
0. Disclaimer
|
||||
|
||||
@@ -1988,6 +1988,12 @@ M: mikulas@artax.karlin.mff.cuni.cz
|
||||
W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
|
||||
S: Maintained
|
||||
|
||||
HTCPEN TOUCHSCREEN DRIVER
|
||||
P: Pau Oliva Fora
|
||||
M: pof@eslack.org
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
HUGETLB FILESYSTEM
|
||||
P: William Irwin
|
||||
M: wli@holomorphy.com
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
|
||||
extern void ctrl_alt_del(void);
|
||||
|
||||
#define to_handle_h(n) container_of(n, struct input_handle, h_node)
|
||||
|
||||
/*
|
||||
* Exported functions/variables
|
||||
*/
|
||||
|
||||
@@ -581,6 +581,8 @@ static int __init hdaps_init(void)
|
||||
/* initialize the input class */
|
||||
idev = hdaps_idev->input;
|
||||
idev->name = "hdaps";
|
||||
idev->phys = "isa1600/input0";
|
||||
idev->id.bustype = BUS_ISA;
|
||||
idev->dev.parent = &pdev->dev;
|
||||
idev->evbit[0] = BIT_MASK(EV_ABS);
|
||||
input_set_abs_params(idev, ABS_X,
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: evbug.c,v 1.10 2001/09/25 10:12:07 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1999-2001 Vojtech Pavlik
|
||||
*/
|
||||
|
||||
@@ -41,7 +39,7 @@ MODULE_LICENSE("GPL");
|
||||
static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
|
||||
{
|
||||
printk(KERN_DEBUG "evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
|
||||
handle->dev->phys, type, code, value);
|
||||
handle->dev->dev.bus_id, type, code, value);
|
||||
}
|
||||
|
||||
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,
|
||||
if (error)
|
||||
goto err_unregister_handle;
|
||||
|
||||
printk(KERN_DEBUG "evbug.c: Connected device: \"%s\", %s\n", dev->name, dev->phys);
|
||||
printk(KERN_DEBUG "evbug.c: Connected device: %s (%s at %s)\n",
|
||||
dev->dev.bus_id,
|
||||
dev->name ?: "unknown",
|
||||
dev->phys ?: "unknown");
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -79,7 +80,8 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
|
||||
|
||||
static void evbug_disconnect(struct input_handle *handle)
|
||||
{
|
||||
printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n", handle->dev->phys);
|
||||
printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n",
|
||||
handle->dev->dev.bus_id);
|
||||
|
||||
input_close_device(handle);
|
||||
input_unregister_handle(handle);
|
||||
|
||||
@@ -300,6 +300,35 @@ struct input_event_compat {
|
||||
__s32 value;
|
||||
};
|
||||
|
||||
struct ff_periodic_effect_compat {
|
||||
__u16 waveform;
|
||||
__u16 period;
|
||||
__s16 magnitude;
|
||||
__s16 offset;
|
||||
__u16 phase;
|
||||
|
||||
struct ff_envelope envelope;
|
||||
|
||||
__u32 custom_len;
|
||||
compat_uptr_t custom_data;
|
||||
};
|
||||
|
||||
struct ff_effect_compat {
|
||||
__u16 type;
|
||||
__s16 id;
|
||||
__u16 direction;
|
||||
struct ff_trigger trigger;
|
||||
struct ff_replay replay;
|
||||
|
||||
union {
|
||||
struct ff_constant_effect constant;
|
||||
struct ff_ramp_effect ramp;
|
||||
struct ff_periodic_effect_compat periodic;
|
||||
struct ff_condition_effect condition[2]; /* One for each axis */
|
||||
struct ff_rumble_effect rumble;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* Note to the author of this code: did it ever occur to
|
||||
you why the ifdefs are needed? Think about it again. -AK */
|
||||
#ifdef CONFIG_X86_64
|
||||
@@ -368,6 +397,42 @@ static int evdev_event_to_user(char __user *buffer,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int evdev_ff_effect_from_user(const char __user *buffer, size_t size,
|
||||
struct ff_effect *effect)
|
||||
{
|
||||
if (COMPAT_TEST) {
|
||||
struct ff_effect_compat *compat_effect;
|
||||
|
||||
if (size != sizeof(struct ff_effect_compat))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* It so happens that the pointer which needs to be changed
|
||||
* is the last field in the structure, so we can copy the
|
||||
* whole thing and replace just the pointer.
|
||||
*/
|
||||
|
||||
compat_effect = (struct ff_effect_compat *)effect;
|
||||
|
||||
if (copy_from_user(compat_effect, buffer,
|
||||
sizeof(struct ff_effect_compat)))
|
||||
return -EFAULT;
|
||||
|
||||
if (compat_effect->type == FF_PERIODIC &&
|
||||
compat_effect->u.periodic.waveform == FF_CUSTOM)
|
||||
effect->u.periodic.custom_data =
|
||||
compat_ptr(compat_effect->u.periodic.custom_data);
|
||||
} else {
|
||||
if (size != sizeof(struct ff_effect))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_user(effect, buffer, sizeof(struct ff_effect)))
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline size_t evdev_event_size(void)
|
||||
@@ -393,6 +458,18 @@ static int evdev_event_to_user(char __user *buffer,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int evdev_ff_effect_from_user(const char __user *buffer, size_t size,
|
||||
struct ff_effect *effect)
|
||||
{
|
||||
if (size != sizeof(struct ff_effect))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_from_user(effect, buffer, sizeof(struct ff_effect)))
|
||||
return -EFAULT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
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,
|
||||
|
||||
return input_set_keycode(dev, t, v);
|
||||
|
||||
case EVIOCSFF:
|
||||
if (copy_from_user(&effect, p, sizeof(effect)))
|
||||
return -EFAULT;
|
||||
|
||||
error = input_ff_upload(dev, &effect, file);
|
||||
|
||||
if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
|
||||
return -EFAULT;
|
||||
|
||||
return error;
|
||||
|
||||
case EVIOCRMFF:
|
||||
return input_ff_erase(dev, (int)(unsigned long) p, file);
|
||||
|
||||
@@ -733,6 +799,19 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
|
||||
|
||||
if (_IOC_DIR(cmd) == _IOC_WRITE) {
|
||||
|
||||
if (_IOC_NR(cmd) == _IOC_NR(EVIOCSFF)) {
|
||||
|
||||
if (evdev_ff_effect_from_user(p, _IOC_SIZE(cmd), &effect))
|
||||
return -EFAULT;
|
||||
|
||||
error = input_ff_upload(dev, &effect, file);
|
||||
|
||||
if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
|
||||
return -EFAULT;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
if ((_IOC_NR(cmd) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) {
|
||||
|
||||
t = _IOC_NR(cmd) & ABS_MAX;
|
||||
|
||||
@@ -247,9 +247,9 @@ static void ml_combine_effects(struct ff_effect *effect,
|
||||
* in s8, this should be changed to something more generic
|
||||
*/
|
||||
effect->u.ramp.start_level =
|
||||
max(min(effect->u.ramp.start_level + x, 0x7f), -0x80);
|
||||
clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f);
|
||||
effect->u.ramp.end_level =
|
||||
max(min(effect->u.ramp.end_level + y, 0x7f), -0x80);
|
||||
clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f);
|
||||
break;
|
||||
|
||||
case FF_RUMBLE:
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: emu10k1-gp.c,v 1.8 2002/01/22 20:40:46 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 2001 Vojtech Pavlik
|
||||
*/
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ EXPORT_SYMBOL(__gameport_register_driver);
|
||||
EXPORT_SYMBOL(gameport_unregister_driver);
|
||||
EXPORT_SYMBOL(gameport_open);
|
||||
EXPORT_SYMBOL(gameport_close);
|
||||
EXPORT_SYMBOL(gameport_rescan);
|
||||
EXPORT_SYMBOL(gameport_set_phys);
|
||||
EXPORT_SYMBOL(gameport_start_polling);
|
||||
EXPORT_SYMBOL(gameport_stop_polling);
|
||||
@@ -230,8 +229,6 @@ static void gameport_find_driver(struct gameport *gameport)
|
||||
*/
|
||||
|
||||
enum gameport_event_type {
|
||||
GAMEPORT_RESCAN,
|
||||
GAMEPORT_RECONNECT,
|
||||
GAMEPORT_REGISTER_PORT,
|
||||
GAMEPORT_REGISTER_DRIVER,
|
||||
};
|
||||
@@ -365,15 +362,6 @@ static void gameport_handle_event(void)
|
||||
gameport_add_port(event->object);
|
||||
break;
|
||||
|
||||
case GAMEPORT_RECONNECT:
|
||||
gameport_reconnect_port(event->object);
|
||||
break;
|
||||
|
||||
case GAMEPORT_RESCAN:
|
||||
gameport_disconnect_port(event->object);
|
||||
gameport_find_driver(event->object);
|
||||
break;
|
||||
|
||||
case GAMEPORT_REGISTER_DRIVER:
|
||||
gameport_add_driver(event->object);
|
||||
break;
|
||||
@@ -651,16 +639,6 @@ static void gameport_disconnect_port(struct gameport *gameport)
|
||||
device_release_driver(&gameport->dev);
|
||||
}
|
||||
|
||||
void gameport_rescan(struct gameport *gameport)
|
||||
{
|
||||
gameport_queue_event(gameport, NULL, GAMEPORT_RESCAN);
|
||||
}
|
||||
|
||||
void gameport_reconnect(struct gameport *gameport)
|
||||
{
|
||||
gameport_queue_event(gameport, NULL, GAMEPORT_RECONNECT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Submits register request to kgameportd for subsequent execution.
|
||||
* Note that port registration is always asynchronous.
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: lightning.c,v 1.20 2002/01/22 20:41:31 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1998-2001 Vojtech Pavlik
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: ns558.c,v 1.43 2002/01/24 19:23:21 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1999-2001 Vojtech Pavlik
|
||||
* Copyright (c) 1999 Brian Gerst
|
||||
*/
|
||||
|
||||
@@ -242,7 +242,7 @@ static void input_handle_event(struct input_dev *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
if (type != EV_SYN)
|
||||
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
|
||||
dev->sync = 0;
|
||||
|
||||
if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: a3d.c,v 1.21 2002/01/22 20:11:50 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1998-2001 Vojtech Pavlik
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: amijoy.c,v 1.13 2002/01/22 20:26:32 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1998-2001 Vojtech Pavlik
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: cobra.c,v 1.19 2002/01/22 20:26:52 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1999-2001 Vojtech Pavlik
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Id: db9.c,v 1.13 2002/04/07 20:13:37 vojtech Exp $
|
||||
*
|
||||
* Copyright (c) 1999-2001 Vojtech Pavlik
|
||||
*
|
||||
* Based on the work of:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user