From patchwork Mon Nov 29 07:13:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 362972 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAT7F47O007187 for ; Mon, 29 Nov 2010 07:15:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755099Ab0K2HOU (ORCPT ); Mon, 29 Nov 2010 02:14:20 -0500 Received: from ch-smtp03.sth.basefarm.net ([80.76.149.214]:48356 "EHLO ch-smtp03.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755059Ab0K2HOI (ORCPT ); Mon, 29 Nov 2010 02:14:08 -0500 Received: from c83-248-196-64.bredband.comhem.se ([83.248.196.64]:39879 helo=polaris) by ch-smtp03.sth.basefarm.net with smtp (Exim 4.68) (envelope-from ) id 1PMxvp-000516-BC; Mon, 29 Nov 2010 08:13:52 +0100 Received: by polaris (sSMTP sendmail emulation); Mon, 29 Nov 2010 08:13:49 +0100 From: "Henrik Rydberg" To: Dmitry Torokhov Cc: Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Henrik Rydberg Subject: [PATCH 4/4] input: mt: Add pressure to pointer emulation code Date: Mon, 29 Nov 2010 08:13:22 +0100 Message-Id: <1291014802-17061-5-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1291014802-17061-1-git-send-email-rydberg@euromail.se> References: <1291014802-17061-1-git-send-email-rydberg@euromail.se> X-Originating-IP: 83.248.196.64 X-Scan-Result: No virus found in message 1PMxvp-000516-BC. X-Scan-Signature: ch-smtp03.sth.basefarm.net 1PMxvp-000516-BC e030f2438022fe8ce60ee6f37d9fc1eb Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Nov 2010 07:15:05 +0000 (UTC) diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 08aa682..49ccd15 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -97,7 +97,8 @@ EXPORT_SYMBOL(input_mt_report_slot_state); * input_mt_report_pointer_emulation() - common pointer emulation * @dev: input device with allocated MT slots * - * Performs legacy pointer emulation via BTN_TOUCH, ABS_X and ABS_Y. + * Performs legacy pointer emulation via BTN_TOUCH, ABS_X, ABS_Y and + * ABS_PRESSURE. */ void input_mt_report_pointer_emulation(struct input_dev *dev) { @@ -124,9 +125,13 @@ void input_mt_report_pointer_emulation(struct input_dev *dev) if (oldest) { int x = input_mt_get_value(oldest, ABS_MT_POSITION_X); int y = input_mt_get_value(oldest, ABS_MT_POSITION_Y); + int p = input_mt_get_value(oldest, ABS_MT_PRESSURE); input_event(dev, EV_ABS, ABS_X, x); input_event(dev, EV_ABS, ABS_Y, y); + input_event(dev, EV_ABS, ABS_PRESSURE, p); + } else { + input_event(dev, EV_ABS, ABS_PRESSURE, 0); } } EXPORT_SYMBOL(input_mt_report_pointer_emulation);