diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-08 15:02:02 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-08 15:02:02 +0000 |
commit | 3d44b02cf449a636a7f0515de5b6fef7a32bace4 (patch) | |
tree | 449d23b51af9756678fc521aa110537bb5931b0c /sys/dev | |
parent | eaceae1b3e1ce9adc980f3fdaefa5b677e43d8c0 (diff) |
Add support for yet another exotic Microsoft Mouse, this time the
``Microsoft Notebook Optical Mouse 3000 Model 1049''. From FreeBSD.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/ums.c | 29 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs | 7 |
2 files changed, 28 insertions, 8 deletions
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 84af4877961..16dcff50f1a 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ums.c,v 1.27 2008/05/08 13:57:43 miod Exp $ */ +/* $OpenBSD: ums.c,v 1.28 2008/05/08 15:02:01 miod Exp $ */ /* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -91,10 +91,10 @@ struct ums_softc { int sc_enabled; int flags; /* device configuration */ -#define UMS_Z 0x01 /* z direction available */ +#define UMS_Z 0x01 /* Z direction available */ #define UMS_SPUR_BUT_UP 0x02 /* spurious button up events */ #define UMS_REVZ 0x04 /* Z-axis is reversed */ -#define UMS_W 0x08 /* w direction available */ +#define UMS_W 0x08 /* W direction available */ #define UMS_REVW 0x10 /* W-axis is reversed */ #define UMS_LEADINGBYTE 0x20 /* Unknown leading byte */ @@ -300,6 +300,26 @@ ums_attach(struct device *parent, struct device *self, void *aux) sc->sc_loc_btn[2].pos = 10; } + /* + * The Microsoft Wireless Notebook Optical Mouse 3000 Model 1049 has + * five Report IDs: 19, 23, 24, 17, 18 (in the order they appear in + * report descriptor), it seems that report 17 contains the necessary + * mouse information (3-buttons, X, Y, wheel) so we specify it + * manually. + */ + if (uaa->vendor == USB_VENDOR_MICROSOFT && + uaa->product == USB_PRODUCT_MICROSOFT_WLNOTEBOOK3) { + sc->flags = UMS_Z; + sc->nbuttons = 3; + /* XXX change sc_hdev isize to 5? */ + sc->sc_loc_x.pos = 8; + sc->sc_loc_y.pos = 16; + sc->sc_loc_z.pos = 24; + sc->sc_loc_btn[0].pos = 0; + sc->sc_loc_btn[1].pos = 1; + sc->sc_loc_btn[2].pos = 2; + } + printf(": %d button%s", sc->nbuttons, sc->nbuttons <= 1 ? "" : "s"); switch (sc->flags & (UMS_Z | UMS_W)) { @@ -406,8 +426,7 @@ ums_intr(struct uhidev *addr, void *buf, u_int len) if (sc->flags & UMS_LEADINGBYTE) { if (*ibuf++ == 0x02) return; - /* else - len--; */ + /* len--; */ } else if (sc->flags & UMS_SPUR_BUT_UP) { if (*ibuf == 0x14 || *ibuf == 0x15) return; diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index f4158be5710..f95c7a7c369 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$OpenBSD: usbdevs,v 1.353 2008/05/06 12:33:15 mpf Exp $ +$OpenBSD: usbdevs,v 1.354 2008/05/08 15:02:01 miod Exp $ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ /* @@ -1861,16 +1861,17 @@ product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse product MICROSOFT NATURALKBD 0x000b Natural product MICROSOFT DDS80 0x0014 Digital Sound System 80 product MICROSOFT SIDEWINDER 0x001a Sidewinder Precision Racing Wheel +product MICROSOFT INETPRO 0x001c Internet Keyboard Pro product MICROSOFT TBEXPLORER 0x0024 Trackball Explorer product MICROSOFT INTELLIEYE 0x0025 IntelliEye mouse -product MICROSOFT INETPRO 0x002b Internet Keyboard Pro +product MICROSOFT INETPRO2 0x002b Internet Keyboard Pro product MICROSOFT MN510 0x006e MN510 Wireless product MICROSOFT 700WX 0x0079 Palm 700WX product MICROSOFT MN110 0x007a 10/100 Ethernet product MICROSOFT WLINTELLIMOUSE 0x008c Wireless Optical IntelliMouse product MICROSOFT WLNOTEBOOK 0x00b9 Wireless Optical Mouse (Model 1023) +product MICROSOFT WLNOTEBOOK3 0x00d2 Wireless Optical Mouse 3000 (Model 1049) product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) -product MICROSOFT WLUSBMOUSE 0x00b9 Wireless USB Mouse product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN /* Microtech products */ |