Lines Matching refs:wd

771 	struct wtp_data *wd = hidpp->private_data;  in wtp_populate_input()  local
778 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, wd->x_size, 0, 0); in wtp_populate_input()
779 input_abs_set_res(input_dev, ABS_MT_POSITION_X, wd->resolution); in wtp_populate_input()
780 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, wd->y_size, 0, 0); in wtp_populate_input()
781 input_abs_set_res(input_dev, ABS_MT_POSITION_Y, wd->resolution); in wtp_populate_input()
793 input_mt_init_slots(input_dev, wd->maxcontacts, INPUT_MT_POINTER | in wtp_populate_input()
796 wd->input = input_dev; in wtp_populate_input()
799 static void wtp_touch_event(struct wtp_data *wd, in wtp_touch_event() argument
808 slot = input_mt_get_slot_by_key(wd->input, touch_report->finger_id); in wtp_touch_event()
810 input_mt_slot(wd->input, slot); in wtp_touch_event()
811 input_mt_report_slot_state(wd->input, MT_TOOL_FINGER, in wtp_touch_event()
814 input_event(wd->input, EV_ABS, ABS_MT_POSITION_X, in wtp_touch_event()
816 input_event(wd->input, EV_ABS, ABS_MT_POSITION_Y, in wtp_touch_event()
817 wd->flip_y ? wd->y_size - touch_report->y : in wtp_touch_event()
819 input_event(wd->input, EV_ABS, ABS_MT_PRESSURE, in wtp_touch_event()
827 struct wtp_data *wd = hidpp->private_data; in wtp_send_raw_xy_event() local
831 wtp_touch_event(wd, &(raw->fingers[i])); in wtp_send_raw_xy_event()
835 input_event(wd->input, EV_KEY, BTN_LEFT, raw->button); in wtp_send_raw_xy_event()
838 input_mt_sync_frame(wd->input); in wtp_send_raw_xy_event()
839 input_sync(wd->input); in wtp_send_raw_xy_event()
845 struct wtp_data *wd = hidpp->private_data; in wtp_mouse_raw_xy_event() local
871 .finger_count = wd->maxcontacts, in wtp_mouse_raw_xy_event()
885 struct wtp_data *wd = hidpp->private_data; in wtp_raw_event() local
889 if (!wd || !wd->input) in wtp_raw_event()
900 input_event(wd->input, EV_KEY, BTN_LEFT, in wtp_raw_event()
902 input_event(wd->input, EV_KEY, BTN_RIGHT, in wtp_raw_event()
904 input_sync(wd->input); in wtp_raw_event()
913 if ((report->fap.feature_index != wd->mt_feature_index) || in wtp_raw_event()
927 struct wtp_data *wd = hidpp->private_data; in wtp_get_config() local
933 &wd->mt_feature_index, &feature_type); in wtp_get_config()
938 ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, in wtp_get_config()
943 wd->x_size = raw_info.x_size; in wtp_get_config()
944 wd->y_size = raw_info.y_size; in wtp_get_config()
945 wd->maxcontacts = raw_info.maxcontacts; in wtp_get_config()
946 wd->flip_y = raw_info.origin == TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT; in wtp_get_config()
947 wd->resolution = raw_info.res; in wtp_get_config()
948 if (!wd->resolution) in wtp_get_config()
949 wd->resolution = WTP_MANUAL_RESOLUTION; in wtp_get_config()
957 struct wtp_data *wd; in wtp_allocate() local
959 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data), in wtp_allocate()
961 if (!wd) in wtp_allocate()
964 hidpp->private_data = wd; in wtp_allocate()
972 struct wtp_data *wd = hidpp->private_data; in wtp_connect() local
978 if (!wd->x_size) { in wtp_connect()
986 return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, in wtp_connect()