Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282294
b: refs/heads/master
c: 2261bb9
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Nov 23, 2011
1 parent 74b5441 commit 0b56490
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eec29e3dab483a5d9a742a6fa68db1ec1f0f7504
refs/heads/master: 2261bb9ff0dc38e1d5f35af08f75ec3b37ba6335
17 changes: 7 additions & 10 deletions trunk/drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ MODULE_LICENSE("GPL");
#define MT_QUIRK_ALWAYS_VALID (1 << 4)
#define MT_QUIRK_VALID_IS_INRANGE (1 << 5)
#define MT_QUIRK_VALID_IS_CONFIDENCE (1 << 6)
#define MT_QUIRK_EGALAX_XYZ_FIXUP (1 << 7)
#define MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE (1 << 8)

struct mt_slot {
Expand Down Expand Up @@ -171,8 +170,7 @@ struct mt_class mt_classes[] = {
.maxcontacts = 10 },
{ .name = MT_CLS_EGALAX,
.quirks = MT_QUIRK_SLOT_IS_CONTACTID |
MT_QUIRK_VALID_IS_INRANGE |
MT_QUIRK_EGALAX_XYZ_FIXUP,
MT_QUIRK_VALID_IS_INRANGE,
.maxcontacts = 2,
.sn_move = 4096,
.sn_pressure = 32,
Expand Down Expand Up @@ -253,7 +251,6 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
{
struct mt_device *td = hid_get_drvdata(hdev);
struct mt_class *cls = &td->mtclass;
__s32 quirks = cls->quirks;

/* Only map fields from TouchScreen or TouchPad collections.
* We need to ignore fields that belong to other collections
Expand All @@ -265,13 +262,17 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
else
return 0;

/* eGalax devices provide a Digitizer.Stylus input which overrides
* the correct Digitizers.Finger X/Y ranges.
* Let's just ignore this input. */
if (field->physical == HID_DG_STYLUS)
return -1;

switch (usage->hid & HID_USAGE_PAGE) {

case HID_UP_GENDESK:
switch (usage->hid) {
case HID_GD_X:
if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
field->logical_maximum = 32760;
hid_map_usage(hi, usage, bit, max,
EV_ABS, ABS_MT_POSITION_X);
set_abs(hi->input, ABS_MT_POSITION_X, field,
Expand All @@ -284,8 +285,6 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
}
return 1;
case HID_GD_Y:
if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
field->logical_maximum = 32760;
hid_map_usage(hi, usage, bit, max,
EV_ABS, ABS_MT_POSITION_Y);
set_abs(hi->input, ABS_MT_POSITION_Y, field,
Expand Down Expand Up @@ -353,8 +352,6 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
}
return 1;
case HID_DG_TIPPRESSURE:
if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP)
field->logical_minimum = 0;
hid_map_usage(hi, usage, bit, max,
EV_ABS, ABS_MT_PRESSURE);
set_abs(hi->input, ABS_MT_PRESSURE, field,
Expand Down

0 comments on commit 0b56490

Please sign in to comment.