All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] tsc2007: Cancel work sync, increase polling frequency, make exit platform hw callback optional
@ 2009-07-09 16:53 ` Richard Röjfors
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Röjfors @ 2009-07-09 16:53 UTC (permalink / raw)
  To: linux-input
  Cc: Linux Kernel Mailing List, Andrew Morton, kwangwoo.lee,
	Thierry Reding, soni.trilok

In the remove function, ancel the work using the _sync version,
to make sure any running "work" is finished. Make the
exit_platform_hw callback optional since it's not needed on all
platforms.

When the screen is touched, the polling frequency is increased
to reduce the risk of missing taps.

Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
---
Index: linux-2.6.30/drivers/input/touchscreen/tsc2007.c
===================================================================
--- linux-2.6.30/drivers/input/touchscreen/tsc2007.c	(revision 945)
+++ linux-2.6.30/drivers/input/touchscreen/tsc2007.c	(revision 999)
@@ -27,7 +27,7 @@
  #include <linux/i2c.h>
  #include <linux/i2c/tsc2007.h>

-#define TS_POLL_PERIOD	msecs_to_jiffies(5) /* ms delay between samples */
+#define TS_POLL_PERIOD	msecs_to_jiffies(1) /* ms delay between samples */

  #define TSC2007_MEASURE_TEMP0		(0x0 << 4)
  #define TSC2007_MEASURE_AUX		(0x2 << 4)
@@ -332,11 +332,11 @@
  	struct tsc2007	*ts = i2c_get_clientdata(client);
  	struct tsc2007_platform_data *pdata;

-	/* cancel any work */
-	cancel_delayed_work(&ts->work);
+	cancel_delayed_work_sync(&ts->work);

  	pdata = client->dev.platform_data;
-	pdata->exit_platform_hw();
+	if (pdata->exit_platform_hw)
+		pdata->exit_platform_hw();

  	free_irq(ts->irq, ts);
  	input_unregister_device(ts->input);
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2009-07-09 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 16:53 [PATCH 1/1] tsc2007: Cancel work sync, increase polling frequency, make exit platform hw callback optional Richard Röjfors
2009-07-09 16:53 ` Richard Röjfors

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.