From: "Richard Röjfors" <richard.rojfors.ext@mocean-labs.com>
To: linux-input@vger.kernel.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
kwangwoo.lee@gmail.com,
Thierry Reding <thierry.reding@avionic-design.de>,
soni.trilok@gmail.com
Subject: [PATCH 1/1] tsc2007: Cancel work sync, increase polling frequency, make exit platform hw callback optional
Date: Thu, 09 Jul 2009 18:53:07 +0200 [thread overview]
Message-ID: <4A562073.1080703@mocean-labs.com> (raw)
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);
reply other threads:[~2009-07-09 16:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A562073.1080703@mocean-labs.com \
--to=richard.rojfors.ext@mocean-labs.com \
--cc=akpm@linux-foundation.org \
--cc=kwangwoo.lee@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=soni.trilok@gmail.com \
--cc=thierry.reding@avionic-design.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox