>From 509bb071200cfe582199ba3ce2533e81949f42f0 Mon Sep 17 00:00:00 2001 From: Eric Miao <eric.miao@xxxxxxxxxxx> 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@xxxxxxxxxxx> Signed-off-by: Eric Miao <eric.miao@xxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html