diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-08-22 14:13:33 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-08-31 11:12:42 +1000 |
commit | 0e2f1babc58cc2f38b8be77b63047df2f0d2b813 (patch) | |
tree | 357b8515e8193e2b612f3725d5a52aeda6fbf579 | |
parent | 06f8e02d004d7731c1071382b6e91004d84b6aef (diff) |
quirks: add a quirk to monitor MSC_TIMESTAMP for pointer jumps
Currently enabled on all Dell i2c touchpads, these seem to be the ones that
needed it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | quirks/50-system-dell.quirks | 6 | ||||
-rw-r--r-- | src/quirks.c | 8 | ||||
-rw-r--r-- | src/quirks.h | 1 | ||||
-rw-r--r-- | tools/shared.c | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/quirks/50-system-dell.quirks b/quirks/50-system-dell.quirks index 7e873edf..49ca15c7 100644 --- a/quirks/50-system-dell.quirks +++ b/quirks/50-system-dell.quirks @@ -5,6 +5,12 @@ MatchName=* Touchpad MatchDMIModalias=dmi:*svnDellInc.:* ModelTouchpadVisibleMarker=1 +[Dell i2c Touchpads] +MatchBus=i2c +MatchUdevType=touchpad +MatchDMIModalias=dmi:*svnDellInc.:* +AttrMscTimestamp=watch + [Dell Lattitude E6220 Touchpad] MatchName=*AlpsPS/2 ALPS GlidePoint MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6220:* diff --git a/src/quirks.c b/src/quirks.c index fc5300b2..df55fbdf 100644 --- a/src/quirks.c +++ b/src/quirks.c @@ -269,6 +269,7 @@ quirk_get_name(enum quirk q) case QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD: return "AttrThumbPressureThreshold"; case QUIRK_ATTR_USE_VELOCITY_AVERAGING: return "AttrUseVelocityAveraging"; case QUIRK_ATTR_THUMB_SIZE_THRESHOLD: return "AttrThumbSizeThreshold"; + case QUIRK_ATTR_MSC_TIMESTAMP: return "AttrMscTimestamp"; default: abort(); } @@ -744,6 +745,13 @@ parse_attr(struct quirks_context *ctx, p->type = PT_UINT; p->value.u = v; rc = true; + } else if (streq(key, quirk_get_name(QUIRK_ATTR_MSC_TIMESTAMP))) { + p->id = QUIRK_ATTR_MSC_TIMESTAMP; + if (!streq(value, "watch")) + goto out; + p->type = PT_STRING; + p->value.s = safe_strdup(value); + rc = true; } else { qlog_error(ctx, "Unknown key %s in %s\n", key, s->name); } diff --git a/src/quirks.h b/src/quirks.h index 51bdc40a..9fc15010 100644 --- a/src/quirks.h +++ b/src/quirks.h @@ -97,6 +97,7 @@ enum quirk { QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD, QUIRK_ATTR_USE_VELOCITY_AVERAGING, QUIRK_ATTR_THUMB_SIZE_THRESHOLD, + QUIRK_ATTR_MSC_TIMESTAMP, }; /** diff --git a/tools/shared.c b/tools/shared.c index c9ca9809..b103470b 100644 --- a/tools/shared.c +++ b/tools/shared.c @@ -641,6 +641,7 @@ tools_list_device_quirks(struct quirks_context *ctx, QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD, QUIRK_ATTR_USE_VELOCITY_AVERAGING, QUIRK_ATTR_THUMB_SIZE_THRESHOLD, + QUIRK_ATTR_MSC_TIMESTAMP, }; enum quirk *q; @@ -716,6 +717,7 @@ tools_list_device_quirks(struct quirks_context *ctx, case QUIRK_ATTR_LID_SWITCH_RELIABILITY: case QUIRK_ATTR_KEYBOARD_INTEGRATION: case QUIRK_ATTR_TPKBCOMBO_LAYOUT: + case QUIRK_ATTR_MSC_TIMESTAMP: quirks_get_string(quirks, *q, &s); snprintf(buf, sizeof(buf), "%s=%s", name, s); callback(userdata, buf); |