linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] input: add ABS_PRESSURE to da9034 touchscreen
@ 2009-04-13  4:08 Eric Miao
  2009-04-13  5:13 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Miao @ 2009-04-13  4:08 UTC (permalink / raw)
  To: linux-input@vger.kernel.org; +Cc: Bin Yang

>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

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

end of thread, other threads:[~2009-04-13  5:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-13  4:08 [PATCH 1/3] input: add ABS_PRESSURE to da9034 touchscreen Eric Miao
2009-04-13  5:13 ` Dmitry Torokhov
2009-04-13  5:31   ` Eric Miao

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).