aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorStephane Chatty <chatty@lii-enac.fr>2010-02-06 09:20:03 -0500
committerJiri Kosina <jkosina@suse.cz>2010-02-10 06:12:43 -0500
commit580363db92572cccbe6226bf83321e50a9ea50ea (patch)
treee3057530e4b8693a974282eb016c372db9ae19c1 /drivers/hid
parentb32758c7216f337044ceb6dcaa754b8eda95a59f (diff)
HID: add pressure support for the Stantum multitouch panel
Added pressure handling for Stantum multitouch panels Signed-off-by: Stephane Chatty <chatty@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-stantum.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/hid/hid-stantum.c b/drivers/hid/hid-stantum.c
index 1b7b1659e7bb..04b0b986f5f4 100644
--- a/drivers/hid/hid-stantum.c
+++ b/drivers/hid/hid-stantum.c
@@ -66,7 +66,6 @@ static int stantum_input_mapping(struct hid_device *hdev, struct hid_input *hi,
66 case HID_DG_DEVICEINDEX: 66 case HID_DG_DEVICEINDEX:
67 case HID_DG_CONTACTCOUNT: 67 case HID_DG_CONTACTCOUNT:
68 case HID_DG_CONTACTMAX: 68 case HID_DG_CONTACTMAX:
69 case HID_DG_TIPPRESSURE:
70 return -1; 69 return -1;
71 70
72 case HID_DG_TIPSWITCH: 71 case HID_DG_TIPSWITCH:
@@ -84,6 +83,11 @@ static int stantum_input_mapping(struct hid_device *hdev, struct hid_input *hi,
84 input_set_abs_params(hi->input, ABS_MT_ORIENTATION, 83 input_set_abs_params(hi->input, ABS_MT_ORIENTATION,
85 1, 1, 0, 0); 84 1, 1, 0, 0);
86 return 1; 85 return 1;
86 case HID_DG_TIPPRESSURE:
87 hid_map_usage(hi, usage, bit, max,
88 EV_ABS, ABS_MT_PRESSURE);
89 return 1;
90
87 case HID_DG_CONTACTID: 91 case HID_DG_CONTACTID:
88 hid_map_usage(hi, usage, bit, max, 92 hid_map_usage(hi, usage, bit, max,
89 EV_ABS, ABS_MT_TRACKING_ID); 93 EV_ABS, ABS_MT_TRACKING_ID);
@@ -140,10 +144,7 @@ static void stantum_filter_event(struct stantum_data *sd,
140 input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, wide ? sd->w : sd->h); 144 input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, wide ? sd->w : sd->h);
141 input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, wide ? sd->h : sd->w); 145 input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, wide ? sd->h : sd->w);
142 146
143#if 0
144 /* MT_PRESSURE does not exist yet */
145 input_event(input, EV_ABS, ABS_MT_PRESSURE, sd->z); 147 input_event(input, EV_ABS, ABS_MT_PRESSURE, sd->z);
146#endif
147 148
148 input_mt_sync(input); 149 input_mt_sync(input);
149 sd->valid = false; 150 sd->valid = false;