aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorClinton Sprain <clintonsprain@gmail.com>2014-03-26 17:10:43 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-03-28 04:14:00 -0400
commit703e148875c838c430312da592d7ab3681ab5c81 (patch)
tree5b58806125b0825ee8c93a31bca0d3847b4e6480 /drivers/input/mouse
parente545ef39e06e7b1df2ef9ddbbf665b74c4e1878a (diff)
Input: appletouch - dial back fuzz setting
Let's dial back the default fuzz setting for most devices using this driver, based on values from user feedback from forums and bug reports. Signed-off-by: Clinton Sprain <clintonsprain@gmail.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/appletouch.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 800ca7dfafc2..2745832f74b6 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -48,6 +48,7 @@ struct atp_info {
48 int yfact; /* Y multiplication factor */ 48 int yfact; /* Y multiplication factor */
49 int datalen; /* size of USB transfers */ 49 int datalen; /* size of USB transfers */
50 void (*callback)(struct urb *); /* callback function */ 50 void (*callback)(struct urb *); /* callback function */
51 int fuzz; /* fuzz touchpad generates */
51}; 52};
52 53
53static void atp_complete_geyser_1_2(struct urb *urb); 54static void atp_complete_geyser_1_2(struct urb *urb);
@@ -61,6 +62,7 @@ static const struct atp_info fountain_info = {
61 .yfact = 43, 62 .yfact = 43,
62 .datalen = 81, 63 .datalen = 81,
63 .callback = atp_complete_geyser_1_2, 64 .callback = atp_complete_geyser_1_2,
65 .fuzz = 16,
64}; 66};
65 67
66static const struct atp_info geyser1_info = { 68static const struct atp_info geyser1_info = {
@@ -71,6 +73,7 @@ static const struct atp_info geyser1_info = {
71 .yfact = 43, 73 .yfact = 43,
72 .datalen = 81, 74 .datalen = 81,
73 .callback = atp_complete_geyser_1_2, 75 .callback = atp_complete_geyser_1_2,
76 .fuzz = 16,
74}; 77};
75 78
76static const struct atp_info geyser2_info = { 79static const struct atp_info geyser2_info = {
@@ -81,6 +84,7 @@ static const struct atp_info geyser2_info = {
81 .yfact = 43, 84 .yfact = 43,
82 .datalen = 64, 85 .datalen = 64,
83 .callback = atp_complete_geyser_1_2, 86 .callback = atp_complete_geyser_1_2,
87 .fuzz = 0,
84}; 88};
85 89
86static const struct atp_info geyser3_info = { 90static const struct atp_info geyser3_info = {
@@ -90,6 +94,7 @@ static const struct atp_info geyser3_info = {
90 .yfact = 64, 94 .yfact = 64,
91 .datalen = 64, 95 .datalen = 64,
92 .callback = atp_complete_geyser_3_4, 96 .callback = atp_complete_geyser_3_4,
97 .fuzz = 0,
93}; 98};
94 99
95static const struct atp_info geyser4_info = { 100static const struct atp_info geyser4_info = {
@@ -99,6 +104,7 @@ static const struct atp_info geyser4_info = {
99 .yfact = 64, 104 .yfact = 64,
100 .datalen = 64, 105 .datalen = 64,
101 .callback = atp_complete_geyser_3_4, 106 .callback = atp_complete_geyser_3_4,
107 .fuzz = 0,
102}; 108};
103 109
104#define ATP_DEVICE(prod, info) \ 110#define ATP_DEVICE(prod, info) \
@@ -155,9 +161,6 @@ MODULE_DEVICE_TABLE(usb, atp_table);
155#define ATP_XSENSORS 26 161#define ATP_XSENSORS 26
156#define ATP_YSENSORS 16 162#define ATP_YSENSORS 16
157 163
158/* amount of fuzz this touchpad generates */
159#define ATP_FUZZ 16
160
161/* maximum pressure this driver will report */ 164/* maximum pressure this driver will report */
162#define ATP_PRESSURE 300 165#define ATP_PRESSURE 300
163 166
@@ -455,7 +458,7 @@ static void atp_detect_size(struct atp *dev)
455 input_set_abs_params(dev->input, ABS_X, 0, 458 input_set_abs_params(dev->input, ABS_X, 0,
456 (dev->info->xsensors_17 - 1) * 459 (dev->info->xsensors_17 - 1) *
457 dev->info->xfact - 1, 460 dev->info->xfact - 1,
458 ATP_FUZZ, 0); 461 dev->info->fuzz, 0);
459 break; 462 break;
460 } 463 }
461 } 464 }
@@ -843,10 +846,10 @@ static int atp_probe(struct usb_interface *iface,
843 846
844 input_set_abs_params(input_dev, ABS_X, 0, 847 input_set_abs_params(input_dev, ABS_X, 0,
845 (dev->info->xsensors - 1) * dev->info->xfact - 1, 848 (dev->info->xsensors - 1) * dev->info->xfact - 1,
846 ATP_FUZZ, 0); 849 dev->info->fuzz, 0);
847 input_set_abs_params(input_dev, ABS_Y, 0, 850 input_set_abs_params(input_dev, ABS_Y, 0,
848 (dev->info->ysensors - 1) * dev->info->yfact - 1, 851 (dev->info->ysensors - 1) * dev->info->yfact - 1,
849 ATP_FUZZ, 0); 852 dev->info->fuzz, 0);
850 input_set_abs_params(input_dev, ABS_PRESSURE, 0, ATP_PRESSURE, 0, 0); 853 input_set_abs_params(input_dev, ABS_PRESSURE, 0, ATP_PRESSURE, 0, 0);
851 854
852 set_bit(EV_KEY, input_dev->evbit); 855 set_bit(EV_KEY, input_dev->evbit);