Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126853
b: refs/heads/master
c: 8bbf270
h: refs/heads/master
i:
  126851: d59f525
v: v3
  • Loading branch information
Paul Fox authored and Dmitry Torokhov committed Dec 20, 2008
1 parent ab963e7 commit ed77883
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6f66ddf7a8b34bb28e4d1c47531b61c671eac9b
refs/heads/master: 8bbf2703c4f676e6e5414672dd460f7d2f979ed5
32 changes: 28 additions & 4 deletions trunk/drivers/input/mouse/hgpk.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,30 @@ module_param(recalib_delta, int, 0644);
MODULE_PARM_DESC(recalib_delta,
"packets containing a delta this large will cause a recalibration.");

static int jumpy_delay = 1000;
module_param(jumpy_delay, int, 0644);
MODULE_PARM_DESC(jumpy_delay,
"delay (ms) before recal after jumpiness detected");

static int spew_delay = 1000;
module_param(spew_delay, int, 0644);
MODULE_PARM_DESC(spew_delay,
"delay (ms) before recal after packet spew detected");

static int recal_guard_time = 2000;
module_param(recal_guard_time, int, 0644);
MODULE_PARM_DESC(recal_guard_time,
"interval (ms) during which recal will be restarted if packet received");

static int post_interrupt_delay = 1000;
module_param(post_interrupt_delay, int, 0644);
MODULE_PARM_DESC(post_interrupt_delay,
"delay (ms) before recal after recal interrupt detected");

static int autorecal = 1;
module_param(autorecal, int, 0644);
MODULE_PARM_DESC(autorecal, "enable recalibration in the driver");

/*
* When the touchpad gets ultra-sensitive, one can keep their finger 1/2"
* above the pad and still have it send packets. This causes a jump cursor
Expand All @@ -66,7 +90,7 @@ static void hgpk_jumpy_hack(struct psmouse *psmouse, int x, int y)
/* My car gets forty rods to the hogshead and that's the
* way I likes it! */
psmouse_queue_work(psmouse, &priv->recalib_wq,
msecs_to_jiffies(1000));
msecs_to_jiffies(jumpy_delay));
}
}

Expand Down Expand Up @@ -103,7 +127,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse,
hgpk_dbg(psmouse, "packet spew detected (%d,%d)\n",
priv->x_tally, priv->y_tally);
psmouse_queue_work(psmouse, &priv->recalib_wq,
msecs_to_jiffies(1000));
msecs_to_jiffies(spew_delay));
}
/* reset every 100 packets */
priv->count = 0;
Expand Down Expand Up @@ -181,7 +205,7 @@ static psmouse_ret_t hgpk_process_byte(struct psmouse *psmouse)
"packet inside calibration window, "
"queueing another recalibration\n");
psmouse_queue_work(psmouse, &priv->recalib_wq,
msecs_to_jiffies(1000));
msecs_to_jiffies(post_interrupt_delay));
}
priv->recalib_window = 0;
}
Expand Down Expand Up @@ -231,7 +255,7 @@ static int hgpk_force_recalibrate(struct psmouse *psmouse)
* If someone's finger *was* on the touchpad, it's probably
* miscalibrated. So, we should schedule another recalibration
*/
priv->recalib_window = jiffies + msecs_to_jiffies(2000);
priv->recalib_window = jiffies + msecs_to_jiffies(recal_guard_time);

return 0;
}
Expand Down

0 comments on commit ed77883

Please sign in to comment.