Skip to content

Commit b292d6b

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov: "A few fixups for the input subsystem" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: document INPUT_PROP_TOPBUTTONPAD Input: fix defuzzing logic Input: sirfsoc-onkey - fix GPL v2 license string typo Input: st-keyscan - fix 'defined but not used' compiler warnings Input: synaptics - add min/max quirk for pnp-id LEN2002 (Edge E531) Input: i8042 - add Acer Aspire 5710 to nomux blacklist Input: ti_am335x_tsc - warn about incorrect spelling Input: wacom - cleanup multitouch code when touch_max is 2
2 parents 7442cf9 + f62d14a commit b292d6b

File tree

8 files changed

+41
-27
lines changed

8 files changed

+41
-27
lines changed

Documentation/input/event-codes.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,19 @@ gestures can normally be extracted from it.
281281
If INPUT_PROP_SEMI_MT is not set, the device is assumed to be a true MT
282282
device.
283283

284+
INPUT_PROP_TOPBUTTONPAD:
285+
-----------------------
286+
Some laptops, most notably the Lenovo *40 series provide a trackstick
287+
device but do not have physical buttons associated with the trackstick
288+
device. Instead, the top area of the touchpad is marked to show
289+
visual/haptic areas for left, middle, right buttons intended to be used
290+
with the trackstick.
291+
292+
If INPUT_PROP_TOPBUTTONPAD is set, userspace should emulate buttons
293+
accordingly. This property does not affect kernel behavior.
294+
The kernel does not provide button emulation for such devices but treats
295+
them as any other INPUT_PROP_BUTTONPAD device.
296+
284297
Guidelines:
285298
==========
286299
The guidelines below ensure proper single-touch and multi-finger functionality.

drivers/input/input.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
257257
}
258258

259259
static int input_get_disposition(struct input_dev *dev,
260-
unsigned int type, unsigned int code, int value)
260+
unsigned int type, unsigned int code, int *pval)
261261
{
262262
int disposition = INPUT_IGNORE_EVENT;
263+
int value = *pval;
263264

264265
switch (type) {
265266

@@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
357358
break;
358359
}
359360

361+
*pval = value;
360362
return disposition;
361363
}
362364

@@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
365367
{
366368
int disposition;
367369

368-
disposition = input_get_disposition(dev, type, code, value);
370+
disposition = input_get_disposition(dev, type, code, &value);
369371

370372
if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
371373
dev->event(dev, type, code, value);

drivers/input/keyboard/st-keyscan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ static int keyscan_probe(struct platform_device *pdev)
215215
return 0;
216216
}
217217

218+
#ifdef CONFIG_PM_SLEEP
218219
static int keyscan_suspend(struct device *dev)
219220
{
220221
struct platform_device *pdev = to_platform_device(dev);
@@ -249,6 +250,7 @@ static int keyscan_resume(struct device *dev)
249250
mutex_unlock(&input->mutex);
250251
return retval;
251252
}
253+
#endif
252254

253255
static SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, keyscan_suspend, keyscan_resume);
254256

