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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

- a fixup for Goodix touchscreen driver allowing it to work on certain
Cherry Trail devices

- a fix for imbalanced enable/disable regulator in Elam touchpad driver
that became apparent when used with Asus TF103C 2-in-1 dock

- a couple new input keycodes used on newer keyboards

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
HID: add mapping for KEY_ALL_APPLICATIONS
HID: add mapping for KEY_DICTATE
Input: elan_i2c - fix regulator enable count imbalance after suspend/resume
Input: elan_i2c - move regulator_[en|dis]able() out of elan_[en|dis]able_power()
Input: goodix - workaround Cherry Trail devices with a bogus ACPI Interrupt() resource
Input: goodix - use the new soc_intel_is_byt() helper
Input: samsung-keypad - properly state IOMEM dependency

+51 -61
+4 -1
drivers/hid/hid-debug.c
··· 860 860 [KEY_F22] = "F22", [KEY_F23] = "F23", 861 861 [KEY_F24] = "F24", [KEY_PLAYCD] = "PlayCD", 862 862 [KEY_PAUSECD] = "PauseCD", [KEY_PROG3] = "Prog3", 863 - [KEY_PROG4] = "Prog4", [KEY_SUSPEND] = "Suspend", 863 + [KEY_PROG4] = "Prog4", 864 + [KEY_ALL_APPLICATIONS] = "AllApplications", 865 + [KEY_SUSPEND] = "Suspend", 864 866 [KEY_CLOSE] = "Close", [KEY_PLAY] = "Play", 865 867 [KEY_FASTFORWARD] = "FastForward", [KEY_BASSBOOST] = "BassBoost", 866 868 [KEY_PRINT] = "Print", [KEY_HP] = "HP", ··· 971 969 [KEY_ASSISTANT] = "Assistant", 972 970 [KEY_KBD_LAYOUT_NEXT] = "KbdLayoutNext", 973 971 [KEY_EMOJI_PICKER] = "EmojiPicker", 972 + [KEY_DICTATE] = "Dictate", 974 973 [KEY_BRIGHTNESS_MIN] = "BrightnessMin", 975 974 [KEY_BRIGHTNESS_MAX] = "BrightnessMax", 976 975 [KEY_BRIGHTNESS_AUTO] = "BrightnessAuto",
+3
drivers/hid/hid-input.c
··· 992 992 case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; 993 993 case 0x0cf: map_key_clear(KEY_VOICECOMMAND); break; 994 994 995 + case 0x0d8: map_key_clear(KEY_DICTATE); break; 995 996 case 0x0d9: map_key_clear(KEY_EMOJI_PICKER); break; 996 997 997 998 case 0x0e0: map_abs_clear(ABS_VOLUME); break; ··· 1083 1082 case 0x28c: map_key_clear(KEY_SEND); break; 1084 1083 1085 1084 case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT); break; 1085 + 1086 + case 0x2a2: map_key_clear(KEY_ALL_APPLICATIONS); break; 1086 1087 1087 1088 case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV); break; 1088 1089 case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT); break;
+1 -1
drivers/input/keyboard/Kconfig
··· 556 556 557 557 config KEYBOARD_SAMSUNG 558 558 tristate "Samsung keypad support" 559 - depends on HAVE_CLK 559 + depends on HAS_IOMEM && HAVE_CLK 560 560 select INPUT_MATRIXKMAP 561 561 help 562 562 Say Y here if you want to use the keypad on your Samsung mobile
+23 -41
drivers/input/mouse/elan_i2c_core.c
··· 186 186 return 0; 187 187 } 188 188 189 - static int elan_enable_power(struct elan_tp_data *data) 189 + static int elan_set_power(struct elan_tp_data *data, bool on) 190 190 { 191 191 int repeat = ETP_RETRY_COUNT; 192 192 int error; 193 193 194 - error = regulator_enable(data->vcc); 195 - if (error) { 196 - dev_err(&data->client->dev, 197 - "failed to enable regulator: %d\n", error); 198 - return error; 199 - } 200 - 201 194 do { 202 - error = data->ops->power_control(data->client, true); 195 + error = data->ops->power_control(data->client, on); 203 196 if (error >= 0) 204 197 return 0; 205 198 206 199 msleep(30); 207 200 } while (--repeat > 0); 208 201 209 - dev_err(&data->client->dev, "failed to enable power: %d\n", error); 210 - return error; 211 - } 212 - 213 - static int elan_disable_power(struct elan_tp_data *data) 214 - { 215 - int repeat = ETP_RETRY_COUNT; 216 - int error; 217 - 218 - do { 219 - error = data->ops->power_control(data->client, false); 220 - if (!error) { 221 - error = regulator_disable(data->vcc); 222 - if (error) { 223 - dev_err(&data->client->dev, 224 - "failed to disable regulator: %d\n", 225 - error); 226 - /* Attempt to power the chip back up */ 227 - data->ops->power_control(data->client, true); 228 - break; 229 - } 230 - 231 - return 0; 232 - } 233 - 234 - msleep(30); 235 - } while (--repeat > 0); 236 - 237 - dev_err(&data->client->dev, "failed to disable power: %d\n", error); 202 + dev_err(&data->client->dev, "failed to set power %s: %d\n", 203 + on ? "on" : "off", error); 238 204 return error; 239 205 } 240 206 ··· 1365 1399 /* Enable wake from IRQ */ 1366 1400 data->irq_wake = (enable_irq_wake(client->irq) == 0); 1367 1401 } else { 1368 - ret = elan_disable_power(data); 1402 + ret = elan_set_power(data, false); 1403 + if (ret) 1404 + goto err; 1405 + 1406 + ret = regulator_disable(data->vcc); 1407 + if (ret) { 1408 + dev_err(dev, "error %d disabling regulator\n", ret); 1409 + /* Attempt to power the chip back up */ 1410 + elan_set_power(data, true); 1411 + } 1369 1412 } 1370 1413 1414 + err: 1371 1415 mutex_unlock(&data->sysfs_mutex); 1372 1416 return ret; 1373 1417 } ··· 1388 1412 struct elan_tp_data *data = i2c_get_clientdata(client); 1389 1413 int error; 1390 1414 1391 - if (device_may_wakeup(dev) && data->irq_wake) { 1415 + if (!device_may_wakeup(dev)) { 1416 + error = regulator_enable(data->vcc); 1417 + if (error) { 1418 + dev_err(dev, "error %d enabling regulator\n", error); 1419 + goto err; 1420 + } 1421 + } else if (data->irq_wake) { 1392 1422 disable_irq_wake(client->irq); 1393 1423 data->irq_wake = false; 1394 1424 } 1395 1425 1396 - error = elan_enable_power(data); 1426 + error = elan_set_power(data, true); 1397 1427 if (error) { 1398 1428 dev_err(dev, "power up when resuming failed: %d\n", error); 1399 1429 goto err;
+17 -17
drivers/input/touchscreen/goodix.c
··· 18 18 #include <linux/delay.h> 19 19 #include <linux/irq.h> 20 20 #include <linux/interrupt.h> 21 + #include <linux/platform_data/x86/soc.h> 21 22 #include <linux/slab.h> 22 23 #include <linux/acpi.h> 23 24 #include <linux/of.h> ··· 806 805 } 807 806 808 807 #ifdef ACPI_GPIO_SUPPORT 809 - #include <asm/cpu_device_id.h> 810 - #include <asm/intel-family.h> 811 - 812 - static const struct x86_cpu_id baytrail_cpu_ids[] = { 813 - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT, X86_FEATURE_ANY, }, 814 - {} 815 - }; 816 - 817 - static inline bool is_byt(void) 818 - { 819 - const struct x86_cpu_id *id = x86_match_cpu(baytrail_cpu_ids); 820 - 821 - return !!id; 822 - } 823 - 824 808 static const struct acpi_gpio_params first_gpio = { 0, 0, false }; 825 809 static const struct acpi_gpio_params second_gpio = { 1, 0, false }; 826 810 ··· 864 878 const struct acpi_gpio_mapping *gpio_mapping = NULL; 865 879 struct device *dev = &ts->client->dev; 866 880 LIST_HEAD(resources); 867 - int ret; 881 + int irq, ret; 868 882 869 883 ts->gpio_count = 0; 870 884 ts->gpio_int_idx = -1; ··· 876 890 } 877 891 878 892 acpi_dev_free_resource_list(&resources); 893 + 894 + /* 895 + * CHT devices should have a GpioInt + a regular GPIO ACPI resource. 896 + * Some CHT devices have a bug (where the also is bogus Interrupt 897 + * resource copied from a previous BYT based generation). i2c-core-acpi 898 + * will use the non-working Interrupt resource, fix this up. 899 + */ 900 + if (soc_intel_is_cht() && ts->gpio_count == 2 && ts->gpio_int_idx != -1) { 901 + irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 0); 902 + if (irq > 0 && irq != ts->client->irq) { 903 + dev_warn(dev, "Overriding IRQ %d -> %d\n", ts->client->irq, irq); 904 + ts->client->irq = irq; 905 + } 906 + } 879 907 880 908 if (ts->gpio_count == 2 && ts->gpio_int_idx == 0) { 881 909 ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO; ··· 903 903 dev_info(dev, "Using ACPI INTI and INTO methods for IRQ pin access\n"); 904 904 ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_METHOD; 905 905 gpio_mapping = acpi_goodix_reset_only_gpios; 906 - } else if (is_byt() && ts->gpio_count == 2 && ts->gpio_int_idx == -1) { 906 + } else if (soc_intel_is_byt() && ts->gpio_count == 2 && ts->gpio_int_idx == -1) { 907 907 dev_info(dev, "No ACPI GpioInt resource, assuming that the GPIO order is reset, int\n"); 908 908 ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO; 909 909 gpio_mapping = acpi_goodix_int_last_gpios;
+3 -1
include/uapi/linux/input-event-codes.h
··· 278 278 #define KEY_PAUSECD 201 279 279 #define KEY_PROG3 202 280 280 #define KEY_PROG4 203 281 - #define KEY_DASHBOARD 204 /* AL Dashboard */ 281 + #define KEY_ALL_APPLICATIONS 204 /* AC Desktop Show All Applications */ 282 + #define KEY_DASHBOARD KEY_ALL_APPLICATIONS 282 283 #define KEY_SUSPEND 205 283 284 #define KEY_CLOSE 206 /* AC Close */ 284 285 #define KEY_PLAY 207 ··· 613 612 #define KEY_ASSISTANT 0x247 /* AL Context-aware desktop assistant */ 614 613 #define KEY_KBD_LAYOUT_NEXT 0x248 /* AC Next Keyboard Layout Select */ 615 614 #define KEY_EMOJI_PICKER 0x249 /* Show/hide emoji picker (HUTRR101) */ 615 + #define KEY_DICTATE 0x24a /* Start or Stop Voice Dictation Session (HUTRR99) */ 616 616 617 617 #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ 618 618 #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */