diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-30 21:49:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-30 21:49:44 -0400 |
commit | 38dab9ac1c017e96dc98e978111e365134d41d13 (patch) | |
tree | 5fc7b79e7f0be8ac28e0b232ac4afe8e02f1e1db | |
parent | f9793e379bbb1188c72d8a367083290a14f98c97 (diff) | |
parent | 195562194aad3a0a3915941077f283bcc6347b9b (diff) |
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
-rw-r--r-- | drivers/input/mouse/alps.c | 48 | ||||
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/lpc32xx_ts.c | 4 |
3 files changed, 45 insertions, 8 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 4d246861d692..41e6cb501e6a 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -100,7 +100,7 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = { | |||
100 | #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ | 100 | #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ |
101 | #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with | 101 | #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with |
102 | 6-byte ALPS packet */ | 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 | #define ALPS_BUTTONPAD 0x200 /* device is a clickpad */ | 104 | #define ALPS_BUTTONPAD 0x200 /* device is a clickpad */ |
105 | 105 | ||
106 | static const struct alps_model_info alps_model_data[] = { | 106 | static const struct alps_model_info alps_model_data[] = { |
@@ -159,6 +159,43 @@ static const struct alps_protocol_info alps_v8_protocol_data = { | |||
159 | ALPS_PROTO_V8, 0x18, 0x18, 0 | 159 | ALPS_PROTO_V8, 0x18, 0x18, 0 |
160 | }; | 160 | }; |
161 | 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 | { } | ||
197 | }; | ||
198 | |||
162 | static void alps_set_abs_params_st(struct alps_data *priv, | 199 | static void alps_set_abs_params_st(struct alps_data *priv, |
163 | struct input_dev *dev1); | 200 | struct input_dev *dev1); |
164 | static void alps_set_abs_params_semi_mt(struct alps_data *priv, | 201 | static void alps_set_abs_params_semi_mt(struct alps_data *priv, |
@@ -253,9 +290,8 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse) | |||
253 | return; | 290 | return; |
254 | } | 291 | } |
255 | 292 | ||
256 | /* Dell non interleaved V2 dualpoint has separate stick button bits */ | 293 | /* Some models have separate stick button bits */ |
257 | if (priv->proto_version == ALPS_PROTO_V2 && | 294 | if (priv->flags & ALPS_STICK_BITS) { |
258 | priv->flags == (ALPS_DELL | ALPS_PASS | ALPS_DUALPOINT)) { | ||
259 | left |= packet[0] & 1; | 295 | left |= packet[0] & 1; |
260 | right |= packet[0] & 2; | 296 | right |= packet[0] & 2; |
261 | middle |= packet[0] & 4; | 297 | middle |= packet[0] & 4; |
@@ -2552,8 +2588,6 @@ static int alps_set_protocol(struct psmouse *psmouse, | |||
2552 | priv->byte0 = protocol->byte0; | 2588 | priv->byte0 = protocol->byte0; |
2553 | priv->mask0 = protocol->mask0; | 2589 | priv->mask0 = protocol->mask0; |
2554 | priv->flags = protocol->flags; | 2590 | priv->flags = protocol->flags; |
2555 | if (dmi_name_in_vendors("Dell")) | ||
2556 | priv->flags |= ALPS_DELL; | ||
2557 | 2591 | ||
2558 | priv->x_max = 2000; | 2592 | priv->x_max = 2000; |
2559 | priv->y_max = 1400; | 2593 | priv->y_max = 1400; |
@@ -2568,6 +2602,8 @@ static int alps_set_protocol(struct psmouse *psmouse, | |||
2568 | priv->set_abs_params = alps_set_abs_params_st; | 2602 | priv->set_abs_params = alps_set_abs_params_st; |
2569 | priv->x_max = 1023; | 2603 | priv->x_max = 1023; |
2570 | priv->y_max = 767; | 2604 | priv->y_max = 767; |
2605 | if (dmi_check_system(alps_dmi_has_separate_stick_buttons)) | ||
2606 | priv->flags |= ALPS_STICK_BITS; | ||
2571 | break; | 2607 | break; |
2572 | 2608 | ||
2573 | case ALPS_PROTO_V3: | 2609 | case ALPS_PROTO_V3: |
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 600dcceff542..deb14c12ae8b 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -1006,6 +1006,7 @@ config TOUCHSCREEN_SUN4I | |||
1006 | config TOUCHSCREEN_SUR40 | 1006 | config TOUCHSCREEN_SUR40 |
1007 | tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen" | 1007 | tristate "Samsung SUR40 (Surface 2.0/PixelSense) touchscreen" |
1008 | depends on USB && MEDIA_USB_SUPPORT && HAS_DMA | 1008 | depends on USB && MEDIA_USB_SUPPORT && HAS_DMA |
1009 | depends on VIDEO_V4L2 | ||
1009 | select INPUT_POLLDEV | 1010 | select INPUT_POLLDEV |
1010 | select VIDEOBUF2_DMA_SG | 1011 | select VIDEOBUF2_DMA_SG |
1011 | help | 1012 | help |
diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index 24d704cd9f88..7fbb3b0c8571 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c | |||
@@ -139,14 +139,14 @@ static void lpc32xx_stop_tsc(struct lpc32xx_tsc *tsc) | |||
139 | tsc_readl(tsc, LPC32XX_TSC_CON) & | 139 | tsc_readl(tsc, LPC32XX_TSC_CON) & |
140 | ~LPC32XX_TSC_ADCCON_AUTO_EN); | 140 | ~LPC32XX_TSC_ADCCON_AUTO_EN); |
141 | 141 | ||
142 | clk_disable(tsc->clk); | 142 | clk_disable_unprepare(tsc->clk); |
143 | } | 143 | } |
144 | 144 | ||
145 | static void lpc32xx_setup_tsc(struct lpc32xx_tsc *tsc) | 145 | static void lpc32xx_setup_tsc(struct lpc32xx_tsc *tsc) |
146 | { | 146 | { |
147 | u32 tmp; | 147 | u32 tmp; |
148 | 148 | ||
149 | clk_enable(tsc->clk); | 149 | clk_prepare_enable(tsc->clk); |
150 | 150 | ||
151 | tmp = tsc_readl(tsc, LPC32XX_TSC_CON) & ~LPC32XX_TSC_ADCCON_POWER_UP; | 151 | tmp = tsc_readl(tsc, LPC32XX_TSC_CON) & ~LPC32XX_TSC_ADCCON_POWER_UP; |
152 | 152 | ||