Lines Matching refs:wd

1581 	struct hidpp_ff_work_data *wd = container_of(w, struct hidpp_ff_work_data, work);  in hidpp_ff_work_handler()  local
1582 struct hidpp_ff_private_data *data = wd->data; in hidpp_ff_work_handler()
1588 switch (wd->effect_id) { in hidpp_ff_work_handler()
1590 wd->params[0] = data->slot_autocenter; in hidpp_ff_work_handler()
1597 wd->params[0] = hidpp_ff_find_effect(data, wd->effect_id); in hidpp_ff_work_handler()
1603 wd->command, wd->params, wd->size, &response); in hidpp_ff_work_handler()
1611 switch (wd->command) { in hidpp_ff_work_handler()
1615 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
1617 data->effect_ids[slot-1] = wd->effect_id; in hidpp_ff_work_handler()
1618 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
1624 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
1626 data->effect_ids[wd->params[0]-1] = -1; in hidpp_ff_work_handler()
1627 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
1632 data->gain = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
1635 data->range = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
1644 kfree(wd); in hidpp_ff_work_handler()
1649 struct hidpp_ff_work_data *wd = kzalloc(sizeof(*wd), GFP_KERNEL); in hidpp_ff_queue_work() local
1652 if (!wd) in hidpp_ff_queue_work()
1655 INIT_WORK(&wd->work, hidpp_ff_work_handler); in hidpp_ff_queue_work()
1657 wd->data = data; in hidpp_ff_queue_work()
1658 wd->effect_id = effect_id; in hidpp_ff_queue_work()
1659 wd->command = command; in hidpp_ff_queue_work()
1660 wd->size = size; in hidpp_ff_queue_work()
1661 memcpy(wd->params, params, size); in hidpp_ff_queue_work()
1664 queue_work(data->wq, &wd->work); in hidpp_ff_queue_work()
2100 struct wtp_data *wd = hidpp->private_data; in wtp_populate_input() local
2107 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, wd->x_size, 0, 0); in wtp_populate_input()
2108 input_abs_set_res(input_dev, ABS_MT_POSITION_X, wd->resolution); in wtp_populate_input()
2109 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, wd->y_size, 0, 0); in wtp_populate_input()
2110 input_abs_set_res(input_dev, ABS_MT_POSITION_Y, wd->resolution); in wtp_populate_input()
2122 input_mt_init_slots(input_dev, wd->maxcontacts, INPUT_MT_POINTER | in wtp_populate_input()
2125 wd->input = input_dev; in wtp_populate_input()
2128 static void wtp_touch_event(struct wtp_data *wd, in wtp_touch_event() argument
2137 slot = input_mt_get_slot_by_key(wd->input, touch_report->finger_id); in wtp_touch_event()
2139 input_mt_slot(wd->input, slot); in wtp_touch_event()
2140 input_mt_report_slot_state(wd->input, MT_TOOL_FINGER, in wtp_touch_event()
2143 input_event(wd->input, EV_ABS, ABS_MT_POSITION_X, in wtp_touch_event()
2145 input_event(wd->input, EV_ABS, ABS_MT_POSITION_Y, in wtp_touch_event()
2146 wd->flip_y ? wd->y_size - touch_report->y : in wtp_touch_event()
2148 input_event(wd->input, EV_ABS, ABS_MT_PRESSURE, in wtp_touch_event()
2156 struct wtp_data *wd = hidpp->private_data; in wtp_send_raw_xy_event() local
2160 wtp_touch_event(wd, &(raw->fingers[i])); in wtp_send_raw_xy_event()
2164 input_event(wd->input, EV_KEY, BTN_LEFT, raw->button); in wtp_send_raw_xy_event()
2167 input_mt_sync_frame(wd->input); in wtp_send_raw_xy_event()
2168 input_sync(wd->input); in wtp_send_raw_xy_event()
2174 struct wtp_data *wd = hidpp->private_data; in wtp_mouse_raw_xy_event() local
2200 .finger_count = wd->maxcontacts, in wtp_mouse_raw_xy_event()
2214 struct wtp_data *wd = hidpp->private_data; in wtp_raw_event() local
2218 if (!wd || !wd->input) in wtp_raw_event()
2229 input_event(wd->input, EV_KEY, BTN_LEFT, in wtp_raw_event()
2231 input_event(wd->input, EV_KEY, BTN_RIGHT, in wtp_raw_event()
2233 input_sync(wd->input); in wtp_raw_event()
2242 if ((report->fap.feature_index != wd->mt_feature_index) || in wtp_raw_event()
2256 struct wtp_data *wd = hidpp->private_data; in wtp_get_config() local
2262 &wd->mt_feature_index, &feature_type); in wtp_get_config()
2267 ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, in wtp_get_config()
2272 wd->x_size = raw_info.x_size; in wtp_get_config()
2273 wd->y_size = raw_info.y_size; in wtp_get_config()
2274 wd->maxcontacts = raw_info.maxcontacts; in wtp_get_config()
2275 wd->flip_y = raw_info.origin == TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT; in wtp_get_config()
2276 wd->resolution = raw_info.res; in wtp_get_config()
2277 if (!wd->resolution) in wtp_get_config()
2278 wd->resolution = WTP_MANUAL_RESOLUTION; in wtp_get_config()
2286 struct wtp_data *wd; in wtp_allocate() local
2288 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data), in wtp_allocate()
2290 if (!wd) in wtp_allocate()
2293 hidpp->private_data = wd; in wtp_allocate()
2301 struct wtp_data *wd = hidpp->private_data; in wtp_connect() local
2304 if (!wd->x_size) { in wtp_connect()
2312 return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, in wtp_connect()