aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/hgpk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:14:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:14:01 -0500
commitdb30c70575822cc84d87b5613c19cac24734b99f (patch)
tree82945ad5813bfe6633698233981d270b5f0a310b /drivers/input/mouse/hgpk.c
parentc861ea2cb2c25c1698734d9b0540a09e253690a1 (diff)
parent9334e90d5ac5ee1fa6d8b75acb7c64a8907787d1 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits) Input: i8042 - add Dell Vostro 1510 to nomux list Input: gtco - use USB endpoint API Input: add support for Maple controller as a joystick Input: atkbd - broaden the Dell DMI signatures Input: HIL drivers - add MODULE_ALIAS() Input: map_to_7segment.h - convert to __inline__ for userspace Input: add support for enhanced rotary controller on pxa930 and pxa935 Input: add support for trackball on pxa930 and pxa935 Input: add da9034 touchscreen support Input: ads7846 - strict_strtoul takes unsigned long Input: make some variables and functions static Input: add tsc2007 based touchscreen driver Input: psmouse - add module parameters to control OLPC touchpad delays Input: i8042 - add Gigabyte M912 netbook to noloop exception table Input: atkbd - Samsung NC10 key repeat fix Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptop Input: libps2 - handle 0xfc responses from devices Input: add support for Wacom W8001 penabled serial touchscreen Input: synaptics - report multi-taps only if supported by the device Input: add joystick driver for Walkera WK-0701 RC transmitter ...
Diffstat (limited to 'drivers/input/mouse/hgpk.c')
-rw-r--r--drivers/input/mouse/hgpk.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index 88f04bf2ad6c..81e6ebf323e9 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -48,6 +48,30 @@ module_param(recalib_delta, int, 0644);
48MODULE_PARM_DESC(recalib_delta, 48MODULE_PARM_DESC(recalib_delta,
49 "packets containing a delta this large will cause a recalibration."); 49 "packets containing a delta this large will cause a recalibration.");
50 50
51static int jumpy_delay = 1000;
52module_param(jumpy_delay, int, 0644);
53MODULE_PARM_DESC(jumpy_delay,
54 "delay (ms) before recal after jumpiness detected");
55
56static int spew_delay = 1000;
57module_param(spew_delay, int, 0644);
58MODULE_PARM_DESC(spew_delay,
59 "delay (ms) before recal after packet spew detected");
60
61static int recal_guard_time = 2000;
62module_param(recal_guard_time, int, 0644);
63MODULE_PARM_DESC(recal_guard_time,
64 "interval (ms) during which recal will be restarted if packet received");
65
66static int post_interrupt_delay = 1000;
67module_param(post_interrupt_delay, int, 0644);
68MODULE_PARM_DESC(post_interrupt_delay,
69 "delay (ms) before recal after recal interrupt detected");
70
71static int autorecal = 1;
72module_param(autorecal, int, 0644);
73MODULE_PARM_DESC(autorecal, "enable recalibration in the driver");
74
51/* 75/*
52 * When the touchpad gets ultra-sensitive, one can keep their finger 1/2" 76 * When the touchpad gets ultra-sensitive, one can keep their finger 1/2"
53 * above the pad and still have it send packets. This causes a jump cursor 77 * above the pad and still have it send packets. This causes a jump cursor
@@ -66,7 +90,7 @@ static void hgpk_jumpy_hack(struct psmouse *psmouse, int x, int y)
66 /* My car gets forty rods to the hogshead and that's the 90 /* My car gets forty rods to the hogshead and that's the
67 * way I likes it! */ 91 * way I likes it! */
68 psmouse_queue_work(psmouse, &priv->recalib_wq, 92 psmouse_queue_work(psmouse, &priv->recalib_wq,
69 msecs_to_jiffies(1000)); 93 msecs_to_jiffies(jumpy_delay));
70 } 94 }
71} 95}
72 96
@@ -103,7 +127,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse,
103 hgpk_dbg(psmouse, "packet spew detected (%d,%d)\n", 127 hgpk_dbg(psmouse, "packet spew detected (%d,%d)\n",
104 priv->x_tally, priv->y_tally); 128 priv->x_tally, priv->y_tally);
105 psmouse_queue_work(psmouse, &priv->recalib_wq, 129 psmouse_queue_work(psmouse, &priv->recalib_wq,
106 msecs_to_jiffies(1000)); 130 msecs_to_jiffies(spew_delay));
107 } 131 }
108 /* reset every 100 packets */ 132 /* reset every 100 packets */
109 priv->count = 0; 133 priv->count = 0;
@@ -181,7 +205,7 @@ static psmouse_ret_t hgpk_process_byte(struct psmouse *psmouse)
181 "packet inside calibration window, " 205 "packet inside calibration window, "
182 "queueing another recalibration\n"); 206 "queueing another recalibration\n");
183 psmouse_queue_work(psmouse, &priv->recalib_wq, 207 psmouse_queue_work(psmouse, &priv->recalib_wq,
184 msecs_to_jiffies(1000)); 208 msecs_to_jiffies(post_interrupt_delay));
185 } 209 }
186 priv->recalib_window = 0; 210 priv->recalib_window = 0;
187 } 211 }
@@ -231,7 +255,7 @@ static int hgpk_force_recalibrate(struct psmouse *psmouse)
231 * If someone's finger *was* on the touchpad, it's probably 255 * If someone's finger *was* on the touchpad, it's probably
232 * miscalibrated. So, we should schedule another recalibration 256 * miscalibrated. So, we should schedule another recalibration
233 */ 257 */
234 priv->recalib_window = jiffies + msecs_to_jiffies(2000); 258 priv->recalib_window = jiffies + msecs_to_jiffies(recal_guard_time);
235 259
236 return 0; 260 return 0;
237} 261}