Lines Matching refs:wd
714 struct wtp_data *wd = hidpp->private_data; in wtp_populate_input() local
721 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, wd->x_size, 0, 0); in wtp_populate_input()
722 input_abs_set_res(input_dev, ABS_MT_POSITION_X, wd->resolution); in wtp_populate_input()
723 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, wd->y_size, 0, 0); in wtp_populate_input()
724 input_abs_set_res(input_dev, ABS_MT_POSITION_Y, wd->resolution); in wtp_populate_input()
736 input_mt_init_slots(input_dev, wd->maxcontacts, INPUT_MT_POINTER | in wtp_populate_input()
739 wd->input = input_dev; in wtp_populate_input()
742 static void wtp_touch_event(struct wtp_data *wd, in wtp_touch_event() argument
751 slot = input_mt_get_slot_by_key(wd->input, touch_report->finger_id); in wtp_touch_event()
753 input_mt_slot(wd->input, slot); in wtp_touch_event()
754 input_mt_report_slot_state(wd->input, MT_TOOL_FINGER, in wtp_touch_event()
757 input_event(wd->input, EV_ABS, ABS_MT_POSITION_X, in wtp_touch_event()
759 input_event(wd->input, EV_ABS, ABS_MT_POSITION_Y, in wtp_touch_event()
760 wd->flip_y ? wd->y_size - touch_report->y : in wtp_touch_event()
762 input_event(wd->input, EV_ABS, ABS_MT_PRESSURE, in wtp_touch_event()
770 struct wtp_data *wd = hidpp->private_data; in wtp_send_raw_xy_event() local
774 wtp_touch_event(wd, &(raw->fingers[i])); in wtp_send_raw_xy_event()
778 input_event(wd->input, EV_KEY, BTN_LEFT, raw->button); in wtp_send_raw_xy_event()
781 input_mt_sync_frame(wd->input); in wtp_send_raw_xy_event()
782 input_sync(wd->input); in wtp_send_raw_xy_event()
788 struct wtp_data *wd = hidpp->private_data; in wtp_mouse_raw_xy_event() local
814 .finger_count = wd->maxcontacts, in wtp_mouse_raw_xy_event()
828 struct wtp_data *wd = hidpp->private_data; in wtp_raw_event() local
832 if (!wd || !wd->input) in wtp_raw_event()
843 input_event(wd->input, EV_KEY, BTN_LEFT, in wtp_raw_event()
845 input_event(wd->input, EV_KEY, BTN_RIGHT, in wtp_raw_event()
847 input_sync(wd->input); in wtp_raw_event()
856 if ((report->fap.feature_index != wd->mt_feature_index) || in wtp_raw_event()
870 struct wtp_data *wd = hidpp->private_data; in wtp_get_config() local
876 &wd->mt_feature_index, &feature_type); in wtp_get_config()
881 ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, in wtp_get_config()
886 wd->x_size = raw_info.x_size; in wtp_get_config()
887 wd->y_size = raw_info.y_size; in wtp_get_config()
888 wd->maxcontacts = raw_info.maxcontacts; in wtp_get_config()
889 wd->flip_y = raw_info.origin == TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT; in wtp_get_config()
890 wd->resolution = raw_info.res; in wtp_get_config()
891 if (!wd->resolution) in wtp_get_config()
892 wd->resolution = WTP_MANUAL_RESOLUTION; in wtp_get_config()
900 struct wtp_data *wd; in wtp_allocate() local
902 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data), in wtp_allocate()
904 if (!wd) in wtp_allocate()
907 hidpp->private_data = wd; in wtp_allocate()
915 struct wtp_data *wd = hidpp->private_data; in wtp_connect() local
921 if (!wd->x_size) { in wtp_connect()
929 return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, in wtp_connect()