drivers/input/misc/sirfsoc-onkey.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static struct platform_driver sirfsoc_pwrc_driver = {
213213

214214
module_platform_driver(sirfsoc_pwrc_driver);
215215

216-
MODULE_LICENSE("GPLv2");
216+
MODULE_LICENSE("GPL v2");
217217
MODULE_AUTHOR("Binghua Duan <Binghua.Duan@csr.com>, Xianglong Du <Xianglong.Du@csr.com>");
218218
MODULE_DESCRIPTION("CSR Prima2 PWRC Driver");
219219
MODULE_ALIAS("platform:sirfsoc-pwrc");

drivers/input/mouse/synaptics.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
132132
1232, 5710, 1156, 4696
133133
},
134134
{
135-
(const char * const []){"LEN0034", "LEN0036", "LEN2004", NULL},
135+
(const char * const []){"LEN0034", "LEN0036", "LEN2002",
136+
"LEN2004", NULL},
136137
1024, 5112, 2024, 4832
137138
},
138139
{
@@ -168,7 +169,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
168169
"LEN0049",
169170
"LEN2000",
170171
"LEN2001", /* Edge E431 */
171-
"LEN2002",
172+
"LEN2002", /* Edge E531 */
172173
"LEN2003",
173174
"LEN2004", /* L440 */
174175
"LEN2005",

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
401401
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
402402
},
403403
},
404+
{
405+
/* Acer Aspire 5710 */
406+
.matches = {
407+
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
408+
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710"),
409+
},
410+
},
404411
{
405412
/* Gericom Bellagio */
406413
.matches = {

drivers/input/tablet/wacom_wac.c

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,9 +1217,9 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
12171217
* a=(pi*r^2)/C.
12181218
*/
12191219
int a = data[5];
1220-
int x_res = input_abs_get_res(input, ABS_X);
1221-
int y_res = input_abs_get_res(input, ABS_Y);
1222-
width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE);
1220+
int x_res = input_abs_get_res(input, ABS_MT_POSITION_X);
1221+
int y_res = input_abs_get_res(input, ABS_MT_POSITION_Y);
1222+
width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE);
12231223
height = width * y_res / x_res;
12241224
}
12251225

@@ -1587,7 +1587,7 @@ static void wacom_abs_set_axis(struct input_dev *input_dev,
15871587
input_abs_set_res(input_dev, ABS_X, features->x_resolution);
15881588
input_abs_set_res(input_dev, ABS_Y, features->y_resolution);
15891589
} else {
1590-
if (features->touch_max <= 2) {
1590+
if (features->touch_max == 1) {
15911591
input_set_abs_params(input_dev, ABS_X, 0,
15921592
features->x_max, features->x_fuzz, 0);
15931593
input_set_abs_params(input_dev, ABS_Y, 0,
@@ -1815,14 +1815,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
18151815
case MTTPC:
18161816
case MTTPC_B:
18171817
case TABLETPC2FG:
1818-
if (features->device_type == BTN_TOOL_FINGER) {
1819-
unsigned int flags = INPUT_MT_DIRECT;
1820-
1821-
if (wacom_wac->features.type == TABLETPC2FG)
1822-
flags = 0;
1823-
1824-
input_mt_init_slots(input_dev, features->touch_max, flags);
1825-
}
1818+
if (features->device_type == BTN_TOOL_FINGER && features->touch_max > 1)
1819+
input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_DIRECT);
18261820
/* fall through */
18271821

18281822
case TABLETPC:
@@ -1883,23 +1877,15 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
18831877
__set_bit(BTN_RIGHT, input_dev->keybit);
18841878

18851879
if (features->touch_max) {
1886-
/* touch interface */
1887-
unsigned int flags = INPUT_MT_POINTER;
1888-
1889-
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
18901880
if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
18911881
input_set_abs_params(input_dev,
18921882
ABS_MT_TOUCH_MAJOR,
18931883
0, features->x_max, 0, 0);
18941884
input_set_abs_params(input_dev,
18951885
ABS_MT_TOUCH_MINOR,
18961886
0, features->y_max, 0, 0);
1897-
} else {
1898-
__set_bit(BTN_TOOL_FINGER, input_dev->keybit);
1899-
__set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
1900-
flags = 0;
19011887
}
1902-
input_mt_init_slots(input_dev, features->touch_max, flags);
1888+
input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_POINTER);
19031889
} else {
19041890
/* buttons/keys only interface */
19051891
__clear_bit(ABS_X, input_dev->absbit);

drivers/input/touchscreen/ti_am335x_tsc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,12 @@ static int titsc_parse_dt(struct platform_device *pdev,
359359
*/
360360
err = of_property_read_u32(node, "ti,coordinate-readouts",
361361
&ts_dev->coordinate_readouts);
362-
if (err < 0)
362+
if (err < 0) {
363+
dev_warn(&pdev->dev, "please use 'ti,coordinate-readouts' instead\n");
363364
err = of_property_read_u32(node, "ti,coordiante-readouts",
364365
&ts_dev->coordinate_readouts);
366+
}
367+
365368
if (err < 0)
366369
return err;
367370

0 commit comments

Comments
 (0)