From patchwork Sat Feb 6 14:20:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephane Chatty X-Patchwork-Id: 77518 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o16EJFOJ004175 for ; Sat, 6 Feb 2010 14:20:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752665Ab0BFOUF (ORCPT ); Sat, 6 Feb 2010 09:20:05 -0500 Received: from 89-230.252-81.static-ip.oleane.fr ([81.252.230.89]:33283 "EHLO smtp.lii-enac.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699Ab0BFOUE (ORCPT ); Sat, 6 Feb 2010 09:20:04 -0500 Received: by smtp.lii-enac.fr (DoorWays, from userid 2000) id 9B86A9520A; Sat, 6 Feb 2010 15:20:03 +0100 (CET) Date: Sat, 06 Feb 2010 15:20:03 +0100 To: dmitry.torokhov@gmail.com, jkosina@suse.cz, linux-input@vger.kernel.org Cc: chatty@enac.fr Subject: [PATCH] Added support for pressure on the Stantum multitouch panel User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Message-Id: <20100206142003.9B86A9520A@smtp.lii-enac.fr> From: chatty@lii-enac.fr (Stephane Chatty) 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 (demeter.kernel.org [140.211.167.41]); Sat, 06 Feb 2010 14:20:06 +0000 (UTC) diff -rupN a/drivers/hid/hid-stantum.c b/drivers/hid/hid-stantum.c --- a/drivers/hid/hid-stantum.c 2010-02-06 15:01:17.000000000 +0100 +++ b/drivers/hid/hid-stantum.c 2010-02-06 15:03:45.000000000 +0100 @@ -16,7 +16,7 @@ #include #include -MODULE_VERSION("1.01"); +MODULE_VERSION("1.02"); MODULE_AUTHOR("Stephane Chatty "); MODULE_DESCRIPTION("Stantum HID multitouch panels"); MODULE_LICENSE("GPL"); @@ -66,7 +66,6 @@ static int stantum_input_mapping(struct case HID_DG_DEVICEINDEX: case HID_DG_CONTACTCOUNT: case HID_DG_CONTACTMAX: - case HID_DG_TIPPRESSURE: return -1; case HID_DG_TIPSWITCH: @@ -84,6 +83,11 @@ static int stantum_input_mapping(struct input_set_abs_params(hi->input, ABS_MT_ORIENTATION, 1, 1, 0, 0); return 1; + case HID_DG_TIPPRESSURE: + hid_map_usage(hi, usage, bit, max, + EV_ABS, ABS_MT_PRESSURE); + return 1; + case HID_DG_CONTACTID: hid_map_usage(hi, usage, bit, max, EV_ABS, ABS_MT_TRACKING_ID); @@ -140,10 +144,7 @@ static void stantum_filter_event(struct input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, wide ? sd->w : sd->h); input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, wide ? sd->h : sd->w); -#if 0 - /* MT_PRESSURE does not exist yet */ input_event(input, EV_ABS, ABS_MT_PRESSURE, sd->z); -#endif input_mt_sync(input); sd->valid = false;