linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Add module parameters to control OLPC touchpad delays
@ 2008-12-16 19:35 Deepak Saxena
  2008-12-16 19:40 ` Andres Salomon
  0 siblings, 1 reply; 4+ messages in thread
From: Deepak Saxena @ 2008-12-16 19:35 UTC (permalink / raw)
  To: dmitry.torokhov, linux-input; +Cc: pgf, Andres Salomon

The HPGK touchpad that is found on the XO driver has
historically exhibitted eratic behaviour in various
environments (very dry, very humid, etc) that can be
worked around via some delays. This patch turns those
delays into module parameters to make testing simpler.

Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
---
 drivers/input/mouse/hgpk.c |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index 88f04bf..39cce65 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -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
@@ -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));
 	}
 }
 
@@ -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;
@@ -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;
 	}
@@ -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;
 }
-- 
 Deepak Saxena - Kernel Developer, One Laptop Per Child
   _____   __o                                   (o>
------    -\<,  Give One Laptop, Get One Laptop  //\
 ----- ( )/ ( )  http://www.amazon.com/xo        V_/_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Add module parameters to control OLPC touchpad delays
  2008-12-16 19:35 [PATCH 1/2] Add module parameters to control OLPC touchpad delays Deepak Saxena
@ 2008-12-16 19:40 ` Andres Salomon
  2008-12-16 19:44   ` Deepak Saxena
  0 siblings, 1 reply; 4+ messages in thread
From: Andres Salomon @ 2008-12-16 19:40 UTC (permalink / raw)
  To: dsaxena; +Cc: dmitry.torokhov, linux-input, pgf

Acked-By: Andres Salomon <dilinger@debian.org>

Is this from Paul or you?



On Tue, 16 Dec 2008 11:35:00 -0800
Deepak Saxena <dsaxena@laptop.org> wrote:

> The HPGK touchpad that is found on the XO driver has
> historically exhibitted eratic behaviour in various
> environments (very dry, very humid, etc) that can be
> worked around via some delays. This patch turns those
> delays into module parameters to make testing simpler.
> 
> Signed-off-by: Paul Fox <pgf@laptop.org>
> Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
> ---
>  drivers/input/mouse/hgpk.c |   32 ++++++++++++++++++++++++++++----
>  1 files changed, 28 insertions(+), 4 deletions(-)
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Add module parameters to control OLPC touchpad delays
  2008-12-16 19:40 ` Andres Salomon
@ 2008-12-16 19:44   ` Deepak Saxena
  0 siblings, 0 replies; 4+ messages in thread
From: Deepak Saxena @ 2008-12-16 19:44 UTC (permalink / raw)
  To: Andres Salomon; +Cc: dsaxena, dmitry.torokhov, linux-input, pgf

On Dec 16 2008, at 14:40, Andres Salomon was caught saying:
> Acked-By: Andres Salomon <dilinger@debian.org>
> 
> Is this from Paul or you?

>From Paul, minor changes on my end to make them work on 2.6.latest. 

~Deepak

-- 
 Deepak Saxena - Kernel Developer, One Laptop Per Child
   _____   __o                                   (o>
------    -\<,  Give One Laptop, Get One Laptop  //\
 ----- ( )/ ( )  http://www.amazon.com/xo        V_/_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Add module parameters to control OLPC touchpad delays
@ 2008-12-20 10:49 Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2008-12-20 10:49 UTC (permalink / raw)
  To: dsaxena; +Cc: Andres Salomon, linux-input, pgf

On Tuesday 16 December 2008 11:44:24 Deepak Saxena wrote:
> On Dec 16 2008, at 14:40, Andres Salomon was caught saying:
> > Acked-By: Andres Salomon <dilinger@debian.org>
> >
> > Is this from Paul or you?
>
> From Paul, minor changes on my end to make them work on 2.6.latest.
>

Please try to indicate attribution by including From: line in patches, I fixed 
it up on my side for this one.

Thanks.

-- 
Dmitry


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-20 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 19:35 [PATCH 1/2] Add module parameters to control OLPC touchpad delays Deepak Saxena
2008-12-16 19:40 ` Andres Salomon
2008-12-16 19:44   ` Deepak Saxena
  -- strict thread matches above, loose matches on Subject: below --
2008-12-20 10:49 Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).