aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-06-22 12:26:29 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-06-22 12:26:29 -0400
commitf7ebc4dcdeb1be7209d94a8c0dc602ab24e36ae1 (patch)
tree650c1748df35728e2bce1b8c26c064bfea272f63 /drivers/input
parent469d7d22cea146e40efe8c330e5164b4d8f13934 (diff)
parent84c88ef9affb34f10cb5b66b07e2d496845d1c28 (diff)
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.2 merge window.
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/Kconfig13
-rw-r--r--drivers/input/Makefile1
-rw-r--r--drivers/input/evdev.c5
-rw-r--r--drivers/input/ff-core.c4
-rw-r--r--drivers/input/input-leds.c212
-rw-r--r--drivers/input/input.c2
-rw-r--r--drivers/input/keyboard/Kconfig1
-rw-r--r--drivers/input/keyboard/adp5589-keys.c6
-rw-r--r--drivers/input/keyboard/clps711x-keypad.c7
-rw-r--r--drivers/input/keyboard/max7359_keypad.c31
-rw-r--r--drivers/input/keyboard/samsung-keypad.c2
-rw-r--r--drivers/input/keyboard/spear-keyboard.c2
-rw-r--r--drivers/input/misc/Kconfig23
-rw-r--r--drivers/input/misc/Makefile2
-rw-r--r--drivers/input/misc/adxl34x-i2c.c21
-rw-r--r--drivers/input/misc/da9063_onkey.c226
-rw-r--r--drivers/input/misc/drv260x.c13
-rw-r--r--drivers/input/misc/drv2665.c322
-rw-r--r--drivers/input/misc/gpio-beeper.c7
-rw-r--r--drivers/input/misc/retu-pwrbutton.c3
-rw-r--r--drivers/input/misc/soc_button_array.c1
-rw-r--r--drivers/input/misc/twl4030-pwrbutton.c3
-rw-r--r--drivers/input/misc/twl6040-vibra.c3
-rw-r--r--drivers/input/misc/wm831x-on.c3
-rw-r--r--drivers/input/mouse/alps.c244
-rw-r--r--drivers/input/mouse/alps.h1
-rw-r--r--drivers/input/mouse/cyapa_gen3.c3
-rw-r--r--drivers/input/mouse/cyapa_gen5.c23
-rw-r--r--drivers/input/mouse/elan_i2c.h8
-rw-r--r--drivers/input/mouse/elan_i2c_core.c63
-rw-r--r--drivers/input/mouse/elan_i2c_i2c.c4
-rw-r--r--drivers/input/mouse/elan_i2c_smbus.c6
-rw-r--r--drivers/input/mouse/focaltech.c13
-rw-r--r--drivers/input/mouse/psmouse-base.c2
-rw-r--r--drivers/input/mouse/sentelic.h4
-rw-r--r--drivers/input/mouse/synaptics_i2c.c6
-rw-r--r--drivers/input/touchscreen/Kconfig1
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c8
-rw-r--r--drivers/input/touchscreen/cyttsp4_core.c5
-rw-r--r--drivers/input/touchscreen/goodix.c58
-rw-r--r--drivers/input/touchscreen/s3c2410_ts.c2
-rw-r--r--drivers/input/touchscreen/stmpe-ts.c37
-rw-r--r--drivers/input/touchscreen/zforce_ts.c1
43 files changed, 1126 insertions, 276 deletions
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index a11ff74a5127..a35532ec00e4 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -25,6 +25,19 @@ config INPUT
25 25
26if INPUT 26if INPUT
27 27
28config INPUT_LEDS
29 tristate "Export input device LEDs in sysfs"
30 depends on LEDS_CLASS
31 default INPUT
32 help
33 Say Y here if you would like to export LEDs on input devices
34 as standard LED class devices in sysfs.
35
36 If unsure, say Y.
37
38 To compile this driver as a module, choose M here: the
39 module will be called input-leds.
40
28config INPUT_FF_MEMLESS 41config INPUT_FF_MEMLESS
29 tristate "Support for memoryless force-feedback devices" 42 tristate "Support for memoryless force-feedback devices"
30 help 43 help
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 5ca3f631497f..0c9302ca9954 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_INPUT_POLLDEV) += input-polldev.o
12obj-$(CONFIG_INPUT_SPARSEKMAP) += sparse-keymap.o 12obj-$(CONFIG_INPUT_SPARSEKMAP) += sparse-keymap.o
13obj-$(CONFIG_INPUT_MATRIXKMAP) += matrix-keymap.o 13obj-$(CONFIG_INPUT_MATRIXKMAP) += matrix-keymap.o
14 14
15obj-$(CONFIG_INPUT_LEDS) += input-leds.o
15obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o 16obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o
16obj-$(CONFIG_INPUT_JOYDEV) += joydev.o 17obj-$(CONFIG_INPUT_JOYDEV) += joydev.o
17obj-$(CONFIG_INPUT_EVDEV) += evdev.o 18obj-$(CONFIG_INPUT_EVDEV) += evdev.o
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index a18f41b89b6a..9d35499faca4 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -422,10 +422,7 @@ static int evdev_release(struct inode *inode, struct file *file)
422 422
423 evdev_detach_client(evdev, client); 423 evdev_detach_client(evdev, client);
424 424
425 if (is_vmalloc_addr(client)) 425 kvfree(client);
426 vfree(client);
427 else
428 kfree(client);
429 426
430 evdev_close_device(evdev); 427 evdev_close_device(evdev);
431 428
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c
index b81c88c43452..8f4a30fccbb6 100644
--- a/drivers/input/ff-core.c
+++ b/drivers/input/ff-core.c
@@ -70,7 +70,7 @@ static int compat_effect(struct ff_device *ff, struct ff_effect *effect)
70 return -EINVAL; 70 return -EINVAL;
71 71
72 /* 72 /*
73 * calculate manginude of sine wave as average of rumble's 73 * calculate magnitude of sine wave as average of rumble's
74 * 2/3 of strong magnitude and 1/3 of weak magnitude 74 * 2/3 of strong magnitude and 1/3 of weak magnitude
75 */ 75 */
76 magnitude = effect->u.rumble.strong_magnitude / 3 + 76 magnitude = effect->u.rumble.strong_magnitude / 3 +
@@ -213,7 +213,7 @@ static int erase_effect(struct input_dev *dev, int effect_id,
213/** 213/**
214 * input_ff_erase - erase a force-feedback effect from device 214 * input_ff_erase - erase a force-feedback effect from device
215 * @dev: input device to erase effect from 215 * @dev: input device to erase effect from
216 * @effect_id: id of the ffect to be erased 216 * @effect_id: id of the effect to be erased
217 * @file: purported owner of the request 217 * @file: purported owner of the request
218 * 218 *
219 * This function erases a force-feedback effect from specified device. 219 * This function erases a force-feedback effect from specified device.
diff --git a/drivers/input/input-leds.c b/drivers/input/input-leds.c
new file mode 100644
index 000000000000..074a65ed17bb
--- /dev/null
+++ b/drivers/input/input-leds.c
@@ -0,0 +1,212 @@
1/*
2 * LED support for the input layer
3 *
4 * Copyright 2010-2015 Samuel Thibault <samuel.thibault@ens-lyon.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/slab.h>
13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/leds.h>
16#include <linux/input.h>
17
18#if IS_ENABLED(CONFIG_VT)
19#define VT_TRIGGER(_name) .trigger = _name
20#else
21#define VT_TRIGGER(_name) .trigger = NULL
22#endif
23
24static const struct {
25 const char *name;
26 const char *trigger;
27} input_led_info[LED_CNT] = {
28 [LED_NUML] = { "numlock", VT_TRIGGER("kbd-numlock") },
29 [LED_CAPSL] = { "capslock", VT_TRIGGER("kbd-capslock") },
30 [LED_SCROLLL] = { "scrolllock", VT_TRIGGER("kbd-scrolllock") },
31 [LED_COMPOSE] = { "compose" },
32 [LED_KANA] = { "kana", VT_TRIGGER("kbd-kanalock") },
33 [LED_SLEEP] = { "sleep" } ,
34 [LED_SUSPEND] = { "suspend" },
35 [LED_MUTE] = { "mute" },
36 [LED_MISC] = { "misc" },
37 [LED_MAIL] = { "mail" },
38 [LED_CHARGING] = { "charging" },
39};
40
41struct input_led {
42 struct led_classdev cdev;
43 struct input_handle *handle;
44 unsigned int code; /* One of LED_* constants */
45};
46
47struct input_leds {
48 struct input_handle handle;
49 unsigned int num_leds;
50 struct input_led leds[];
51};
52
53static enum led_brightness input_leds_brightness_get(struct led_classdev *cdev)
54{
55 struct input_led *led = container_of(cdev, struct input_led, cdev);
56 struct input_dev *input = led->handle->dev;
57
58 return test_bit(led->code, input->led) ? cdev->max_brightness : 0;
59}
60
61static void input_leds_brightness_set(struct led_classdev *cdev,
62 enum led_brightness brightness)</