Hid Compliant Touchpad | Driver
static int tp_probe(struct hid_device *hdev, const struct hid_device_id *id)
For low-level drivers, gestures can be delegated to userspace (e.g., libinput). Touchpad drivers must support suspend/resume and idle power reduction. hid compliant touchpad driver
if (count == 2) int dx = touches[1].x - touches[0].x; int dy = touches[1].y - touches[0].y; static int old_dist = 0; int new_dist = abs(dx) + abs(dy); if (old_dist && abs(new_dist - old_dist) > THRESHOLD) report_pinch(new_dist - old_dist); old_dist = new_dist; static int tp_probe(struct hid_device *hdev