Skip to content

Commit a952baa

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: (64 commits) Input: tsc2005 - remove 'disable' sysfs attribute Input: tsc2005 - add open/close Input: tsc2005 - handle read errors from SPI layer Input: tsc2005 - do not rearm timer in hardirq handler Input: tsc2005 - don't use work for 'pen up' handling Input: tsc2005 - do not use 0 in place of NULL Input: tsc2005 - use true/false for boolean variables Input: tsc2005 - hide selftest attribute if we can't reset Input: tsc2005 - rework driver initialization code Input: tsc2005 - set up bus type in input device Input: tsc2005 - set up parent device Input: tsc2005 - clear driver data after unbinding Input: tsc2005 - add module description Input: tsc2005 - remove driver banner message Input: tsc2005 - remove incorrect module alias Input: tsc2005 - convert to using dev_pm_ops Input: tsc2005 - use spi_get/set_drvdata() Input: introduce tsc2005 driver Input: xen-kbdfront - move to drivers/input/misc Input: xen-kbdfront - add grant reference for shared page ...
2 parents 5bab188 + 97eb3f2 commit a952baa

51 files changed

Lines changed: 3284 additions & 1906 deletions

Some content is hidden

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

‎arch/arm/mach-s5pv210/mach-goni.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/fb.h>
1616
#include <linux/i2c.h>
1717
#include <linux/i2c-gpio.h>
18-
#include <linux/i2c/qt602240_ts.h>
18+
#include <linux/i2c/atmel_mxt_ts.h>
1919
#include <linux/mfd/max8998.h>
2020
#include <linux/mfd/wm8994/pdata.h>
2121
#include <linux/regulator/fixed.h>
@@ -25,6 +25,7 @@
2525
#include <linux/gpio_keys.h>
2626
#include <linux/input.h>
2727
#include <linux/gpio.h>
28+
#include <linux/interrupt.h>
2829

2930
#include <asm/mach/arch.h>
3031
#include <asm/mach/map.h>
@@ -225,15 +226,16 @@ static void __init goni_radio_init(void)
225226
}
226227

227228
/* TSP */
228-
static struct qt602240_platform_data qt602240_platform_data = {
229+
static struct mxt_platform_data qt602240_platform_data = {
229230
.x_line = 17,
230231
.y_line = 11,
231232
.x_size = 800,
232233
.y_size = 480,
233234
.blen = 0x21,
234235
.threshold = 0x28,
235236
.voltage = 2800000, /* 2.8V */
236-
.orient = QT602240_DIAGONAL,
237+
.orient = MXT_DIAGONAL,
238+
.irqflags = IRQF_TRIGGER_FALLING,
237239
};
238240

239241
static struct s3c2410_platform_i2c i2c2_data __initdata = {

‎drivers/hid/hid-apple.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,12 @@ static const struct hid_device_id apple_devices[] = {
481481
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
482482
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
483483
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
484+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI),
485+
.driver_data = APPLE_HAS_FN },
486+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO),
487+
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
488+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
489+
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
484490
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
485491
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
486492
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),

‎drivers/hid/hid-core.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
13331333
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
13341334
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
13351335
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
1336+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
1337+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
1338+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
13361339
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
13371340
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
13381341
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
@@ -1840,6 +1843,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
18401843
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
18411844
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
18421845
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
1846+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
1847+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
1848+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
18431849
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
18441850
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
18451851
{ }

‎drivers/hid/hid-ids.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@
103103
#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
104104
#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
105105
#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
106+
#define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245
107+
#define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246
108+
#define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247
106109
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239
107110
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a
108111
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b

‎drivers/hid/hid-input.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,8 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
900900
hid->ll_driver->hidinput_input_event;
901901
input_dev->open = hidinput_open;
902902
input_dev->close = hidinput_close;
903-
input_dev->setkeycode_new = hidinput_setkeycode;
904-
input_dev->getkeycode_new = hidinput_getkeycode;
903+
input_dev->setkeycode = hidinput_setkeycode;
904+
input_dev->getkeycode = hidinput_getkeycode;
905905

906906
input_dev->name = hid->name;
907907
input_dev->phys = hid->phys;

‎drivers/input/Kconfig‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,6 @@ config INPUT_APMPOWER
161161
To compile this driver as a module, choose M here: the
162162
module will be called apm-power.
163163

164-
config XEN_KBDDEV_FRONTEND
165-
tristate "Xen virtual keyboard and mouse support"
166-
depends on XEN_FBDEV_FRONTEND
167-
default y
168-
select XEN_XENBUS_FRONTEND
169-
help
170-
This driver implements the front-end of the Xen virtual
171-
keyboard and mouse device driver. It communicates with a back-end
172-
in another domain.
173-
174164
comment "Input Device Drivers"
175165

176166
source "drivers/input/keyboard/Kconfig"

