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 fixes from Dmitry Torokhov:
"Switching a few devices with Synaptics over to SMbus and disabling
SMbus on a couple devices with Elan touchpads as they need more
plumbing on PS/2 side"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - enable SMBus for HP EliteBook 840 G4
Input: elantech - disable elan-i2c for P52 and P72
Input: synaptics - enable RMI on ThinkPad T560
Input: omap-keypad - fix idle configuration to not block SoC idle states

+22 -14
+4 -12
drivers/input/keyboard/omap4-keypad.c
··· 126 126 { 127 127 struct omap4_keypad *keypad_data = dev_id; 128 128 129 - if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)) { 130 - /* Disable interrupts */ 131 - kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, 132 - OMAP4_VAL_IRQDISABLE); 129 + if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)) 133 130 return IRQ_WAKE_THREAD; 134 - } 135 131 136 132 return IRQ_NONE; 137 133 } ··· 169 173 kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, 170 174 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); 171 175 172 - /* enable interrupts */ 173 - kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, 174 - OMAP4_DEF_IRQENABLE_EVENTEN | 175 - OMAP4_DEF_IRQENABLE_LONGKEY); 176 - 177 176 return IRQ_HANDLED; 178 177 } 179 178 ··· 205 214 206 215 disable_irq(keypad_data->irq); 207 216 208 - /* Disable interrupts */ 217 + /* Disable interrupts and wake-up events */ 209 218 kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, 210 219 OMAP4_VAL_IRQDISABLE); 220 + kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, 0); 211 221 212 222 /* clear pending interrupts */ 213 223 kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, ··· 357 365 } 358 366 359 367 error = request_threaded_irq(keypad_data->irq, omap4_keypad_irq_handler, 360 - omap4_keypad_irq_thread_fn, 0, 368 + omap4_keypad_irq_thread_fn, IRQF_ONESHOT, 361 369 "omap4-keypad", keypad_data); 362 370 if (error) { 363 371 dev_err(&pdev->dev, "failed to register interrupt\n");
+16 -2
drivers/input/mouse/elantech.c
··· 1767 1767 module_param_named(elantech_smbus, elantech_smbus, int, 0644); 1768 1768 MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device."); 1769 1769 1770 + static const char * const i2c_blacklist_pnp_ids[] = { 1771 + /* 1772 + * These are known to not be working properly as bits are missing 1773 + * in elan_i2c. 1774 + */ 1775 + "LEN2131", /* ThinkPad P52 w/ NFC */ 1776 + "LEN2132", /* ThinkPad P52 */ 1777 + "LEN2133", /* ThinkPad P72 w/ NFC */ 1778 + "LEN2134", /* ThinkPad P72 */ 1779 + NULL 1780 + }; 1781 + 1770 1782 static int elantech_create_smbus(struct psmouse *psmouse, 1771 1783 struct elantech_device_info *info, 1772 1784 bool leave_breadcrumbs) ··· 1814 1802 1815 1803 if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) { 1816 1804 /* 1817 - * New ICs are enabled by default. 1805 + * New ICs are enabled by default, unless mentioned in 1806 + * i2c_blacklist_pnp_ids. 1818 1807 * Old ICs are up to the user to decide. 1819 1808 */ 1820 - if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version)) 1809 + if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) || 1810 + psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids)) 1821 1811 return -ENXIO; 1822 1812 } 1823 1813
+2
drivers/input/mouse/synaptics.c
··· 171 171 "LEN0046", /* X250 */ 172 172 "LEN004a", /* W541 */ 173 173 "LEN005b", /* P50 */ 174 + "LEN005e", /* T560 */ 174 175 "LEN0071", /* T480 */ 175 176 "LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */ 176 177 "LEN0073", /* X1 Carbon G5 (Elantech) */ ··· 179 178 "LEN0096", /* X280 */ 180 179 "LEN0097", /* X280 -> ALPS trackpoint */ 181 180 "LEN200f", /* T450s */ 181 + "SYN3052", /* HP EliteBook 840 G4 */ 182 182 "SYN3221", /* HP 15-ay000 */ 183 183 NULL 184 184 };