From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jiri Slaby <jirislaby@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Mike Rapoport <mike@compulab.co.il>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/5] Input: wm97xx: add BTN_TOUCH event to wm97xx to use it with Android
Date: Tue, 3 Mar 2009 18:24:40 +0000 [thread overview]
Message-ID: <1236104684-30214-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20090303182402.GA29542@rakim.wolfsonmicro.main>
From: Mike Rapoport <mike@compulab.co.il>
Please CC me, I'm not subscribed to linux-input
Android expects BTN_TOUCH events when pen state changes. Add BTN_TOUCH
event reporting to allow use of wm97xx touchscreen controller wiht
Android devices.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/touchscreen/wm97xx-core.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index d15aa11..4551f88 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -409,6 +409,7 @@ static int wm97xx_read_samples(struct wm97xx *wm)
wm->pen_is_down = 0;
dev_dbg(wm->dev, "pen up\n");
input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
+ input_report_key(wm->input_dev, BTN_TOUCH, 0);
input_sync(wm->input_dev);
} else if (!(rc & RC_AGAIN)) {
/* We need high frequency updates only while
@@ -433,6 +434,7 @@ static int wm97xx_read_samples(struct wm97xx *wm)
input_report_abs(wm->input_dev, ABS_X, data.x & 0xfff);
input_report_abs(wm->input_dev, ABS_Y, data.y & 0xfff);
input_report_abs(wm->input_dev, ABS_PRESSURE, data.p & 0xfff);
+ input_report_key(wm->input_dev, BTN_TOUCH, 1);
input_sync(wm->input_dev);
wm->pen_is_down = 1;
wm->ts_reader_interval = wm->ts_reader_min_interval;
@@ -629,9 +631,11 @@ static int wm97xx_probe(struct device *dev)
wm->input_dev->open = wm97xx_ts_input_open;
wm->input_dev->close = wm97xx_ts_input_close;
set_bit(EV_ABS, wm->input_dev->evbit);
+ set_bit(EV_KEY, wm->input_dev->evbit);
set_bit(ABS_X, wm->input_dev->absbit);
set_bit(ABS_Y, wm->input_dev->absbit);
set_bit(ABS_PRESSURE, wm->input_dev->absbit);
+ set_bit(BTN_TOUCH, wm->input_dev->keybit);
input_set_abs_params(wm->input_dev, ABS_X, abs_x[0], abs_x[1],
abs_x[2], 0);
input_set_abs_params(wm->input_dev, ABS_Y, abs_y[0], abs_y[1],
--
1.6.1.3
next prev parent reply other threads:[~2009-03-03 18:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 18:24 [PATCH 0/5] WM97xx updates Mark Brown
2009-03-03 18:24 ` Mark Brown [this message]
2009-03-03 18:24 ` [PATCH 2/5] Input: add BTN_TOUCH event Mark Brown
2009-03-03 18:24 ` [PATCH 3/5] Input: Use disable_irq_nosync() for Mainstone Mark Brown
2009-03-03 18:24 ` [PATCH 4/5] Input: Accelerated touchscreen support for Marvell Zylonite Mark Brown
2009-03-03 18:24 ` [PATCH 5/5] Input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors Mark Brown
2009-03-03 20:29 ` Jiri Slaby
2009-03-04 9:15 ` [PATCH 0/5] WM97xx updates Dmitry Torokhov
2009-03-04 9:26 ` Hans-Christian Egtvedt
[not found] ` <20090304105358.GA32107@rakim.wolfsonmicro.main>
2009-03-04 11:29 ` Hans-Christian Egtvedt
2009-03-04 14:32 ` Mark Brown
2009-03-09 15:48 ` Hans-Christian Egtvedt
2009-03-09 15:57 ` Jiri Slaby
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=1236104684-30214-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jirislaby@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike@compulab.co.il \
/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;
as well as URLs for NNTP newsgroup(s).