Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/evdev/evdev.c
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
EV_SKIP_EVENT, /* Event value not changed */ | EV_SKIP_EVENT, /* Event value not changed */ | ||||
EV_REPORT_EVENT, /* Event value changed */ | EV_REPORT_EVENT, /* Event value changed */ | ||||
EV_REPORT_MT_SLOT, /* Event value and MT slot number changed */ | EV_REPORT_MT_SLOT, /* Event value and MT slot number changed */ | ||||
}; | }; | ||||
MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); | MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); | ||||
#ifdef EVDEV_SUPPORT | |||||
int evdev_rcpt_mask = EVDEV_RCPT_HW_MOUSE | EVDEV_RCPT_HW_KBD; | |||||
wulf: powerpc/conf/GENERIC config uses both #option EVDEV_SUPPORT and #device abd at the same time… | |||||
#else | |||||
wulfUnsubmitted Done Inline ActionsThere is no need to keep #else branch. Drivers with EVDEV_SUPPORT option compiled out should not access evdev_rcpt_mask variable at all. wulf: There is no need to keep #else branch. Drivers with EVDEV_SUPPORT option compiled out should… | |||||
zeisingAuthorUnsubmitted Done Inline ActionsI believe I've taken care of your comments, was it this way you meant? zeising: I believe I've taken care of your comments, was it this way you meant? | |||||
int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; | int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; | ||||
#endif | |||||
Done Inline ActionsEVDEV_RCPT_HW_KBD should be removed from powerpc case as it will cause double key-press/release reporting on USB keyboards. One-line comment like /* adb keyboard driver does not support evdev yet. */ will be good too. wulf: EVDEV_RCPT_HW_KBD should be removed from powerpc case as it will cause double key-press/release… | |||||
Done Inline ActionsDone. zeising: Done. | |||||
int evdev_sysmouse_t_axis = 0; | int evdev_sysmouse_t_axis = 0; | ||||
SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"Evdev args"); | "Evdev args"); | ||||
#ifdef EVDEV_SUPPORT | #ifdef EVDEV_SUPPORT | ||||
SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, | SYSCTL_INT(_kern_evdev, OID_AUTO, rcpt_mask, CTLFLAG_RW, &evdev_rcpt_mask, 0, | ||||
"Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " | "Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, " | ||||
"bit2 - mouse hardware, bit3 - keyboard hardware"); | "bit2 - mouse hardware, bit3 - keyboard hardware"); | ||||
▲ Show 20 Lines • Show All 1,007 Lines • Show Last 20 Lines |
powerpc/conf/GENERIC config uses both #option EVDEV_SUPPORT and #device abd at the same time, so EVDEV_RCPT_KBDMUX should be kept enabled with #ifdef-s at least for old powerpc32 Macs if we still support them. Abd keyboard driver does not support evdev yet. Resetting EVDEV_RCPT_KBDMUX bit in evdev_rcpt_mask will make it silent.
It also applicable to Hyper-V Gen 2 keyboards enabled by default in i386|amd64/conf/GENERIC kernel configs. But I have patches with working evdev support for this driver, so we can go forward here just now. It is a driver with very minor scope of usage.