Lines Matching refs:wd
2202 struct hidpp_ff_work_data *wd = container_of(w, struct hidpp_ff_work_data, work); in hidpp_ff_work_handler() local
2203 struct hidpp_ff_private_data *data = wd->data; in hidpp_ff_work_handler()
2209 switch (wd->effect_id) { in hidpp_ff_work_handler()
2211 wd->params[0] = data->slot_autocenter; in hidpp_ff_work_handler()
2218 wd->params[0] = hidpp_ff_find_effect(data, wd->effect_id); in hidpp_ff_work_handler()
2224 wd->command, wd->params, wd->size, &response); in hidpp_ff_work_handler()
2232 switch (wd->command) { in hidpp_ff_work_handler()
2236 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
2238 data->effect_ids[slot-1] = wd->effect_id; in hidpp_ff_work_handler()
2239 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
2245 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
2247 data->effect_ids[wd->params[0]-1] = -1; in hidpp_ff_work_handler()
2248 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
2253 data->gain = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
2256 data->range = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
2265 kfree(wd); in hidpp_ff_work_handler()
2270 struct hidpp_ff_work_data *wd = kzalloc(sizeof(*wd), GFP_KERNEL); in hidpp_ff_queue_work() local
2273 if (!wd) in hidpp_ff_queue_work()
2276 INIT_WORK(&wd->work, hidpp_ff_work_handler); in hidpp_ff_queue_work()
2278 wd->data = data; in hidpp_ff_queue_work()
2279 wd->effect_id = effect_id; in hidpp_ff_queue_work()
2280 wd->command = command; in hidpp_ff_queue_work()
2281 wd->size = size; in hidpp_ff_queue_work()
2282 memcpy(wd->params, params, size); in hidpp_ff_queue_work()
2285 queue_work(data->wq, &wd->work); in hidpp_ff_queue_work()
2662 struct wtp_data *wd = hidpp->private_data; in wtp_populate_input() local
2669 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, wd->x_size, 0, 0); in wtp_populate_input()
2670 input_abs_set_res(input_dev, ABS_MT_POSITION_X, wd->resolution); in wtp_populate_input()
2671 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, wd->y_size, 0, 0); in wtp_populate_input()
2672 input_abs_set_res(input_dev, ABS_MT_POSITION_Y, wd->resolution); in wtp_populate_input()
2684 input_mt_init_slots(input_dev, wd->maxcontacts, INPUT_MT_POINTER | in wtp_populate_input()
2691 struct wtp_data *wd = hidpp->private_data; in wtp_touch_event() local
2707 wd->flip_y ? wd->y_size - touch_report->y : in wtp_touch_event()
2734 struct wtp_data *wd = hidpp->private_data; in wtp_mouse_raw_xy_event() local
2760 .finger_count = wd->maxcontacts, in wtp_mouse_raw_xy_event()
2774 struct wtp_data *wd = hidpp->private_data; in wtp_raw_event() local
2778 if (!wd || !hidpp->input) in wtp_raw_event()
2802 if ((report->fap.feature_index != wd->mt_feature_index) || in wtp_raw_event()
2816 struct wtp_data *wd = hidpp->private_data; in wtp_get_config() local
2822 &wd->mt_feature_index, &feature_type); in wtp_get_config()
2827 ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, in wtp_get_config()
2832 wd->x_size = raw_info.x_size; in wtp_get_config()
2833 wd->y_size = raw_info.y_size; in wtp_get_config()
2834 wd->maxcontacts = raw_info.maxcontacts; in wtp_get_config()
2835 wd->flip_y = raw_info.origin == TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT; in wtp_get_config()
2836 wd->resolution = raw_info.res; in wtp_get_config()
2837 if (!wd->resolution) in wtp_get_config()
2838 wd->resolution = WTP_MANUAL_RESOLUTION; in wtp_get_config()
2846 struct wtp_data *wd; in wtp_allocate() local
2848 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data), in wtp_allocate()
2850 if (!wd) in wtp_allocate()
2853 hidpp->private_data = wd; in wtp_allocate()
2861 struct wtp_data *wd = hidpp->private_data; in wtp_connect() local
2864 if (!wd->x_size) { in wtp_connect()
2872 return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, in wtp_connect()