aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-12-19 12:51:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-12-19 12:51:11 -0500
commit632f8577d694efa4f2968be32c44e79f7e2ed2cd (patch)
tree8ef8dc992a7c9d25e2045fc8fb3ece0b573e1800
parent1eab0e42450c6038e2bb17da438370fe639973f3 (diff)
parent478e5ed1c3f6928ece7fffd712ba728b1f92217d (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov: "Just a few assorted driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elants_i2c - fix wake-on-touch Input: elan_i2c - set input device's vendor and product IDs Input: sun4i-lradc-keys - fix typo in binding documentation Input: atmel_mxt_ts - add maxtouch to I2C table for module autoload Input: arizona-haptic - fix disabling of haptics device Input: aiptek - fix crash on detecting device without endpoints Input: atmel_mxt_ts - add generic platform data for Chromebooks Input: parkbd - clear unused function pointers Input: walkera0701 - clear unused function pointers Input: turbografx - clear unused function pointers Input: gamecon - clear unused function pointers Input: db9 - clear unused function pointers
-rw-r--r--Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt2
-rw-r--r--drivers/input/joystick/db9.c1
-rw-r--r--drivers/input/joystick/gamecon.c1
-rw-r--r--drivers/input/joystick/turbografx.c1
-rw-r--r--drivers/input/joystick/walkera0701.c1
-rw-r--r--drivers/input/misc/arizona-haptics.c3
-rw-r--r--drivers/input/mouse/elan_i2c_core.c3
-rw-r--r--drivers/input/serio/parkbd.c1
-rw-r--r--drivers/input/tablet/aiptek.c9
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c34
-rw-r--r--drivers/input/touchscreen/elants_i2c.c21
11 files changed, 65 insertions, 12 deletions
diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
index b9c32f6fd687..4357e498ef04 100644
--- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
+++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
@@ -12,7 +12,7 @@ Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys":
12Required subnode-properties: 12Required subnode-properties:
13 - label: Descriptive name of the key. 13 - label: Descriptive name of the key.
14 - linux,code: Keycode to emit. 14 - linux,code: Keycode to emit.
15 - channel: Channel this key is attached to, mut be 0 or 1. 15 - channel: Channel this key is attached to, must be 0 or 1.
16 - voltage: Voltage in µV at lradc input when this key is pressed. 16 - voltage: Voltage in µV at lradc input when this key is pressed.
17 17
18Example: 18Example:
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 932d07307454..da326090c2b0 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -592,6 +592,7 @@ static void db9_attach(struct parport *pp)
592 return; 592 return;
593 } 593 }
594 594
595 memset(&db9_parport_cb, 0, sizeof(db9_parport_cb));
595 db9_parport_cb.flags = PARPORT_FLAG_EXCL; 596 db9_parport_cb.flags = PARPORT_FLAG_EXCL;
596 597
597 pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx); 598 pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 5a672dcac0d8..eae14d512353 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -951,6 +951,7 @@ static void gc_attach(struct parport *pp)
951 pads = gc_cfg[port_idx].args + 1; 951 pads = gc_cfg[port_idx].args + 1;
952 n_pads = gc_cfg[port_idx].nargs - 1; 952 n_pads = gc_cfg[port_idx].nargs - 1;
953 953
954 memset(&gc_parport_cb, 0, sizeof(gc_parport_cb));
954 gc_parport_cb.flags = PARPORT_FLAG_EXCL; 955 gc_parport_cb.flags = PARPORT_FLAG_EXCL;
955 956
956 pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb, 957 pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 9f5bca26bd2f..77f575dd0901 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -181,6 +181,7 @@ static void tgfx_attach(struct parport *pp)
181 n_buttons = tgfx_cfg[port_idx].args + 1; 181 n_buttons = tgfx_cfg[port_idx].args + 1;
182 n_devs = tgfx_cfg[port_idx].nargs - 1; 182 n_devs = tgfx_cfg[port_idx].nargs - 1;
183 183
184 memset(&tgfx_parport_cb, 0, sizeof(tgfx_parport_cb));
184 tgfx_parport_cb.flags = PARPORT_FLAG_EXCL; 185 tgfx_parport_cb.flags = PARPORT_FLAG_EXCL;
185 186
186 pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb, 187 pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,
diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c
index 9c07fe911075..70a893a17467 100644
--- a/drivers/input/joystick/walkera0701.c
+++ b/drivers/input/joystick/walkera0701.c
@@ -218,6 +218,7 @@ static void walkera0701_attach(struct parport *pp)
218 218
219 w->parport = pp; 219 w->parport = pp;
220 220
221 memset(&walkera0701_parport_cb, 0, sizeof(walkera0701_parport_cb));
221 walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL; 222 walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL;
222 walkera0701_parport_cb.irq_func = walkera0701_irq_handler; 223 walkera0701_parport_cb.irq_func = walkera0701_irq_handler;
223 walkera0701_parport_cb.private = w; 224 walkera0701_parport_cb.private = w;
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index 4bf678541496..d5994a745ffa 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -97,8 +97,7 @@ static void arizona_haptics_work(struct work_struct *work)
97 97
98 ret = regmap_update_bits(arizona->regmap, 98 ret = regmap_update_bits(arizona->regmap,
99 ARIZONA_HAPTICS_CONTROL_1, 99 ARIZONA_HAPTICS_CONTROL_1,
100 ARIZONA_HAP_CTRL_MASK, 100 ARIZONA_HAP_CTRL_MASK, 0);
101 1 << ARIZONA_HAP_CTRL_SHIFT);
102 if (ret != 0) { 101 if (ret != 0) {
103 dev_err(arizona->dev, "Failed to stop haptics: %d\n", 102 dev_err(arizona->dev, "Failed to stop haptics: %d\n",
104 ret); 103 ret);
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index 5e1665bbaa0b..2f589857a039 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -41,6 +41,7 @@
41 41
42#define DRIVER_NAME "elan_i2c" 42#define DRIVER_NAME "elan_i2c"
43#define ELAN_DRIVER_VERSION "1.6.1" 43#define ELAN_DRIVER_VERSION "1.6.1"
44#define ELAN_VENDOR_ID 0x04f3
44#define ETP_MAX_PRESSURE 255 45#define ETP_MAX_PRESSURE 255
45#define ETP_FWIDTH_REDUCE 90 46#define ETP_FWIDTH_REDUCE 90
46#define ETP_FINGER_WIDTH 15 47#define ETP_FINGER_WIDTH 15
@@ -914,6 +915,8 @@ static int elan_setup_input_device(struct elan_tp_data *data)
914 915
915 input->name = "Elan Touchpad"; 916 input->name = "Elan Touchpad";
916 input->id.bustype = BUS_I2C; 917 input->id.bustype = BUS_I2C;
918 input->id.vendor = ELAN_VENDOR_ID;
919 input->id.product = data->product_id;
917 input_set_drvdata(input, data); 920 input_set_drvdata(input, data);
918 921
919 error = input_mt_init_slots(input, ETP_MAX_FINGERS, 922 error = input_mt_init_slots(input, ETP_MAX_FINGERS,
diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
index 92c31b8f8fb4..1edfac78d4ac 100644
--- a/drivers/input/serio/parkbd.c
+++ b/drivers/input/serio/parkbd.c
@@ -145,6 +145,7 @@ static int parkbd_getport(struct parport *pp)
145{ 145{
146 struct pardev_cb parkbd_parport_cb; 146 struct pardev_cb parkbd_parport_cb;
147 147
148 memset(&parkbd_parport_cb, 0, sizeof(parkbd_parport_cb));
148 parkbd_parport_cb.irq_func = parkbd_interrupt; 149 parkbd_parport_cb.irq_func = parkbd_interrupt;
149 parkbd_parport_cb.flags = PARPORT_FLAG_EXCL; 150 parkbd_parport_cb.flags = PARPORT_FLAG_EXCL;
150 151
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index e7f966da6efa..78ca44840d60 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1819,6 +1819,14 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1819 input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); 1819 input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0);
1820 input_set_abs_params(inputdev, ABS_WHEEL, AIPTEK_WHEEL_MIN, AIPTEK_WHEEL_MAX - 1, 0, 0); 1820 input_set_abs_params(inputdev, ABS_WHEEL, AIPTEK_WHEEL_MIN, AIPTEK_WHEEL_MAX - 1, 0, 0);
1821 1821
1822 /* Verify that a device really has an endpoint */
1823 if (intf->altsetting[0].desc.bNumEndpoints < 1) {
1824 dev_err(&intf->dev,
1825 "interface has %d endpoints, but must have minimum 1\n",
1826 intf->altsetting[0].desc.bNumEndpoints);
1827 err = -EINVAL;
1828 goto fail3;
1829 }
1822 endpoint = &intf->altsetting[0].endpoint[0].desc; 1830 endpoint = &intf->altsetting[0].endpoint[0].desc;
1823 1831
1824 /* Go set up our URB, which is called when the tablet receives 1832 /* Go set up our URB, which is called when the tablet receives
@@ -1861,6 +1869,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1861 if (i == ARRAY_SIZE(speeds)) { 1869 if (i == ARRAY_SIZE(speeds)) {
1862 dev_info(&intf->dev, 1870 dev_info(&intf->dev,
1863 "Aiptek tried all speeds, no sane response\n"); 1871 "Aiptek tried all speeds, no sane response\n");
1872 err = -EINVAL;
1864 goto fail3; 1873 goto fail3;
1865 } 1874 }
1866 1875
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index c5622058c22b..2d5794ec338b 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -2487,6 +2487,31 @@ static struct mxt_acpi_platform_data samus_platform_data[] = {
2487 { } 2487 { }
2488}; 2488};
2489 2489
2490static unsigned int chromebook_tp_buttons[] = {
2491 KEY_RESERVED,
2492 KEY_RESERVED,
2493 KEY_RESERVED,
2494 KEY_RESERVED,
2495 KEY_RESERVED,
2496 BTN_LEFT
2497};
2498
2499static struct mxt_acpi_platform_data chromebook_platform_data[] = {
2500 {
2501 /* Touchpad */
2502 .hid = "ATML0000",
2503 .pdata = {
2504 .t19_num_keys = ARRAY_SIZE(chromebook_tp_buttons),
2505 .t19_keymap = chromebook_tp_buttons,
2506 },
2507 },
2508 {
2509 /* Touchscreen */
2510 .hid = "ATML0001",
2511 },
2512 { }
2513};
2514
2490static const struct dmi_system_id mxt_dmi_table[] = { 2515static const struct dmi_system_id mxt_dmi_table[] = {
2491 { 2516 {
2492 /* 2015 Google Pixel */ 2517 /* 2015 Google Pixel */
@@ -2497,6 +2522,14 @@ static const struct dmi_system_id mxt_dmi_table[] = {
2497 }, 2522 },
2498 .driver_data = samus_platform_data, 2523 .driver_data = samus_platform_data,
2499 }, 2524 },
2525 {
2526 /* Other Google Chromebooks */
2527 .ident = "Chromebook",
2528 .matches = {
2529 DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
2530 },
2531 .driver_data = chromebook_platform_data,
2532 },
2500 { } 2533 { }
2501}; 2534};
2502 2535
@@ -2701,6 +2734,7 @@ static const struct i2c_device_id mxt_id[] = {
2701 { "qt602240_ts", 0 }, 2734 { "qt602240_ts", 0 },
2702 { "atmel_mxt_ts", 0 }, 2735 { "atmel_mxt_ts", 0 },
2703 { "atmel_mxt_tp", 0 }, 2736 { "atmel_mxt_tp", 0 },
2737 { "maxtouch", 0 },
2704 { "mXT224", 0 }, 2738 { "mXT224", 0 },
2705 { } 2739 { }
2706}; 2740};
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index 17cc20ef4923..ac09855fa435 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -1316,7 +1316,13 @@ static int __maybe_unused elants_i2c_suspend(struct device *dev)
1316 1316
1317 disable_irq(client->irq); 1317 disable_irq(client->irq);
1318 1318
1319 if (device_may_wakeup(dev) || ts->keep_power_in_suspend) { 1319 if (device_may_wakeup(dev)) {
1320 /*
1321 * The device will automatically enter idle mode
1322 * that has reduced power consumption.
1323 */
1324 ts->wake_irq_enabled = (enable_irq_wake(client->irq) == 0);
1325 } else if (ts->keep_power_in_suspend) {
1320 for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) { 1326 for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) {
1321 error = elants_i2c_send(client, set_sleep_cmd, 1327 error = elants_i2c_send(client, set_sleep_cmd,
1322 sizeof(set_sleep_cmd)); 1328 sizeof(set_sleep_cmd));
@@ -1326,10 +1332,6 @@ static int __maybe_unused elants_i2c_suspend(struct device *dev)
1326 dev_err(&client->dev, 1332 dev_err(&client->dev,
1327 "suspend command failed: %d\n", error); 1333 "suspend command failed: %d\n", error);
1328 } 1334 }
1329
1330 if (device_may_wakeup(dev))
1331 ts->wake_irq_enabled =
1332 (enable_irq_wake(client->irq) == 0);
1333 } else { 1335 } else {
1334 elants_i2c_power_off(ts); 1336 elants_i2c_power_off(ts);
1335 } 1337 }
@@ -1345,10 +1347,11 @@ static int __maybe_unused elants_i2c_resume(struct device *dev)
1345 int retry_cnt; 1347 int retry_cnt;
1346 int error; 1348 int error;
1347 1349
1348 if (device_may_wakeup(dev) && ts->wake_irq_enabled) 1350 if (device_may_wakeup(dev)) {
1349 disable_irq_wake(client->irq); 1351 if (ts->wake_irq_enabled)
1350 1352 disable_irq_wake(client->irq);
1351 if (ts->keep_power_in_suspend) { 1353 elants_i2c_sw_reset(client);
1354 } else if (ts->keep_power_in_suspend) {
1352 for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) { 1355 for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) {
1353 error = elants_i2c_send(client, set_active_cmd, 1356 error = elants_i2c_send(client, set_active_cmd,
1354 sizeof(set_active_cmd)); 1357 sizeof(set_active_cmd));