Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+65 -12
+1 -1
Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
··· 12 12 Required subnode-properties: 13 13 - label: Descriptive name of the key. 14 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 16 - voltage: Voltage in µV at lradc input when this key is pressed. 17 17 18 18 Example:
+1
drivers/input/joystick/db9.c
··· 592 592 return; 593 593 } 594 594 595 + memset(&db9_parport_cb, 0, sizeof(db9_parport_cb)); 595 596 db9_parport_cb.flags = PARPORT_FLAG_EXCL; 596 597 597 598 pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);
+1
drivers/input/joystick/gamecon.c
··· 951 951 pads = gc_cfg[port_idx].args + 1; 952 952 n_pads = gc_cfg[port_idx].nargs - 1; 953 953 954 + memset(&gc_parport_cb, 0, sizeof(gc_parport_cb)); 954 955 gc_parport_cb.flags = PARPORT_FLAG_EXCL; 955 956 956 957 pd = parport_register_dev_model(pp, "gamecon", &gc_parport_cb,
+1
drivers/input/joystick/turbografx.c
··· 181 181 n_buttons = tgfx_cfg[port_idx].args + 1; 182 182 n_devs = tgfx_cfg[port_idx].nargs - 1; 183 183 184 + memset(&tgfx_parport_cb, 0, sizeof(tgfx_parport_cb)); 184 185 tgfx_parport_cb.flags = PARPORT_FLAG_EXCL; 185 186 186 187 pd = parport_register_dev_model(pp, "turbografx", &tgfx_parport_cb,
+1
drivers/input/joystick/walkera0701.c
··· 218 218 219 219 w->parport = pp; 220 220 221 + memset(&walkera0701_parport_cb, 0, sizeof(walkera0701_parport_cb)); 221 222 walkera0701_parport_cb.flags = PARPORT_FLAG_EXCL; 222 223 walkera0701_parport_cb.irq_func = walkera0701_irq_handler; 223 224 walkera0701_parport_cb.private = w;
+1 -2
drivers/input/misc/arizona-haptics.c
··· 97 97 98 98 ret = regmap_update_bits(arizona->regmap, 99 99 ARIZONA_HAPTICS_CONTROL_1, 100 - ARIZONA_HAP_CTRL_MASK, 101 - 1 << ARIZONA_HAP_CTRL_SHIFT); 100 + ARIZONA_HAP_CTRL_MASK, 0); 102 101 if (ret != 0) { 103 102 dev_err(arizona->dev, "Failed to stop haptics: %d\n", 104 103 ret);
+3
drivers/input/mouse/elan_i2c_core.c
··· 41 41 42 42 #define DRIVER_NAME "elan_i2c" 43 43 #define ELAN_DRIVER_VERSION "1.6.1" 44 + #define ELAN_VENDOR_ID 0x04f3 44 45 #define ETP_MAX_PRESSURE 255 45 46 #define ETP_FWIDTH_REDUCE 90 46 47 #define ETP_FINGER_WIDTH 15 ··· 915 914 916 915 input->name = "Elan Touchpad"; 917 916 input->id.bustype = BUS_I2C; 917 + input->id.vendor = ELAN_VENDOR_ID; 918 + input->id.product = data->product_id; 918 919 input_set_drvdata(input, data); 919 920 920 921 error = input_mt_init_slots(input, ETP_MAX_FINGERS,
+1
drivers/input/serio/parkbd.c
··· 145 145 { 146 146 struct pardev_cb parkbd_parport_cb; 147 147 148 + memset(&parkbd_parport_cb, 0, sizeof(parkbd_parport_cb)); 148 149 parkbd_parport_cb.irq_func = parkbd_interrupt; 149 150 parkbd_parport_cb.flags = PARPORT_FLAG_EXCL; 150 151
+9
drivers/input/tablet/aiptek.c
··· 1819 1819 input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); 1820 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 1830 endpoint = &intf->altsetting[0].endpoint[0].desc; 1823 1831 1824 1832 /* Go set up our URB, which is called when the tablet receives ··· 1869 1861 if (i == ARRAY_SIZE(speeds)) { 1870 1862 dev_info(&intf->dev, 1871 1863 "Aiptek tried all speeds, no sane response\n"); 1864 + err = -EINVAL; 1872 1865 goto fail3; 1873 1866 } 1874 1867
+34
drivers/input/touchscreen/atmel_mxt_ts.c
··· 2487 2487 { } 2488 2488 }; 2489 2489 2490 + static 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 + 2499 + static 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 + 2490 2515 static const struct dmi_system_id mxt_dmi_table[] = { 2491 2516 { 2492 2517 /* 2015 Google Pixel */ ··· 2521 2496 DMI_MATCH(DMI_PRODUCT_NAME, "Samus"), 2522 2497 }, 2523 2498 .driver_data = samus_platform_data, 2499 + }, 2500 + { 2501 + /* Other Google Chromebooks */ 2502 + .ident = "Chromebook", 2503 + .matches = { 2504 + DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), 2505 + }, 2506 + .driver_data = chromebook_platform_data, 2524 2507 }, 2525 2508 { } 2526 2509 }; ··· 2734 2701 { "qt602240_ts", 0 }, 2735 2702 { "atmel_mxt_ts", 0 }, 2736 2703 { "atmel_mxt_tp", 0 }, 2704 + { "maxtouch", 0 }, 2737 2705 { "mXT224", 0 }, 2738 2706 { } 2739 2707 };
+12 -9
drivers/input/touchscreen/elants_i2c.c
··· 1316 1316 1317 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 1326 for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) { 1321 1327 error = elants_i2c_send(client, set_sleep_cmd, 1322 1328 sizeof(set_sleep_cmd)); ··· 1332 1326 dev_err(&client->dev, 1333 1327 "suspend command failed: %d\n", error); 1334 1328 } 1335 - 1336 - if (device_may_wakeup(dev)) 1337 - ts->wake_irq_enabled = 1338 - (enable_irq_wake(client->irq) == 0); 1339 1329 } else { 1340 1330 elants_i2c_power_off(ts); 1341 1331 } ··· 1347 1345 int retry_cnt; 1348 1346 int error; 1349 1347 1350 - if (device_may_wakeup(dev) && ts->wake_irq_enabled) 1351 - disable_irq_wake(client->irq); 1352 - 1353 - if (ts->keep_power_in_suspend) { 1348 + if (device_may_wakeup(dev)) { 1349 + if (ts->wake_irq_enabled) 1350 + disable_irq_wake(client->irq); 1351 + elants_i2c_sw_reset(client); 1352 + } else if (ts->keep_power_in_suspend) { 1354 1353 for (retry_cnt = 0; retry_cnt < MAX_RETRIES; retry_cnt++) { 1355 1354 error = elants_i2c_send(client, set_active_cmd, 1356 1355 sizeof(set_active_cmd));