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 more input updates from Dmitry Torokhov:

- fixups for Synaptics RMI4 driver

- a quirk for Goodinx touchscreen on Teclast tablet

- a new keycode definition for activating privacy screen feature found
on a few "enterprise" laptops

- updates to snvs_pwrkey driver

- polling uinput device for writing (which is always allowed) now works

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers
Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
Input: goodix - add upside-down quirk for Teclast X89 tablet
Input: add privacy screen toggle keycode
Input: uinput - fix returning EPOLLOUT from uinput_poll
Input: snvs_pwrkey - remove gratuitous NULL initializers
Input: snvs_pwrkey - send key events for i.MX6 S, DL and Q

+51 -17
+1 -1
drivers/input/keyboard/Kconfig
··· 450 450 depends on OF 451 451 help 452 452 This is the snvs powerkey driver for the Freescale i.MX application 453 - processors that are newer than i.MX6 SX. 453 + processors. 454 454 455 455 To compile this driver as a module, choose M here; the 456 456 module will be called snvs_pwrkey.
+35 -13
drivers/input/keyboard/snvs_pwrkey.c
··· 19 19 #include <linux/mfd/syscon.h> 20 20 #include <linux/regmap.h> 21 21 22 - #define SNVS_LPSR_REG 0x4C /* LP Status Register */ 23 - #define SNVS_LPCR_REG 0x38 /* LP Control Register */ 24 - #define SNVS_HPSR_REG 0x14 25 - #define SNVS_HPSR_BTN BIT(6) 26 - #define SNVS_LPSR_SPO BIT(18) 27 - #define SNVS_LPCR_DEP_EN BIT(5) 22 + #define SNVS_HPVIDR1_REG 0xF8 23 + #define SNVS_LPSR_REG 0x4C /* LP Status Register */ 24 + #define SNVS_LPCR_REG 0x38 /* LP Control Register */ 25 + #define SNVS_HPSR_REG 0x14 26 + #define SNVS_HPSR_BTN BIT(6) 27 + #define SNVS_LPSR_SPO BIT(18) 28 + #define SNVS_LPCR_DEP_EN BIT(5) 28 29 29 - #define DEBOUNCE_TIME 30 30 - #define REPEAT_INTERVAL 60 30 + #define DEBOUNCE_TIME 30 31 + #define REPEAT_INTERVAL 60 31 32 32 33 struct pwrkey_drv_data { 33 34 struct regmap *snvs; ··· 38 37 int wakeup; 39 38 struct timer_list check_timer; 40 39 struct input_dev *input; 40 + u8 minor_rev; 41 41 }; 42 42 43 43 static void imx_imx_snvs_check_for_events(struct timer_list *t) ··· 69 67 { 70 68 struct platform_device *pdev = dev_id; 71 69 struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); 70 + struct input_dev *input = pdata->input; 72 71 u32 lp_status; 73 72 74 - pm_wakeup_event(pdata->input->dev.parent, 0); 73 + pm_wakeup_event(input->dev.parent, 0); 75 74 76 75 regmap_read(pdata->snvs, SNVS_LPSR_REG, &lp_status); 77 - if (lp_status & SNVS_LPSR_SPO) 78 - mod_timer(&pdata->check_timer, jiffies + msecs_to_jiffies(DEBOUNCE_TIME)); 76 + if (lp_status & SNVS_LPSR_SPO) { 77 + if (pdata->minor_rev == 0) { 78 + /* 79 + * The first generation i.MX6 SoCs only sends an 80 + * interrupt on button release. To mimic power-key 81 + * usage, we'll prepend a press event. 82 + */ 83 + input_report_key(input, pdata->keycode, 1); 84 + input_sync(input); 85 + input_report_key(input, pdata->keycode, 0); 86 + input_sync(input); 87 + pm_relax(input->dev.parent); 88 + } else { 89 + mod_timer(&pdata->check_timer, 90 + jiffies + msecs_to_jiffies(DEBOUNCE_TIME)); 91 + } 92 + } 79 93 80 94 /* clear SPO status */ 81 95 regmap_write(pdata->snvs, SNVS_LPSR_REG, SNVS_LPSR_SPO); ··· 108 90 109 91 static int imx_snvs_pwrkey_probe(struct platform_device *pdev) 110 92 { 111 - struct pwrkey_drv_data *pdata = NULL; 112 - struct input_dev *input = NULL; 93 + struct pwrkey_drv_data *pdata; 94 + struct input_dev *input; 113 95 struct device_node *np; 114 96 int error; 97 + u32 vid; 115 98 116 99 /* Get SNVS register Page */ 117 100 np = pdev->dev.of_node; ··· 139 120 pdata->irq = platform_get_irq(pdev, 0); 140 121 if (pdata->irq < 0) 141 122 return -EINVAL; 123 + 124 + regmap_read(pdata->snvs, SNVS_HPVIDR1_REG, &vid); 125 + pdata->minor_rev = vid & 0xff; 142 126 143 127 regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_DEP_EN, SNVS_LPCR_DEP_EN); 144 128
+1 -1
drivers/input/misc/uinput.c
··· 695 695 if (udev->head != udev->tail) 696 696 return EPOLLIN | EPOLLRDNORM; 697 697 698 - return 0; 698 + return EPOLLOUT | EPOLLWRNORM; 699 699 } 700 700 701 701 static int uinput_release(struct inode *inode, struct file *file)
+3
drivers/input/rmi4/rmi_f34v7.c
··· 1189 1189 { 1190 1190 int ret; 1191 1191 1192 + f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev, 1193 + f34->fn->irq_mask); 1194 + 1192 1195 rmi_f34v7_read_queries_bl_version(f34); 1193 1196 1194 1197 f34->v7.image = fw->data;
-2
drivers/input/rmi4/rmi_smbus.c
··· 163 163 /* prepare to write next block of bytes */ 164 164 cur_len -= SMB_MAX_COUNT; 165 165 databuff += SMB_MAX_COUNT; 166 - rmiaddr += SMB_MAX_COUNT; 167 166 } 168 167 exit: 169 168 mutex_unlock(&rmi_smb->page_mutex); ··· 214 215 /* prepare to read next block of bytes */ 215 216 cur_len -= SMB_MAX_COUNT; 216 217 databuff += SMB_MAX_COUNT; 217 - rmiaddr += SMB_MAX_COUNT; 218 218 } 219 219 220 220 retval = 0;
+9
drivers/input/touchscreen/goodix.c
··· 129 129 static const struct dmi_system_id rotated_screen[] = { 130 130 #if defined(CONFIG_DMI) && defined(CONFIG_X86) 131 131 { 132 + .ident = "Teclast X89", 133 + .matches = { 134 + /* tPAD is too generic, also match on bios date */ 135 + DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"), 136 + DMI_MATCH(DMI_BOARD_NAME, "tPAD"), 137 + DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"), 138 + }, 139 + }, 140 + { 132 141 .ident = "WinBook TW100", 133 142 .matches = { 134 143 DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
+2
include/uapi/linux/input-event-codes.h
··· 649 649 */ 650 650 #define KEY_DATA 0x277 651 651 #define KEY_ONSCREEN_KEYBOARD 0x278 652 + /* Electronic privacy screen control */ 653 + #define KEY_PRIVACY_SCREEN_TOGGLE 0x279 652 654 653 655 /* 654 656 * Some keyboards have keys which do not have a defined meaning, these keys