Lines Matching refs:wd
1937 struct hidpp_ff_work_data *wd = container_of(w, struct hidpp_ff_work_data, work); in hidpp_ff_work_handler() local
1938 struct hidpp_ff_private_data *data = wd->data; in hidpp_ff_work_handler()
1944 switch (wd->effect_id) { in hidpp_ff_work_handler()
1946 wd->params[0] = data->slot_autocenter; in hidpp_ff_work_handler()
1953 wd->params[0] = hidpp_ff_find_effect(data, wd->effect_id); in hidpp_ff_work_handler()
1959 wd->command, wd->params, wd->size, &response); in hidpp_ff_work_handler()
1967 switch (wd->command) { in hidpp_ff_work_handler()
1971 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
1973 data->effect_ids[slot-1] = wd->effect_id; in hidpp_ff_work_handler()
1974 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
1980 if (wd->effect_id >= 0) in hidpp_ff_work_handler()
1982 data->effect_ids[wd->params[0]-1] = -1; in hidpp_ff_work_handler()
1983 else if (wd->effect_id >= HIDPP_FF_EFFECTID_AUTOCENTER) in hidpp_ff_work_handler()
1988 data->gain = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
1991 data->range = (wd->params[0] << 8) + wd->params[1]; in hidpp_ff_work_handler()
2000 kfree(wd); in hidpp_ff_work_handler()
2005 struct hidpp_ff_work_data *wd = kzalloc(sizeof(*wd), GFP_KERNEL); in hidpp_ff_queue_work() local
2008 if (!wd) in hidpp_ff_queue_work()
2011 INIT_WORK(&wd->work, hidpp_ff_work_handler); in hidpp_ff_queue_work()
2013 wd->data = data; in hidpp_ff_queue_work()
2014 wd->effect_id = effect_id; in hidpp_ff_queue_work()
2015 wd->command = command; in hidpp_ff_queue_work()
2016 wd->size = size; in hidpp_ff_queue_work()
2017 memcpy(wd->params, params, size); in hidpp_ff_queue_work()
2020 queue_work(data->wq, &wd->work); in hidpp_ff_queue_work()
2398 struct wtp_data *wd = hidpp->private_data; in wtp_populate_input() local
2405 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, wd->x_size, 0, 0); in wtp_populate_input()
2406 input_abs_set_res(input_dev, ABS_MT_POSITION_X, wd->resolution); in wtp_populate_input()
2407 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, wd->y_size, 0, 0); in wtp_populate_input()
2408 input_abs_set_res(input_dev, ABS_MT_POSITION_Y, wd->resolution); in wtp_populate_input()
2420 input_mt_init_slots(input_dev, wd->maxcontacts, INPUT_MT_POINTER | in wtp_populate_input()
2427 struct wtp_data *wd = hidpp->private_data; in wtp_touch_event() local
2443 wd->flip_y ? wd->y_size - touch_report->y : in wtp_touch_event()
2470 struct wtp_data *wd = hidpp->private_data; in wtp_mouse_raw_xy_event() local
2496 .finger_count = wd->maxcontacts, in wtp_mouse_raw_xy_event()
2510 struct wtp_data *wd = hidpp->private_data; in wtp_raw_event() local
2514 if (!wd || !hidpp->input) in wtp_raw_event()
2538 if ((report->fap.feature_index != wd->mt_feature_index) || in wtp_raw_event()
2552 struct wtp_data *wd = hidpp->private_data; in wtp_get_config() local
2558 &wd->mt_feature_index, &feature_type); in wtp_get_config()
2563 ret = hidpp_touchpad_get_raw_info(hidpp, wd->mt_feature_index, in wtp_get_config()
2568 wd->x_size = raw_info.x_size; in wtp_get_config()
2569 wd->y_size = raw_info.y_size; in wtp_get_config()
2570 wd->maxcontacts = raw_info.maxcontacts; in wtp_get_config()
2571 wd->flip_y = raw_info.origin == TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT; in wtp_get_config()
2572 wd->resolution = raw_info.res; in wtp_get_config()
2573 if (!wd->resolution) in wtp_get_config()
2574 wd->resolution = WTP_MANUAL_RESOLUTION; in wtp_get_config()
2582 struct wtp_data *wd; in wtp_allocate() local
2584 wd = devm_kzalloc(&hdev->dev, sizeof(struct wtp_data), in wtp_allocate()
2586 if (!wd) in wtp_allocate()
2589 hidpp->private_data = wd; in wtp_allocate()
2597 struct wtp_data *wd = hidpp->private_data; in wtp_connect() local
2600 if (!wd->x_size) { in wtp_connect()
2608 return hidpp_touchpad_set_raw_report_state(hidpp, wd->mt_feature_index, in wtp_connect()