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 layer fixes from Dmitry Torokhov:

- a change to the ALPS driver where we had limit the quirk for
trackstick handling from being active on all Dells to just a few
models

- a fix for a build dependency issue in the sur40 driver

- a small clock handling fixup in the LPC32xx touchscreen driver

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: alps - only the Dell Latitude D420/430/620/630 have separate stick button bits
Input: sur40 - add dependency on VIDEO_V4L2
Input: lpc32xx_ts - fix warnings caused by enabling unprepared clock

+45 -8
+42 -6
drivers/input/mouse/alps.c
··· 100 100 #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ 101 101 #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with 102 102 6-byte ALPS packet */ 103 - #define ALPS_DELL 0x100 /* device is a Dell laptop */ 103 + #define ALPS_STICK_BITS 0x100 /* separate stick button bits */ 104 104 #define ALPS_BUTTONPAD 0x200 /* device is a clickpad */ 105 105 106 106 static const struct alps_model_info alps_model_data[] = { ··· 157 157 158 158 static const struct alps_protocol_info alps_v8_protocol_data = { 159 159 ALPS_PROTO_V8, 0x18, 0x18, 0 160 + }; 161 + 162 + /* 163 + * Some v2 models report the stick buttons in separate bits 164 + */ 165 + static const struct dmi_system_id alps_dmi_has_separate_stick_buttons[] = { 166 + #if defined(CONFIG_DMI) && defined(CONFIG_X86) 167 + { 168 + /* Extrapolated from other entries */ 169 + .matches = { 170 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 171 + DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D420"), 172 + }, 173 + }, 174 + { 175 + /* Reported-by: Hans de Bruin <jmdebruin@xmsnet.nl> */ 176 + .matches = { 177 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 178 + DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D430"), 179 + }, 180 + }, 181 + { 182 + /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ 183 + .matches = { 184 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 185 + DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D620"), 186 + }, 187 + }, 188 + { 189 + /* Extrapolated from other entries */ 190 + .matches = { 191 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 192 + DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D630"), 193 + }, 194 + }, 195 + #endif 196 + { } 160 197 }; 161 198 162 199 static void alps_set_abs_params_st(struct alps_data *priv, ··· 290 253 return; 291 254 } 292 255 293 - /* Dell non interleaved V2 dualpoint has separate stick button bits */ 294 - if (priv->proto_version == ALPS_PROTO_V2 && 295 - priv->flags == (ALPS_DELL | ALPS_PASS | ALPS_DUALPOINT)) { 256 + /* Some models have separate stick button bits */ 257 + if (priv->flags & ALPS_STICK_BITS) { 296 258 left |= packet[0] & 1; 297 259 right |= packet[0] & 2; 298 260 middle |= packet[0] & 4; ··· 2588 2552 priv->byte0 = protocol->byte0; 2589 2553 priv->mask0 = protocol->mask0; 2590 2554 priv->flags = protocol->flags; 2591 - if (dmi_name_in_vendors("Dell")) 2592 - priv->flags |= ALPS_DELL; 2593 2555 2594 2556 priv->x_max = 2000; 2595 2557 priv->y_max = 1400; ··· 2602 2568 priv->set_abs_params = alps_set_abs_params_st; 2603 2569 priv->x_max = 1023; 2604 2570 priv->y_max = 767; 2571 + if (dmi_check_system(alps_dmi_has_separate_stick_buttons)) 2572 + priv->flags |= ALPS_STICK_BITS; 2605 2573 break; 2606 2574 2607 2575 case ALPS_PROTO_V3:
+1
drivers/input/touchscreen/Kconfig
··· 1006 1006 config TOUCHSCREEN_SUR40 1007 1007 tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen" 1008 1008 depends on USB && MEDIA_USB_SUPPORT && HAS_DMA 1009 + depends on VIDEO_V4L2 1009 1010 select INPUT_POLLDEV 1010 1011 select VIDEOBUF2_DMA_SG 1011 1012 help
+2 -2
drivers/input/touchscreen/lpc32xx_ts.c
··· 139 139 tsc_readl(tsc, LPC32XX_TSC_CON) & 140 140 ~LPC32XX_TSC_ADCCON_AUTO_EN); 141 141 142 - clk_disable(tsc->clk); 142 + clk_disable_unprepare(tsc->clk); 143 143 } 144 144 145 145 static void lpc32xx_setup_tsc(struct lpc32xx_tsc *tsc) 146 146 { 147 147 u32 tmp; 148 148 149 - clk_enable(tsc->clk); 149 + clk_prepare_enable(tsc->clk); 150 150 151 151 tmp = tsc_readl(tsc, LPC32XX_TSC_CON) & ~LPC32XX_TSC_ADCCON_POWER_UP; 152 152