From: Mike Rapoport <mike@compulab.co.il>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: dmitry.torokhov@gmail.com, LKML <linux-kernel@vger.kernel.org>,
linux-input <linux-input@vger.kernel.org>
Subject: Re: [PATCH RESEND] Input: wm97xx: add BTN_TOUCH event to wm97xx to use it with Android
Date: Tue, 03 Mar 2009 10:30:45 +0200 [thread overview]
Message-ID: <49ACEAB5.6040404@compulab.co.il> (raw)
In-Reply-To: <20090302162151.GA24717@rakim.wolfsonmicro.main>
Mark,
Mark Brown wrote:
> On Mon, Mar 02, 2009 at 06:16:55PM +0200, Mike Rapoport wrote:
>
>> Most touchscreen drivers already have BTN_TOUCH event generation:
>
> Hrm, I'd found some other hits but I could well have been working on a
> platform tree with additional drivers merged at the time.
>
>> If there no objection I can make a similar patch for mainstone-wm97xx.c and ucb1400_ts.c
>
> No problem for me. Please see the other two accelerated WM97xx drivers
> I posted today too.
The below patch adds BTN_TOUCH event reporting for two accelerated drivers
you've posted yesterday [1] and [2]. This patch is incremental vs. the first spin.
[1] http://lkml.org/lkml/2009/3/2/49
[2] http://lkml.org/lkml/2009/3/2/50
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
drivers/input/touchscreen/at32-wm97xx.c | 6 ++++++
drivers/input/touchscreen/zylonite-wm97xx.c | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/input/touchscreen/at32-wm97xx.c b/drivers/input/touchscreen/at32-wm97xx.c
index 96eeb2d..e34edcd 100644
--- a/drivers/input/touchscreen/at32-wm97xx.c
+++ b/drivers/input/touchscreen/at32-wm97xx.c
@@ -145,11 +145,15 @@ static irqreturn_t at32_wm97xx_channel_b_interrupt(int irq, void *dev_id)
input_report_abs(wm->input_dev, ABS_X, at32_wm97xx->x);
input_report_abs(wm->input_dev, ABS_Y, at32_wm97xx->y);
input_report_abs(wm->input_dev, ABS_PRESSURE, pen_down);
+ input_report_key(wm->input_dev, BTN_TOUCH,
+ (pen_down != 0));
input_sync(wm->input_dev);
} else if (pressure && source == WM97XX_ADCSEL_PRES) {
input_report_abs(wm->input_dev, ABS_X, at32_wm97xx->x);
input_report_abs(wm->input_dev, ABS_Y, at32_wm97xx->y);
input_report_abs(wm->input_dev, ABS_PRESSURE, value);
+ input_report_key(wm->input_dev, BTN_TOUCH,
+ (value != 0));
input_sync(wm->input_dev);
}
@@ -170,6 +174,7 @@ static void at32_wm97xx_pen_timer(unsigned long data)
+ msecs_to_jiffies(1));
} else {
input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
+ input_report_key(wm->input_dev, BTN_TOUCH, 0);
input_sync(wm->input_dev);
}
}
@@ -184,6 +189,7 @@ static void at32_wm97xx_acc_pen_up(struct wm97xx *wm)
+ msecs_to_jiffies(1));
} else {
input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
+ input_report_key(wm->input_dev, BTN_TOUCH, 0);
input_sync(wm->input_dev);
}
}
diff --git a/drivers/input/touchscreen/zylonite-wm97xx.c b/drivers/input/touchscreen/zylonite-wm97xx.c
index b016021..609c23c 100644
--- a/drivers/input/touchscreen/zylonite-wm97xx.c
+++ b/drivers/input/touchscreen/zylonite-wm97xx.c
@@ -130,6 +130,7 @@ static int wm97xx_acc_pen_down(struct wm97xx *wm)
input_report_abs(wm->input_dev, ABS_X, x & 0xfff);
input_report_abs(wm->input_dev, ABS_Y, y & 0xfff);
input_report_abs(wm->input_dev, ABS_PRESSURE, p & 0xfff);
+ input_report_key(wm->input_dev, BTN_TOUCH, (p != 0));
input_sync(wm->input_dev);
reads++;
} while (reads < cinfo[sp_idx].reads);
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2009-03-03 8:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 14:12 [PATCH RESEND] Input: wm97xx: add BTN_TOUCH event to wm97xx to use it with Android Mike Rapoport
2009-03-02 14:28 ` Mark Brown
2009-03-02 16:16 ` Mike Rapoport
2009-03-02 16:21 ` Mark Brown
2009-03-03 8:27 ` [PATCH] Input: add BTN_TOUCH event (Was: [PATCH RESEND] Input: wm97xx: add BTN_TOUCH event to wm97xx) Mike Rapoport
2009-03-03 8:30 ` Mike Rapoport [this message]
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=49ACEAB5.6040404@compulab.co.il \
--to=mike@compulab.co.il \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).