Home
last modified time | relevance | path

Searched refs:evdev (Results 1 – 25 of 56) sorted by relevance

123

/freebsd/sys/dev/evdev/
H A Devdev.c49 #define debugf(evdev, fmt, args...) printf("evdev: " fmt "\n", ##args) argument
51 #define debugf(evdev, fmt, args...) argument
55 FEATURE(evdev, "Input event devices support");
78 SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
102 evdev_free(struct evdev_dev *evdev) in evdev_free() argument
105 if (evdev != NULL && evdev->ev_cdev != NULL && in evdev_free()
106 evdev->ev_cdev->si_drv1 != NULL) in evdev_free()
107 evdev_unregister(evdev); in evdev_free()
109 free(evdev, M_EVDEV); in evdev_free()
128 evdev_set_report_size(struct evdev_dev *evdev, size_t report_size) in evdev_set_report_size() argument
[all …]
H A Devdev_mt.c100 ffc_slot(struct evdev_dev *evdev, slotset_t slots) in ffc_slot() argument
102 return (ffs(~slots & ((2U << MAXIMAL_MT_SLOT(evdev)) - 1)) - 1); in ffc_slot()
106 evdev_mt_init(struct evdev_dev *evdev) in evdev_mt_init() argument
113 type_a = !bit_test(evdev->ev_abs_flags, ABS_MT_SLOT); in evdev_mt_init()
116 evdev_support_abs(evdev, in evdev_mt_init()
118 evdev_support_abs(evdev, in evdev_mt_init()
122 slots = MAXIMAL_MT_SLOT(evdev) + 1; in evdev_mt_init()
124 if (bit_test(evdev->ev_flags, EVDEV_FLAG_MT_TRACK)) { in evdev_mt_init()
130 evdev->ev_mt = mt; in evdev_mt_init()
133 if (bit_test(evdev->ev_flags, EVDEV_FLAG_MT_TRACK)) { in evdev_mt_init()
[all …]
H A Dcdev.c104 struct evdev_dev *evdev = dev->si_drv1; in evdev_open() local
109 if (evdev == NULL) in evdev_open()
113 buffer_size = evdev->ev_report_size * DEF_RING_REPORTS; in evdev_open()
124 client->ec_evdev = evdev; in evdev_open()
128 ret = EVDEV_LIST_LOCK_SIG(evdev); in evdev_open()
135 ret = evdev_register_client(evdev, client); in evdev_open()
136 EVDEV_LIST_UNLOCK(evdev); in evdev_open()
255 struct evdev_dev *evdev = dev->si_drv1; in evdev_write() local
273 if (client->ec_revoked || evdev == NULL) in evdev_write()
293 ret = evdev_inject_event(evdev, event.t32.type, in evdev_write()
[all …]
H A Devdev_private.h61 #define CURRENT_MT_SLOT(evdev) ((evdev)->ev_absinfo[ABS_MT_SLOT].value) argument
62 #define MAXIMAL_MT_SLOT(evdev) ((evdev)->ev_absinfo[ABS_MT_SLOT].maximum) argument
172 #define EVDEV_LOCK(evdev) mtx_lock((evdev)->ev_state_lock) argument
173 #define EVDEV_UNLOCK(evdev) mtx_unlock((evdev)->ev_state_lock) argument
174 #define EVDEV_LOCK_ASSERT(evdev) do { \ argument
175 if ((evdev)->ev_state_lock != SYSTEM_CONSOLE_LOCK) \
176 mtx_assert((evdev)->ev_state_lock, MA_OWNED); \
178 #define EVDEV_ENTER(evdev) do { \ argument
179 if ((evdev)->ev_lock_type != EV_LOCK_MTX) \
180 EVDEV_LOCK(evdev); \
[all …]
H A Devdev.h177 evdev_sync(struct evdev_dev *evdev) in evdev_sync() argument
180 return (evdev_push_event(evdev, EV_SYN, SYN_REPORT, 1)); in evdev_sync()
184 evdev_mt_sync(struct evdev_dev *evdev) in evdev_mt_sync() argument
187 return (evdev_push_event(evdev, EV_SYN, SYN_MT_REPORT, 1)); in evdev_mt_sync()
191 evdev_push_key(struct evdev_dev *evdev, uint16_t code, int32_t value) in evdev_push_key() argument
194 return (evdev_push_event(evdev, EV_KEY, code, value != 0)); in evdev_push_key()
198 evdev_push_rel(struct evdev_dev *evdev, uint16_t code, int32_t value) in evdev_push_rel() argument
201 return (evdev_push_event(evdev, EV_REL, code, value)); in evdev_push_rel()
205 evdev_push_abs(struct evdev_dev *evdev, uint16_t code, int32_t value) in evdev_push_abs() argument
208 return (evdev_push_event(evdev, EV_ABS, code, value)); in evdev_push_abs()
[all …]
H A Devdev_utils.c222 evdev_support_all_known_keys(struct evdev_dev *evdev) in evdev_support_all_known_keys() argument
228 evdev_support_key(evdev, evdev_at_set1_scancodes[i]); in evdev_support_all_known_keys()
278 evdev_push_mouse_btn(struct evdev_dev *evdev, int buttons) in evdev_push_mouse_btn() argument
283 evdev_push_key(evdev, evdev_mouse_button_codes[i], in evdev_push_mouse_btn()
288 evdev_push_leds(struct evdev_dev *evdev, int leds) in evdev_push_leds() argument
293 if (evdev == NULL) in evdev_push_leds()
297 evdev_push_led(evdev, evdev_led_codes[i], leds & (1 << i)); in evdev_push_leds()
301 evdev_push_repeats(struct evdev_dev *evdev, keyboard_t *kbd) in evdev_push_repeats() argument
304 if (evdev == NULL) in evdev_push_repeats()
307 evdev_push_event(evdev, EV_REP, REP_DELAY, kbd->kb_delay1); in evdev_push_repeats()
[all …]
/freebsd/sys/dev/hid/
H A Dhgame.c89 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in hgame_hat_switch_cb() local
94 evdev_support_event(evdev, EV_ABS); in hgame_hat_switch_cb()
95 evdev_support_abs(evdev, ABS_HAT0X, -1, 1, 0, 0, 0); in hgame_hat_switch_cb()
96 evdev_support_abs(evdev, ABS_HAT0Y, -1, 1, 0, 0, 0); in hgame_hat_switch_cb()
101 evdev_push_abs(evdev, ABS_HAT0X, hat_switch_map[idx].x); in hgame_hat_switch_cb()
102 evdev_push_abs(evdev, ABS_HAT0Y, hat_switch_map[idx].y); in hgame_hat_switch_cb()
120 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in hgame_dpad_cb() local
126 evdev_support_event(evdev, EV_ABS); in hgame_dpad_cb()
127 evdev_support_abs(evdev, ABS_HAT0X, -1, 1, 0, 0, 0); in hgame_dpad_cb()
128 evdev_support_abs(evdev, ABS_HAT0Y, -1, 1, 0, 0, 0); in hgame_dpad_cb()
[all …]
H A Dietp.c104 struct evdev_dev *evdev; member
218 ietp_ev_open(struct evdev_dev *evdev) in ietp_ev_open() argument
220 return (hid_intr_start(evdev_get_softc(evdev))); in ietp_ev_open()
224 ietp_ev_close(struct evdev_dev *evdev) in ietp_ev_close() argument
226 return (hid_intr_stop(evdev_get_softc(evdev))); in ietp_ev_close()
272 sc->evdev = evdev_alloc(); in ietp_attach()
273 evdev_set_name(sc->evdev, device_get_desc(sc->dev)); in ietp_attach()
274 evdev_set_phys(sc->evdev, device_get_nameunit(sc->dev)); in ietp_attach()
275 evdev_set_id(sc->evdev, hw->idBus, hw->idVendor, hw->idProduct, in ietp_attach()
277 evdev_set_serial(sc->evdev, hw->serial); in ietp_attach()
[all …]
H A Dps4dshock.c791 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in ps4dshock_final_cb() local
794 evdev_support_prop(evdev, INPUT_PROP_DIRECT); in ps4dshock_final_cb()
803 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in ps4dsacc_data_cb() local
812 evdev_support_abs(evdev, in ps4dsacc_data_cb()
825 evdev_push_abs(evdev, calib->code, in ps4dsacc_data_cb()
840 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in ps4dsacc_tstamp_cb() local
846 evdev_support_event(evdev, EV_MSC); in ps4dsacc_tstamp_cb()
847 evdev_support_msc(evdev, MSC_TIMESTAMP); in ps4dsacc_tstamp_cb()
855 evdev_push_msc(evdev, MSC_TIMESTAMP, sc->ev_tstamp); in ps4dsacc_tstamp_cb()
868 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in ps4dsacc_final_cb() local
[all …]
H A Dhmt.c195 struct evdev_dev *evdev; member
251 hmt_ev_close(struct evdev_dev *evdev) in hmt_ev_close() argument
253 return (hid_intr_stop(evdev_get_softc(evdev))); in hmt_ev_close()
257 hmt_ev_open(struct evdev_dev *evdev) in hmt_ev_open() argument
259 return (hid_intr_start(evdev_get_softc(evdev))); in hmt_ev_open()
386 sc->evdev = evdev_alloc(); in hmt_attach()
387 evdev_set_name(sc->evdev, device_get_desc(dev)); in hmt_attach()
388 evdev_set_phys(sc->evdev, device_get_nameunit(dev)); in hmt_attach()
389 evdev_set_id(sc->evdev, hw->idBus, hw->idVendor, hw->idProduct, in hmt_attach()
391 evdev_set_serial(sc->evdev, hw->serial); in hmt_attach()
[all …]
H A Dhidmap.c117 hidmap_ev_close(struct evdev_dev *evdev) in hidmap_ev_close() argument
119 return (hid_intr_stop(evdev_get_softc(evdev))); in hidmap_ev_close()
123 hidmap_ev_open(struct evdev_dev *evdev) in hidmap_ev_open() argument
125 return (hid_intr_start(evdev_get_softc(evdev))); in hidmap_ev_open()
134 evdev_support_event(hm->evdev, EV_KEY); in hidmap_support_key()
146 evdev_support_key(hm->evdev, key); in hidmap_support_key()
156 evdev_push_key(hm->evdev, key, value); in hidmap_push_key()
171 evdev_push_key(hm->evdev, i, press); in hidmap_sync_keys()
264 evdev_push_event(hm->evdev, hi->evtype, in hidmap_intr()
334 evdev_sync(hm->evdev); in hidmap_intr()
[all …]
H A Dhpen.c114 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in hpen_battery_strenght_cb() local
118 evdev_support_event(evdev, EV_PWR); in hpen_battery_strenght_cb()
134 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in hpen_final_pen_cb() local
139 evdev_support_prop(evdev, INPUT_PROP_POINTER); in hpen_final_pen_cb()
141 evdev_support_prop(evdev, INPUT_PROP_DIRECT); in hpen_final_pen_cb()
258 MODULE_DEPEND(hpen, evdev, 1, 1, 1);
H A Dhcons.c234 struct evdev_dev *evdev = HIDMAP_CB_GET_EVDEV(); in hcons_rel_volume_cb() local
240 evdev_support_event(evdev, EV_KEY); in hcons_rel_volume_cb()
241 evdev_support_key(evdev, KEY_VOLUMEUP); in hcons_rel_volume_cb()
242 evdev_support_key(evdev, KEY_VOLUMEDOWN); in hcons_rel_volume_cb()
250 evdev_push_key(evdev, code, 1); in hcons_rel_volume_cb()
251 evdev_push_key(evdev, code, 0); in hcons_rel_volume_cb()
293 MODULE_DEPEND(hcons, evdev, 1, 1, 1);
H A Dhkbd.c879 struct evdev_dev *evdev; in hkbd_attach() local
968 evdev = evdev_alloc(); in hkbd_attach()
969 evdev_set_name(evdev, device_get_desc(dev)); in hkbd_attach()
970 evdev_set_phys(evdev, device_get_nameunit(dev)); in hkbd_attach()
971 evdev_set_id(evdev, hw->idBus, hw->idVendor, hw->idProduct, in hkbd_attach()
973 evdev_set_serial(evdev, hw->serial); in hkbd_attach()
974 evdev_set_methods(evdev, kbd, &hkbd_evdev_methods); in hkbd_attach()
975 evdev_set_flag(evdev, EVDEV_FLAG_EXT_EPOCH); /* hidbus child */ in hkbd_attach()
976 evdev_support_event(evdev, EV_SYN); in hkbd_attach()
977 evdev_support_event(evdev, EV_KEY); in hkbd_attach()
[all …]
/freebsd/sys/dev/usb/input/
H A Duep.c99 struct evdev_dev *evdev; member
217 evdev_push_abs(sc->evdev, ABS_X, x); in uep_process_pkt()
218 evdev_push_abs(sc->evdev, ABS_Y, y); in uep_process_pkt()
220 evdev_push_key(sc->evdev, BTN_TOUCH, touch); in uep_process_pkt()
221 evdev_sync(sc->evdev); in uep_process_pkt()
370 sc->evdev = evdev_alloc(); in uep_attach()
371 evdev_set_name(sc->evdev, device_get_desc(dev)); in uep_attach()
372 evdev_set_phys(sc->evdev, device_get_nameunit(dev)); in uep_attach()
373 evdev_set_id(sc->evdev, BUS_USB, uaa->info.idVendor, in uep_attach()
375 evdev_set_serial(sc->evdev, usb_get_serial(uaa->device)); in uep_attach()
[all …]
H A Dwmt.c219 struct evdev_dev *evdev; member
406 sc->evdev = evdev_alloc(); in wmt_attach()
407 evdev_set_name(sc->evdev, device_get_desc(dev)); in wmt_attach()
408 evdev_set_phys(sc->evdev, device_get_nameunit(dev)); in wmt_attach()
409 evdev_set_id(sc->evdev, BUS_USB, uaa->info.idVendor, in wmt_attach()
411 evdev_set_serial(sc->evdev, usb_get_serial(uaa->device)); in wmt_attach()
412 evdev_set_methods(sc->evdev, sc, &wmt_evdev_methods); in wmt_attach()
413 evdev_set_flag(sc->evdev, EVDEV_FLAG_MT_STCOMPAT); in wmt_attach()
416 evdev_support_prop(sc->evdev, INPUT_PROP_DIRECT); in wmt_attach()
419 evdev_support_prop(sc->evdev, INPUT_PROP_POINTER); in wmt_attach()
[all …]
H A Dukbd.c1135 struct evdev_dev *evdev; in ukbd_attach() local
1264 evdev = evdev_alloc(); in ukbd_attach()
1265 evdev_set_name(evdev, device_get_desc(dev)); in ukbd_attach()
1266 evdev_set_phys(evdev, device_get_nameunit(dev)); in ukbd_attach()
1267 evdev_set_id(evdev, BUS_USB, uaa->info.idVendor, in ukbd_attach()
1269 evdev_set_serial(evdev, usb_get_serial(uaa->device)); in ukbd_attach()
1270 evdev_set_methods(evdev, kbd, &ukbd_evdev_methods); in ukbd_attach()
1271 evdev_support_event(evdev, EV_SYN); in ukbd_attach()
1272 evdev_support_event(evdev, EV_KEY); in ukbd_attach()
1275 evdev_support_event(evdev, EV_LED); in ukbd_attach()
[all …]
/freebsd/sys/dev/hyperv/input/
H A Dhv_kbd.c704 hvkbd_ev_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, in hvkbd_ev_event() argument
707 keyboard_t *kbd = evdev_get_softc(evdev); in hvkbd_ev_event()
782 struct evdev_dev *evdev; in hv_kbd_drv_attach() local
801 evdev = evdev_alloc(); in hv_kbd_drv_attach()
802 evdev_set_name(evdev, "Hyper-V keyboard"); in hv_kbd_drv_attach()
803 evdev_set_phys(evdev, device_get_nameunit(dev)); in hv_kbd_drv_attach()
804 evdev_set_id(evdev, BUS_VIRTUAL, 0, 0, 0); in hv_kbd_drv_attach()
805 evdev_set_methods(evdev, kbd, &hvkbd_evdev_methods); in hv_kbd_drv_attach()
806 evdev_support_event(evdev, EV_SYN); in hv_kbd_drv_attach()
807 evdev_support_event(evdev, EV_KEY); in hv_kbd_drv_attach()
[all …]
/freebsd/sys/dev/cyapa/
H A Dcyapa.c162 struct evdev_dev *evdev; member
572 sc->evdev = evdev_alloc(); in cyapa_attach()
573 evdev_set_name(sc->evdev, device_get_desc(sc->dev)); in cyapa_attach()
574 evdev_set_phys(sc->evdev, device_get_nameunit(sc->dev)); in cyapa_attach()
575 evdev_set_id(sc->evdev, BUS_I2C, 0, 0, 1); in cyapa_attach()
576 evdev_set_flag(sc->evdev, EVDEV_FLAG_MT_STCOMPAT); in cyapa_attach()
577 evdev_set_flag(sc->evdev, EVDEV_FLAG_MT_AUTOREL); in cyapa_attach()
579 evdev_support_event(sc->evdev, EV_SYN); in cyapa_attach()
580 evdev_support_event(sc->evdev, EV_ABS); in cyapa_attach()
581 evdev_support_event(sc->evdev, EV_KEY); in cyapa_attach()
[all …]
/freebsd/sys/modules/evdev/
H A DMakefile1 .PATH: ${SRCTOP}/sys/dev/evdev
3 KMOD= evdev
4 SRCS= cdev.c evdev.c evdev_mt.c evdev_utils.c
/freebsd/sys/dev/kbdmux/
H A Dkbdmux.c392 struct evdev_dev *evdev; in kbdmux_init() local
457 evdev = evdev_alloc(); in kbdmux_init()
458 evdev_set_name(evdev, "System keyboard multiplexer"); in kbdmux_init()
460 evdev_set_phys(evdev, phys_loc); in kbdmux_init()
461 evdev_set_id(evdev, BUS_VIRTUAL, 0, 0, 0); in kbdmux_init()
462 evdev_set_methods(evdev, kbd, &kbdmux_evdev_methods); in kbdmux_init()
463 evdev_support_event(evdev, EV_SYN); in kbdmux_init()
464 evdev_support_event(evdev, EV_KEY); in kbdmux_init()
465 evdev_support_event(evdev, EV_LED); in kbdmux_init()
466 evdev_support_event(evdev, EV_REP); in kbdmux_init()
[all …]
/freebsd/sys/dev/acpica/
H A Dacpi_video.c47 #include <dev/evdev/input.h>
48 #include <dev/evdev/evdev.h>
70 struct evdev_dev *evdev; member
82 struct evdev_dev *evdev; member
191 MODULE_DEPEND(acpi_video, evdev, 1, 1, 1);
226 acpi_video_push_evdev_event(struct evdev_dev *evdev, UINT32 notify) in acpi_video_push_evdev_event() argument
237 evdev_push_key(evdev, key, 1); in acpi_video_push_evdev_event()
238 evdev_sync(evdev); in acpi_video_push_evdev_event()
239 evdev_push_key(evdev, ke in acpi_video_push_evdev_event()
[all...]
/freebsd/sys/dev/atkbdc/
H A Datkbd.c383 struct evdev_dev *evdev; in atkbd_init() local
475 evdev = evdev_alloc(); in atkbd_init()
476 evdev_set_name(evdev, "AT keyboard"); in atkbd_init()
477 evdev_set_phys(evdev, phys_loc); in atkbd_init()
478 evdev_set_id(evdev, BUS_I8042, PS2_KEYBOARD_VENDOR, in atkbd_init()
480 evdev_set_methods(evdev, kbd, &atkbd_evdev_methods); in atkbd_init()
481 evdev_support_event(evdev, EV_SYN); in atkbd_init()
482 evdev_support_event(evdev, EV_KEY); in atkbd_init()
483 evdev_support_event(evdev, EV_LED); in atkbd_init()
484 evdev_support_event(evdev, EV_REP); in atkbd_init()
[all …]
/freebsd/sys/dev/acpi_support/
H A Dacpi_ibm.c208 struct evdev_dev *evdev; member
376 MODULE_DEPEND(acpi_ibm, evdev, 1, 1, 1);
498 sc->evdev = evdev_alloc(); in acpi_ibm_attach()
499 evdev_set_name(sc->evdev, device_get_desc(dev)); in acpi_ibm_attach()
500 evdev_set_phys(sc->evdev, device_get_nameunit(dev)); in acpi_ibm_attach()
501 evdev_set_id(sc->evdev, BUS_HOST, 0, 0, 1); in acpi_ibm_attach()
502 evdev_support_event(sc->evdev, EV_SYN); in acpi_ibm_attach()
503 evdev_support_event(sc->evdev, EV_KEY); in acpi_ibm_attach()
504 evdev_support_key(sc->evdev, KEY_BRIGHTNESSUP); in acpi_ibm_attach()
505 evdev_support_key(sc->evdev, KEY_BRIGHTNESSDOWN); in acpi_ibm_attach()
[all …]
/freebsd/sys/arm/broadcom/bcm2835/
H A Dbcm2835_ft5406.c173 ft5406ts_ev_close(struct evdev_dev *evdev) in ft5406ts_ev_close() argument
175 struct ft5406ts_softc *sc = evdev_get_softc(evdev); in ft5406ts_ev_close()
185 ft5406ts_ev_open(struct evdev_dev *evdev) in ft5406ts_ev_open() argument
187 struct ft5406ts_softc *sc = evdev_get_softc(evdev); in ft5406ts_ev_open()
332 MODULE_DEPEND(ft5406ts, evdev, 1, 1, 1);

123