-/* $OpenBSD: hidmt.c,v 1.6 2017/10/10 20:31:50 jcs Exp $ */
+/* $OpenBSD: hidmt.c,v 1.7 2018/07/30 15:56:30 jcs Exp $ */
/*
* HID multitouch driver for devices conforming to Windows Precision Touchpad
* standard
return;
hw = wsmouse_get_hw(mt->sc_wsmousedev);
- hw->type = WSMOUSE_TYPE_ELANTECH; /* see hidmt_ioctl */
+ hw->type = WSMOUSE_TYPE_TOUCHPAD;
hw->hw_type = (mt->sc_clickpad
? WSMOUSEHW_CLICKPAD : WSMOUSEHW_TOUCHPAD);
hw->x_min = mt->sc_minx;
int wsmode;
switch (cmd) {
- case WSMOUSEIO_GTYPE:
- /*
- * So we can specify our own finger/w values to the
- * xf86-input-synaptics driver like pms(4)
- */
- *(u_int *)data = WSMOUSE_TYPE_ELANTECH;
+ case WSMOUSEIO_GTYPE: {
+ struct wsmousehw *hw = wsmouse_get_hw(mt->sc_wsmousedev);
+ *(u_int *)data = hw->type;
break;
+ }
case WSMOUSEIO_GCALIBCOORDS:
wsmc->minx = mt->sc_minx;
-/* $OpenBSD: iatp.c,v 1.5 2018/06/22 15:58:26 jcs Exp $ */
+/* $OpenBSD: iatp.c,v 1.6 2018/07/30 15:56:30 jcs Exp $ */
/*
* Atmel maXTouch i2c touchscreen/touchpad driver
* Copyright (c) 2016 joshua stein <jcs@openbsd.org>
hw = wsmouse_get_hw(sc->sc_wsmousedev);
if (sc->sc_touchpad) {
- hw->type = WSMOUSE_TYPE_SYNAPTICS;
+ hw->type = WSMOUSE_TYPE_TOUCHPAD;
hw->hw_type = WSMOUSEHW_CLICKPAD;
} else {
hw->type = WSMOUSE_TYPE_TPANEL;
wsmc->resy = sc->sc_tsscale.resy;
break;
- case WSMOUSEIO_GTYPE:
- if (sc->sc_touchpad)
- *(u_int *)data = WSMOUSE_TYPE_SYNAPTICS;
- else
- *(u_int *)data = WSMOUSE_TYPE_TPANEL;
+ case WSMOUSEIO_GTYPE: {
+ struct wsmousehw *hw = wsmouse_get_hw(sc->sc_wsmousedev);
+ *(u_int *)data = hw->type;
break;
+ }
case WSMOUSEIO_SETMODE:
if (!sc->sc_touchpad)
-/* $OpenBSD: ubcmtp.c,v 1.17 2017/06/06 21:53:07 bru Exp $ */
+/* $OpenBSD: ubcmtp.c,v 1.18 2018/07/30 15:56:30 jcs Exp $ */
/*
* Copyright (c) 2013-2014, joshua stein <jcs@openbsd.org>
{
struct wsmousehw *hw = wsmouse_get_hw(sc->sc_wsmousedev);
- hw->type = WSMOUSE_TYPE_ELANTECH; /* see ubcmtp_ioctl */
+ hw->type = WSMOUSE_TYPE_TOUCHPAD;
hw->hw_type = (IS_CLICKPAD(sc->dev_type->type)
? WSMOUSEHW_CLICKPAD : WSMOUSEHW_TOUCHPAD);
hw->x_min = sc->dev_type->l_x.min;
cmd);
switch (cmd) {
- case WSMOUSEIO_GTYPE:
- /* so we can specify our own finger/w values to the
- * xf86-input-synaptics driver like pms(4) */
- *(u_int *)data = WSMOUSE_TYPE_ELANTECH;
+ case WSMOUSEIO_GTYPE: {
+ struct wsmousehw *hw = wsmouse_get_hw(sc->sc_wsmousedev);
+ *(u_int *)data = hw->type;
break;
+ }
case WSMOUSEIO_GCALIBCOORDS:
wsmc->minx = sc->dev_type->l_x.min;
-/* $OpenBSD: wsconsio.h,v 1.88 2018/05/07 21:58:42 bru Exp $ */
+/* $OpenBSD: wsconsio.h,v 1.89 2018/07/30 15:56:30 jcs Exp $ */
/* $NetBSD: wsconsio.h,v 1.74 2005/04/28 07:15:44 martin Exp $ */
/*
#define WSMOUSE_TYPE_SGI 17 /* SGI serial mouse */
#define WSMOUSE_TYPE_ELANTECH 18 /* Elantech touchpad */
#define WSMOUSE_TYPE_SYNAP_SBTN 19 /* Synaptics soft buttons */
+#define WSMOUSE_TYPE_TOUCHPAD 20 /* Generic touchpad */
/* Set resolution. Not applicable to all mouse types. */
#define WSMOUSEIO_SRES _IOW('W', 33, u_int)