Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/input/ums.c
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
#include <sys/ioccom.h> | #include <sys/ioccom.h> | ||||
#include <sys/filio.h> | #include <sys/filio.h> | ||||
#include <sys/mouse.h> | #include <sys/mouse.h> | ||||
#ifdef USB_DEBUG | #ifdef USB_DEBUG | ||||
static int ums_debug = 0; | static int ums_debug = 0; | ||||
static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums"); | static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"USB ums"); | |||||
SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RWTUN, | SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RWTUN, | ||||
&ums_debug, 0, "Debug level"); | &ums_debug, 0, "Debug level"); | ||||
#endif | #endif | ||||
#define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE) | #define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE) | ||||
#define MOUSE_FLAGS (HIO_RELATIVE) | #define MOUSE_FLAGS (HIO_RELATIVE) | ||||
#define UMS_BUF_SIZE 8 /* bytes */ | #define UMS_BUF_SIZE 8 /* bytes */ | ||||
▲ Show 20 Lines • Show All 649 Lines • ▼ Show 20 Lines | #ifdef EVDEV_SUPPORT | ||||
err = evdev_register_mtx(sc->sc_evdev, &sc->sc_mtx); | err = evdev_register_mtx(sc->sc_evdev, &sc->sc_mtx); | ||||
if (err) | if (err) | ||||
goto detach; | goto detach; | ||||
#endif | #endif | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
OID_AUTO, "parseinfo", CTLTYPE_STRING|CTLFLAG_RD, | OID_AUTO, "parseinfo", | ||||
sc, 0, ums_sysctl_handler_parseinfo, | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, | ||||
"", "Dump of parsed HID report descriptor"); | sc, 0, ums_sysctl_handler_parseinfo, "", | ||||
"Dump of parsed HID report descriptor"); | |||||
return (0); | return (0); | ||||
detach: | detach: | ||||
if (d_ptr) { | if (d_ptr) { | ||||
free(d_ptr, M_TEMP); | free(d_ptr, M_TEMP); | ||||
} | } | ||||
ums_detach(dev); | ums_detach(dev); | ||||
▲ Show 20 Lines • Show All 469 Lines • Show Last 20 Lines |