Permalink
Browse files

Add umt(4) for USB Windows Precision Touchpad devices

Based on imt(4)

Rename HIDMT_INPUT_MODE_MT to HIDMT_INPUT_MODE_MT_TOUCHPAD

ok deraadt
  • Loading branch information...
jcs committed Aug 25, 2018
1 parent 79a6303 commit 737d705b8780db06a36e2cfc49360998fb7264ee
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.690 2018/08/19 11:42:33 anton Exp $
# $OpenBSD: Makefile,v 1.691 2018/08/25 20:31:31 jcs Exp $
MAN= aac.4 ac97.4 acphy.4 acrtc.4 \
acpi.4 acpiac.4 acpials.4 acpiasus.4 acpibat.4 \
@@ -75,8 +75,8 @@ MAN= aac.4 ac97.4 acphy.4 acrtc.4 \
uftdi.4 ugen.4 ugl.4 ugold.4 uguru.4 uhci.4 uhid.4 uhidev.4 uipaq.4 \
uk.4 ukbd.4 \
ukphy.4 ulpt.4 umass.4 umb.4 umbg.4 umcs.4 umct.4 umidi.4 umodem.4 \
ums.4 umsm.4 unix.4 uonerng.4 uow.4 uoaklux.4 uoakrh.4 uoakv.4 upd.4 \
upgt.4 upl.4 uplcom.4 ural.4 ure.4 url.4 urlphy.4 \
ums.4 umsm.4 umt.4 unix.4 uonerng.4 uow.4 uoaklux.4 uoakrh.4 uoakv.4 \
upd.4 upgt.4 upl.4 uplcom.4 ural.4 ure.4 url.4 urlphy.4 \
urndis.4 urng.4 urtw.4 urtwn.4 usb.4 uscom.4 uslcom.4 usps.4 \
uthum.4 uticom.4 utpms.4 utwitch.4 utrh.4 uts.4 utvfu.4 uvideo.4 \
uvisor.4 uvscom.4 uwacom.4 \
@@ -1,4 +1,4 @@
.\" $OpenBSD: uhidev.4,v 1.9 2016/09/12 08:12:06 mpi Exp $
.\" $OpenBSD: uhidev.4,v 1.10 2018/08/25 20:31:31 jcs Exp $
.\" $NetBSD: uhidev.4,v 1.2 2001/12/29 03:06:41 augustss Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: September 12 2016 $
.Dd $Mdocdate: August 25 2018 $
.Dt UHIDEV 4
.Os
.Sh NAME
@@ -42,6 +42,7 @@
.Cd "uhid* at uhidev?"
.Cd "ukbd* at uhidev?"
.Cd "ums* at uhidev?"
.Cd "umt* at uhidev?"
.Cd "uoaklux* at uhidev?"
.Cd "uoakrh* at uhidev?"
.Cd "uoakv* at uhidev?"
@@ -73,6 +74,7 @@ only dispatches data to them based on the report id.
.Xr uhid 4 ,
.Xr ukbd 4 ,
.Xr ums 4 ,
.Xr umt 4 ,
.Xr uoaklux 4 ,
.Xr uoakrh 4 ,
.Xr uoakv 4 ,
@@ -0,0 +1,47 @@
.\" $OpenBSD: umt.4,v 1.1 2018/08/25 20:31:31 jcs Exp $
.\"
.\" Copyright (c) 2016-2018 joshua stein <jcs@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 25 2018 $
.Dt UMT 4
.Os
.Sh NAME
.Nm umt
.Nd USB HID multitouch touchpad devices
.Sh SYNOPSIS
.Cd "umt* at uhidev?"
.Cd "wsmouse* at umt? mux 0"
.Sh DESCRIPTION
The
.Nm
driver provides support for USB HID touchpads conforming to the
Windows Precision Touchpad standard.
Access to these devices is through the
.Xr wscons 4
driver.
.Sh SEE ALSO
.Xr uhidev 4 ,
.Xr ums 4 ,
.Xr wsmouse 4
.Sh HISTORY
The
.Nm
device driver first appeared in
.Ox 6.4 .
.Sh AUTHORS
The
.Nm
driver was written by
.An joshua stein Aq Mt jcs@openbsd.org .
@@ -1,4 +1,4 @@
.\" $OpenBSD: usb.4,v 1.188 2018/08/03 01:50:14 kevlo Exp $
.\" $OpenBSD: usb.4,v 1.189 2018/08/25 20:31:31 jcs Exp $
.\" $NetBSD: usb.4,v 1.15 1999/07/29 14:20:32 augustss Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 3 2018 $
.Dd $Mdocdate: August 25 2018 $
.Dt USB 4
.Os
.Sh NAME
@@ -248,6 +248,8 @@ Base driver for all Human Interface Devices
USB keyboards that follow the boot protocol
.It Xr ums 4
USB HID mouse, touchscreen and digitiser devices
.It Xr umt 4
USB HID multitouch touchpad devices
.It Xr uoaklux 4
Toradex OAK USB illuminance sensor
.It Xr uoakrh 4
@@ -1,4 +1,4 @@
# $OpenBSD: GENERIC,v 1.460 2018/08/22 15:38:46 mpi Exp $
# $OpenBSD: GENERIC,v 1.461 2018/08/25 20:31:31 jcs Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -257,6 +257,8 @@ wsmouse* at ubcmtp? mux 0
uhidev* at uhub? # Human Interface Devices
ums* at uhidev? # USB mouse
wsmouse* at ums? mux 0
umt* at uhidev? # USB multitouch touchpad
wsmouse* at umt? mux 0
uts* at uhub? # USB touchscreen
wsmouse* at uts? mux 0
uwacom* at uhidev? # USB Wacom tablet
@@ -1,4 +1,4 @@
/* $OpenBSD: hidmt.c,v 1.8 2018/08/25 18:32:05 jcs Exp $ */
/* $OpenBSD: hidmt.c,v 1.9 2018/08/25 20:31:31 jcs Exp $ */
/*
* HID multitouch driver for devices conforming to Windows Precision Touchpad
* standard
@@ -221,7 +221,7 @@ hidmt_setup(struct device *self, struct hidmt *mt, void *desc, int dlen)
return 1;
}
if (hidmt_set_input_mode(mt, HIDMT_INPUT_MODE_MT)) {
if (hidmt_set_input_mode(mt, HIDMT_INPUT_MODE_MT_TOUCHPAD)) {
printf("\n%s: switch to multitouch mode failed\n",
self->dv_xname);
return 1;
@@ -1,4 +1,4 @@
/* $OpenBSD: hidmtvar.h,v 1.6 2018/08/25 18:32:05 jcs Exp $ */
/* $OpenBSD: hidmtvar.h,v 1.7 2018/08/25 20:31:31 jcs Exp $ */
/*
* Copyright (c) 2016 joshua stein <jcs@openbsd.org>
*
@@ -67,7 +67,8 @@ struct hidmt {
};
int hidmt_set_input_mode(struct hidmt *, uint16_t);
#define HIDMT_INPUT_MODE_MT 0x3
#define HIDMT_INPUT_MODE_MT_TOUCHSCREEN 0x2
#define HIDMT_INPUT_MODE_MT_TOUCHPAD 0x3
void hidmt_attach(struct hidmt *, const struct wsmouse_accessops *);
int hidmt_detach(struct hidmt *, int);
@@ -1,4 +1,4 @@
/* $OpenBSD: imt.c,v 1.3 2018/08/25 18:32:05 jcs Exp $ */
/* $OpenBSD: imt.c,v 1.4 2018/08/25 20:31:31 jcs Exp $ */
/*
* HID-over-i2c multitouch trackpad driver for devices conforming to
* Windows Precision Touchpad standard
@@ -218,7 +218,7 @@ imt_enable(void *v)
rv = ihidev_open(&sc->sc_hdev);
hidmt_set_input_mode(mt, HIDMT_INPUT_MODE_MT);
hidmt_set_input_mode(mt, HIDMT_INPUT_MODE_MT_TOUCHPAD);
return rv;
}
@@ -1,4 +1,4 @@
# $OpenBSD: files.usb,v 1.135 2018/08/03 01:50:15 kevlo Exp $
# $OpenBSD: files.usb,v 1.136 2018/08/25 20:31:31 jcs Exp $
# $NetBSD: files.usb,v 1.16 2000/02/14 20:29:54 augustss Exp $
#
# Config file and device description for machine-independent USB code.
@@ -87,6 +87,11 @@ device ums: hid, hidms, wsmousedev
attach ums at uhidbus
file dev/usb/ums.c ums
# HID Multitouch Trackpad
device umt: hid, hidmt, wsmousedev
attach umt at uhidbus
file dev/usb/umt.c umt
# USB Touchscreen
device uts: wsmousedev
attach uts at uhub
Oops, something went wrong.

0 comments on commit 737d705

Please sign in to comment.