Lines Matching refs:mtouch
38 struct input_dev *mtouch; member
114 struct xenkbd_mtouch *mtouch) in xenkbd_handle_mt_event() argument
116 if (unlikely(!info->mtouch)) in xenkbd_handle_mt_event()
119 if (mtouch->contact_id != info->mtouch_cur_contact_id) { in xenkbd_handle_mt_event()
120 info->mtouch_cur_contact_id = mtouch->contact_id; in xenkbd_handle_mt_event()
121 input_mt_slot(info->mtouch, mtouch->contact_id); in xenkbd_handle_mt_event()
124 switch (mtouch->event_type) { in xenkbd_handle_mt_event()
126 input_mt_report_slot_state(info->mtouch, MT_TOOL_FINGER, true); in xenkbd_handle_mt_event()
130 input_report_abs(info->mtouch, ABS_MT_POSITION_X, in xenkbd_handle_mt_event()
131 mtouch->u.pos.abs_x); in xenkbd_handle_mt_event()
132 input_report_abs(info->mtouch, ABS_MT_POSITION_Y, in xenkbd_handle_mt_event()
133 mtouch->u.pos.abs_y); in xenkbd_handle_mt_event()
137 input_report_abs(info->mtouch, ABS_MT_TOUCH_MAJOR, in xenkbd_handle_mt_event()
138 mtouch->u.shape.major); in xenkbd_handle_mt_event()
139 input_report_abs(info->mtouch, ABS_MT_TOUCH_MINOR, in xenkbd_handle_mt_event()
140 mtouch->u.shape.minor); in xenkbd_handle_mt_event()
144 input_report_abs(info->mtouch, ABS_MT_ORIENTATION, in xenkbd_handle_mt_event()
145 mtouch->u.orientation); in xenkbd_handle_mt_event()
149 input_mt_report_slot_inactive(info->mtouch); in xenkbd_handle_mt_event()
153 input_mt_sync_frame(info->mtouch); in xenkbd_handle_mt_event()
154 input_sync(info->mtouch); in xenkbd_handle_mt_event()
176 xenkbd_handle_mt_event(info, &event->mtouch); in xenkbd_handle_event()
206 struct input_dev *kbd, *ptr, *mtouch; in xenkbd_probe() local
333 mtouch = input_allocate_device(); in xenkbd_probe()
334 if (!mtouch) in xenkbd_probe()
347 mtouch->name = "Xen Virtual Multi-touch"; in xenkbd_probe()
348 mtouch->phys = info->phys; in xenkbd_probe()
349 mtouch->id.bustype = BUS_PCI; in xenkbd_probe()
350 mtouch->id.vendor = 0x5853; in xenkbd_probe()
351 mtouch->id.product = 0xfffd; in xenkbd_probe()
353 input_set_abs_params(mtouch, ABS_MT_TOUCH_MAJOR, in xenkbd_probe()
355 input_set_abs_params(mtouch, ABS_MT_POSITION_X, in xenkbd_probe()
357 input_set_abs_params(mtouch, ABS_MT_POSITION_Y, in xenkbd_probe()
360 ret = input_mt_init_slots(mtouch, num_cont, INPUT_MT_DIRECT); in xenkbd_probe()
362 input_free_device(mtouch); in xenkbd_probe()
368 ret = input_register_device(mtouch); in xenkbd_probe()
370 input_free_device(mtouch); in xenkbd_probe()
376 info->mtouch = mtouch; in xenkbd_probe()
416 if (info->mtouch) in xenkbd_remove()
417 input_unregister_device(info->mtouch); in xenkbd_remove()