Commit 0e2f1bab authored by Peter Hutterer's avatar Peter Hutterer

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's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 06f8e02d
......@@ -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:*
......
......@@ -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);
}
......
......@@ -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,
};
/**
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment