Lines Matching refs:wd
2454 struct hidpp_ff_work_data *wd = container_of(w, struct hidpp_ff_work_data, work); in hidpp_ff_work_handler() local
2455 struct hidpp_ff_private_data *data = wd->data; in hidpp_ff_work_handler()
2461 switch (wd->effect_id) { in hidpp_ff_work_handler()
2463 wd->params[0] = data->slot_autocenter; in hidpp_ff_work_handler()
2470 wd->params[0] = hidpp_ff_find_effect(data, wd->effect_id); in hidpp_ff_work_handler()
2476 wd->command, wd->params, wd->size, &response); in hidpp_ff_work_handler()
2484 switch (wd->command) { in hidpp_ff_work_handler()
2488 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
2490 data->effect_ids[slot-1] = wd->effect_id; in hidpp_ff_work_handler()
2491 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
2497 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
2499 data->effect_ids[wd->params[0]-1] = -1; in hidpp_ff_work_handler()
2500 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
2505 data->gain = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
2508 data->range = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
2517 kfree(wd); in hidpp_ff_work_handler()
2522 struct hidpp_ff_work_data *wd = kzalloc(sizeof(*wd), GFP_KERNEL); in hidpp_ff_queue_work() local
2525 if (!wd) in hidpp_ff_queue_work()
2528 INIT_WORK(&wd->work, hidpp_ff_work_handler); in hidpp_ff_queue_work()
2530 wd->data = data; in hidpp_ff_queue_work()
2531 wd->effect_id = effect_id; in hidpp_ff_queue_work()
2532 wd->command = command; in hidpp_ff_queue_work()
2533 wd->size = size; in hidpp_ff_queue_work()
2534 memcpy(wd->params, params, size); in hidpp_ff_queue_work()
2537 queue_work(data->wq, &wd->work); in hidpp_ff_queue_work()
2921 struct wtp_data *wd = hidpp->private_data; in wtp_populate_input() local
2928 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, wd->x_size, 0, 0); in wtp_populate_input()
2929 input_abs_set_res(input_dev, ABS_MT_POSITION_X, wd->resolution); in wtp_populate_input()
2930 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, wd->y_size, 0, 0); in wtp_populate_input()
2931 input_abs_set_res(input_dev, ABS_MT_POSITION_Y, wd->resolution); in wtp_populate_input()
2943 input_mt_init_slots(input_dev, wd->maxcontacts, INPUT_MT_POINTER | in wtp_populate_input()
2950 struct wtp_data *wd = hidpp->private_data; in wtp_touch_event() local
2966 wd->flip_y ? wd->y_size - touch_report->y : in wtp_touch_event()
2993 struct wtp_data *wd = hidpp->private_data; in wtp_mouse_raw_xy_event() local
3019 .finger_count = wd->maxcontacts, in wtp_mouse_raw_xy_event()
3033 struct wtp_data *wd = hidpp->private_data; in wtp_raw_event() local
3037 if (!wd || !hidpp->input) in wtp_raw_event()
3061 if ((report->fap.feature_index != wd->mt_feature_index) || in wtp_raw_event()
3075 struct wtp_data *wd = hidpp->private_data; in wtp_get_config() local
3080 &wd->mt_feature_index); in wtp_get_config()
3085 ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, in wtp_get_config()
3090 wd->x_size = raw_info.x_size; in wtp_get_config()
3091 wd->y_size = raw_info.y_size; in wtp_get_config()
3092 wd->maxcontacts = raw_info.maxcontacts; in wtp_get_config()
3093 wd->flip_y = raw_info.origin == TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT; in wtp_get_config()
3094 wd->resolution = raw_info.res; in wtp_get_config()
3095 if (!wd->resolution) in wtp_get_config()
3096 wd->resolution = WTP_MANUAL_RESOLUTION; in wtp_get_config()
3104 struct wtp_data *wd; in wtp_allocate() local
3106 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data), in wtp_allocate()
3108 if (!wd) in wtp_allocate()
3111 hidpp->private_data = wd; in wtp_allocate()
3119 struct wtp_data *wd = hidpp->private_data; in wtp_connect() local
3122 if (!wd->x_size) { in wtp_connect()
3130 return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, in wtp_connect()