Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188242
b: refs/heads/master
c: 2886539
h: refs/heads/master
v: v3
  • Loading branch information
Rafi Rubin authored and Jiri Kosina committed Mar 10, 2010
1 parent 111fd51 commit 938341e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eff7f270e9a05688066f40589d7b44e1dcf335dc
refs/heads/master: 2886539d5e649c22a6d2107eb431d3bee81e0e6d
11 changes: 11 additions & 0 deletions trunk/drivers/hid/hid-ntrig.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
nd->reading_mt = 1;
nd->first_contact_confidence = 0;
break;
case HID_DG_TIPSWITCH:
/* Prevent emission of touch until validated */
return 1;
case HID_DG_CONFIDENCE:
nd->confidence = value;
break;
Expand Down Expand Up @@ -259,6 +262,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
BTN_TOOL_TRIPLETAP, 0);
input_report_key(input,
BTN_TOOL_QUADTAP, 0);
input_report_key(input, BTN_TOUCH, 0);
}
break;

Expand Down Expand Up @@ -308,13 +312,20 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)


list_for_each_entry(hidinput, &hdev->inputs, list) {
if (hidinput->report->maxfield < 1)
continue;

input = hidinput->input;
switch (hidinput->report->field[0]->application) {
case HID_DG_PEN:
input->name = "N-Trig Pen";
break;
case HID_DG_TOUCHSCREEN:
/* These keys are redundant for fingers, clear them
* to prevent incorrect identification */
__clear_bit(BTN_TOOL_PEN, input->keybit);
__clear_bit(BTN_TOOL_FINGER, input->keybit);
__clear_bit(BTN_0, input->keybit);
/*
* A little something special to enable
* two and three finger taps.
Expand Down

0 comments on commit 938341e

Please sign in to comment.