linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Miao <eric.y.miao@gmail.com>
To: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Cc: Bin Yang <bin.yang@marvell.com>
Subject: [PATCH 1/3] input: add ABS_PRESSURE to da9034 touchscreen
Date: Mon, 13 Apr 2009 12:08:33 +0800	[thread overview]
Message-ID: <f17812d70904122108r7b951b95o45ad9735722d8e7b@mail.gmail.com> (raw)

>From 509bb071200cfe582199ba3ce2533e81949f42f0 Mon Sep 17 00:00:00 2001
From: Eric Miao <eric.miao@marvell.com>
Date: Mon, 13 Apr 2009 10:52:59 +0800
Subject: [PATCH 1/3] input: add ABS_PRESSURE to da9034 touchscreen

Signed-off-by: Bin Yang <bin.yang@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
---
 drivers/input/touchscreen/da9034-ts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/input/touchscreen/da9034-ts.c
b/drivers/input/touchscreen/da9034-ts.c
index fa67d78..eac2905 100644
--- a/drivers/input/touchscreen/da9034-ts.c
+++ b/drivers/input/touchscreen/da9034-ts.c
@@ -127,9 +127,10 @@ static inline void report_pen_down(struct
da9034_touch *touch)
 	if (touch->y_inverted)
 		y = 1024 - y;

+	input_report_key(touch->input_dev, BTN_TOUCH, 1);
 	input_report_abs(touch->input_dev, ABS_X, x);
 	input_report_abs(touch->input_dev, ABS_Y, y);
-	input_report_key(touch->input_dev, BTN_TOUCH, 1);
+	input_report_abs(touch->input_dev, ABS_PRESSURE, 255);

 	input_sync(touch->input_dev);
 }
@@ -137,6 +138,7 @@ static inline void report_pen_down(struct
da9034_touch *touch)
 static inline void report_pen_up(struct da9034_touch *touch)
 {
 	input_report_key(touch->input_dev, BTN_TOUCH, 0);
+	input_report_abs(touch->input_dev, ABS_PRESSURE, 0);
 	input_sync(touch->input_dev);
 }

@@ -332,6 +334,7 @@ static int __devinit da9034_touch_probe(struct
platform_device *pdev)
 	__set_bit(ABS_Y, input_dev->absbit);
 	input_set_abs_params(input_dev, ABS_X, 0, 1023, 0, 0);
 	input_set_abs_params(input_dev, ABS_Y, 0, 1023, 0, 0);
+	input_set_abs_params(input_dev, ABS_PRESSURE, 0, 255, 0, 0);

 	__set_bit(EV_KEY, input_dev->evbit);
 	__set_bit(BTN_TOUCH, input_dev->keybit);
-- 
1.6.0.4

             reply	other threads:[~2009-04-13  4:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13  4:08 Eric Miao [this message]
2009-04-13  5:13 ` [PATCH 1/3] input: add ABS_PRESSURE to da9034 touchscreen Dmitry Torokhov
2009-04-13  5:31   ` Eric Miao

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=f17812d70904122108r7b951b95o45ad9735722d8e7b@mail.gmail.com \
    --to=eric.y.miao@gmail.com \
    --cc=bin.yang@marvell.com \
    --cc=linux-input@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).