tpinfo
guest_model = sc->tpinfo.sysctl_tree != NULL ?
if (sc->synhw.infoMajor >= 4 || sc->tpinfo.sysctl_tree != NULL)
trackpointinfo_t tpinfo; /* TrackPoint configuration */
#define PSM_TPINFO(x) offsetof(struct psm_softc, tpinfo.x)
if (sc->tpinfo.sysctl_tree != NULL)
sysctl_ctx_init(&sc->tpinfo.sysctl_ctx);
sc->tpinfo.sysctl_tree = SYSCTL_ADD_NODE(&sc->tpinfo.sysctl_ctx,
sc->tpinfo.sensitivity = 0x80;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.inertia = 0x06;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.uplateau = 0x61;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.reach = 0x0a;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.draghys = 0xff;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.mindrag = 0x14;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.upthresh = 0xff;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.threshold = 0x08;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.jenks = 0x87;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.ztime = 0x26;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.pts = 0x00;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
sc->tpinfo.skipback = 0x00;
SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO,
trackpoint_command(sc, 0x81, 0x4a, sc->tpinfo.sensitivity);
trackpoint_command(sc, 0x81, 0x60, sc->tpinfo.uplateau);
trackpoint_command(sc, 0x81, 0x4d, sc->tpinfo.inertia);
trackpoint_command(sc, 0x81, 0x57, sc->tpinfo.reach);
trackpoint_command(sc, 0x81, 0x58, sc->tpinfo.draghys);
trackpoint_command(sc, 0x81, 0x59, sc->tpinfo.mindrag);
trackpoint_command(sc, 0x81, 0x5a, sc->tpinfo.upthresh);
trackpoint_command(sc, 0x81, 0x5c, sc->tpinfo.threshold);
trackpoint_command(sc, 0x81, 0x5d, sc->tpinfo.jenks);
trackpoint_command(sc, 0x81, 0x5e, sc->tpinfo.ztime);
if (sc->tpinfo.pts == 0x01)
if (sc->tpinfo.skipback == 0x01)
sc->tpinfo.vendor = vendor;
sc->tpinfo.firmware = firmware;
struct tpinfo *tpinfo)
*tpinfo = (struct tpinfo) {
quirks_get_bool(q, MOUSED_TWO_FINGER_SCROLL, &tpinfo->two_finger_scroll);
quirks_get_bool(q, MOUSED_NATURAL_SCROLL, &tpinfo->natural_scroll);
quirks_get_bool(q, MOUSED_THREE_FINGER_DRAG, &tpinfo->three_finger_drag);
quirks_get_uint32(q, MOUSED_TAP_TIMEOUT, &tpinfo->tap_timeout);
quirks_get_double(q, MOUSED_TAP_MAX_DELTA, &tpinfo->tap_max_delta);
quirks_get_uint32(q, MOUSED_TAPHOLD_TIMEOUT, &tpinfo->taphold_timeout);
quirks_get_double(q, MOUSED_VSCROLL_MIN_DELTA, &tpinfo->vscroll_min_delta);
quirks_get_double(q, MOUSED_VSCROLL_HOR_AREA, &tpinfo->vscroll_hor_area);
quirks_get_double(q, MOUSED_VSCROLL_VER_AREA, &tpinfo->vscroll_ver_area);
tpinfo->min_pressure_lo = r.lower;
tpinfo->min_pressure_hi = r.upper;
&tpinfo->max_pressure);
&tpinfo->tap_threshold);
&tpinfo->max_width);
tpinfo->softbuttons_y = sz_y * i / 100;
tpinfo->softbutton2_x = sz_x * u / 100;
tpinfo->softbutton3_x = sz_x * u / 100;
const struct tpinfo *tpinfo = &tp->info;
ev->st.p = MAX(tpinfo->min_pressure_hi, tpinfo->tap_threshold);
if (tpinfo->natural_scroll)
struct tpinfo info; /* touchpad gesture parameters */
const struct tpinfo *tpinfo = &tp->info;
int tap_timeout = tpinfo->tap_timeout;
if (z >= tpinfo->min_pressure_hi ||
(gest->fingerdown && z >= tpinfo->min_pressure_lo)) {
bool two_finger_scroll = tpinfo->two_finger_scroll;
bool three_finger_drag = tpinfo->three_finger_drag;
int max_width = tpinfo->max_width;
u_int max_pressure = tpinfo->max_pressure;
int margin_top = tpinfo->margin_top;
int margin_right = tpinfo->margin_right;
int margin_bottom = tpinfo->margin_bottom;
int margin_left = tpinfo->margin_left;
int vscroll_hor_area = tpinfo->vscroll_hor_area * tphw->res_x;
int vscroll_ver_area = tpinfo->vscroll_ver_area * tphw->res_y;;
y_ok = tpinfo->softbuttons_y < 0
? start_y < min_y - tpinfo->softbuttons_y
: start_y > max_y - tpinfo->softbuttons_y;
center_x = min_x + tpinfo->softbutton2_x;
right_x = min_x + tpinfo->softbutton3_x;
center_x = min_x + tpinfo->softbutton3_x;
right_x = min_x + tpinfo->softbutton2_x;
(dx >= tpinfo->vscroll_min_delta * tphw->res_x ||
dy >= tpinfo->vscroll_min_delta * tphw->res_y)))) {
tap_max_delta_x = tpinfo->tap_max_delta * tphw->res_x;
tap_max_delta_y = tpinfo->tap_max_delta * tphw->res_y;
if (tphw->is_clickpad && tpinfo->softbuttons_y != 0)
if (!gest->in_vscroll && gest->zmax >= tpinfo->tap_threshold &&
gest->idletimeout = tpinfo->taphold_timeout;