‎drivers/input/Makefile‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/
2424
obj-$(CONFIG_INPUT_MISC) += misc/
2525

2626
obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o
27-
28-
obj-$(CONFIG_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o

‎drivers/input/evdev.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
321321
struct input_event event;
322322
int retval;
323323

324+
if (count < input_event_size())
325+
return -EINVAL;
326+
324327
retval = mutex_lock_interruptible(&evdev->mutex);
325328
if (retval)
326329
return retval;
@@ -330,17 +333,16 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer,
330333
goto out;
331334
}
332335

333-
while (retval < count) {
334-
336+
do {
335337
if (input_event_from_user(buffer + retval, &event)) {
336338
retval = -EFAULT;
337339
goto out;
338340
}
341+
retval += input_event_size();
339342

340343
input_inject_event(&evdev->handle,
341344
event.type, event.code, event.value);
342-
retval += input_event_size();
343-
}
345+
} while (retval + input_event_size() <= count);
344346

345347
out:
346348
mutex_unlock(&evdev->mutex);

‎drivers/input/input-polldev.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static struct attribute_group input_polldev_attribute_group = {
192192
};
193193

194194
/**
195-
* input_allocate_polled_device - allocated memory polled device
195+
* input_allocate_polled_device - allocate memory for polled device
196196
*
197197
* The function allocates memory for a polled device and also
198198
* for an input device associated with this polled device.
@@ -239,7 +239,7 @@ EXPORT_SYMBOL(input_free_polled_device);
239239
* with input layer. The device should be allocated with call to
240240
* input_allocate_polled_device(). Callers should also set up poll()
241241
* method and set up capabilities (id, name, phys, bits) of the
242-
* corresponing input_dev structure.
242+
* corresponding input_dev structure.
243243
*/
244244
int input_register_polled_device(struct input_polled_dev *dev)
245245
{

‎drivers/input/input.c‎

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -791,22 +791,9 @@ int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke)
791791
int retval;
792792

793793
spin_lock_irqsave(&dev->event_lock, flags);
794-
795-
if (dev->getkeycode) {
796-
/*
797-
* Support for legacy drivers, that don't implement the new
798-
* ioctls
799-
*/
800-
u32 scancode = ke->index;
801-
802-
memcpy(ke->scancode, &scancode, sizeof(scancode));
803-
ke->len = sizeof(scancode);
804-
retval = dev->getkeycode(dev, scancode, &ke->keycode);
805-
} else {
806-
retval = dev->getkeycode_new(dev, ke);
807-
}
808-
794+
retval = dev->getkeycode(dev, ke);
809795
spin_unlock_irqrestore(&dev->event_lock, flags);
796+
810797
return retval;
811798
}
812799
EXPORT_SYMBOL(input_get_keycode);
@@ -831,35 +818,7 @@ int input_set_keycode(struct input_dev *dev,
831818

832819
spin_lock_irqsave(&dev->event_lock, flags);
833820

834-
if (dev->setkeycode) {
835-
/*
836-
* Support for legacy drivers, that don't implement the new
837-
* ioctls
838-
*/
839-
unsigned int scancode;
840-
841-
retval = input_scancode_to_scalar(ke, &scancode);
842-
if (retval)
843-
goto out;
844-
845-
/*
846-
* We need to know the old scancode, in order to generate a
847-
* keyup effect, if the set operation happens successfully
848-
*/
849-
if (!dev->getkeycode) {
850-
retval = -EINVAL;
851-
goto out;
852-
}
853-
854-
retval = dev->getkeycode(dev, scancode, &old_keycode);
855-
if (retval)
856-
goto out;
857-
858-
retval = dev->setkeycode(dev, scancode, ke->keycode);
859-
} else {
860-
retval = dev->setkeycode_new(dev, ke, &old_keycode);
861-
}
862-
821+
retval = dev->setkeycode(dev, ke, &old_keycode);
863822
if (retval)
864823
goto out;
865824

@@ -1846,11 +1805,11 @@ int input_register_device(struct input_dev *dev)
18461805
dev->rep[REP_PERIOD] = 33;
18471806
}
18481807

1849-
if (!dev->getkeycode && !dev->getkeycode_new)
1850-
dev->getkeycode_new = input_default_getkeycode;
1808+
if (!dev->getkeycode)
1809+
dev->getkeycode = input_default_getkeycode;
18511810

1852-
if (!dev->setkeycode && !dev->setkeycode_new)
1853-
dev->setkeycode_new = input_default_setkeycode;
1811+
if (!dev->setkeycode)
1812+
dev->setkeycode = input_default_setkeycode;
18541813

18551814
dev_set_name(&dev->dev, "input%ld",
18561815
(unsigned long) atomic_inc_return(&input_no) - 1);

0 commit comments

Comments
 (0)