Lines Matching defs:hid_data

69 	if (!wacom_wac->hid_data.sense_state) {
1348 if (wacom->hid_data.time_delayed)
1349 time_interval = ktime_get() - wacom->hid_data.time_delayed;
1351 wacom->hid_data.time_delayed = time_packet_received;
1374 wacom->hid_data.time_delayed = 0;
1983 wacom_wac->hid_data.bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
1987 wacom_wac->hid_data.battery_capacity = value;
1988 wacom_wac->hid_data.bat_connected = 1;
1989 wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO;
1995 wacom_wac->hid_data.battery_capacity = value;
1996 wacom_wac->hid_data.bat_connected = 1;
1997 wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO;
2001 wacom_wac->hid_data.bat_charging = value;
2002 wacom_wac->hid_data.ps_connected = value;
2003 wacom_wac->hid_data.bat_connected = 1;
2004 wacom_wac->hid_data.bat_status = WACOM_POWER_SUPPLY_STATUS_AUTO;
2022 int status = wacom_wac->hid_data.bat_status;
2023 int capacity = wacom_wac->hid_data.battery_capacity;
2024 bool charging = wacom_wac->hid_data.bat_charging;
2025 bool connected = wacom_wac->hid_data.bat_connected;
2026 bool powered = wacom_wac->hid_data.ps_connected;
2161 wacom_wac->hid_data.inrange_state |= value;
2243 wacom_wac->hid_data.pad_input_event_flag = true;
2253 wacom_wac->hid_data.inrange_state = 0;
2262 bool active = wacom_wac->hid_data.inrange_state != 0;
2265 if (wacom_wac->hid_data.pad_input_event_flag) {
2269 wacom_wac->hid_data.pad_input_event_flag = false;
2279 wacom_wac->hid_data.barrelswitch &&
2280 wacom_wac->hid_data.barrelswitch2 &&
2281 wacom_wac->hid_data.serialhi &&
2282 !wacom_wac->hid_data.barrelswitch3) {
2336 wacom_wac->hid_data.barrelswitch = true;
2341 wacom_wac->hid_data.barrelswitch2 = true;
2357 wacom_wac->hid_data.serialhi = true;
2366 wacom_wac->hid_data.barrelswitch3 = true;
2396 wacom_wac->hid_data.inrange_state = value;
2398 wacom_wac->hid_data.sense_state = value;
2401 wacom_wac->hid_data.invert_state = value;
2405 wacom_wac->hid_data.tipswitch |= value;
2408 wacom_wac->hid_data.barrelswitch = value;
2411 wacom_wac->hid_data.barrelswitch2 = value;
2431 wacom_wac->hid_data.sense_state = value;
2491 wacom_wac->hid_data.barrelswitch3 = value;
2494 if (wacom_wac->hid_data.sequence_number != value)
2495 hid_warn(hdev, "Dropped %hu packets", (unsigned short)(value - wacom_wac->hid_data.sequence_number));
2496 wacom_wac->hid_data.sequence_number = value + 1;
2507 if (wacom_wac->hid_data.inrange_state)
2509 else if (wacom_wac->shared->stylus_in_proximity && !wacom_wac->hid_data.sense_state)
2529 bool range = wacom_wac->hid_data.inrange_state;
2530 bool sense = wacom_wac->hid_data.sense_state;
2537 if (wacom_wac->hid_data.invert_state)
2551 int sw_state = wacom_wac->hid_data.barrelswitch |
2552 (wacom_wac->hid_data.barrelswitch2 << 1);
2553 wacom_wac->hid_data.barrelswitch = sw_state == 1;
2554 wacom_wac->hid_data.barrelswitch2 = sw_state == 2;
2555 wacom_wac->hid_data.barrelswitch3 = sw_state == 3;
2557 input_report_key(input, BTN_STYLUS, wacom_wac->hid_data.barrelswitch);
2558 input_report_key(input, BTN_STYLUS2, wacom_wac->hid_data.barrelswitch2);
2559 input_report_key(input, BTN_STYLUS3, wacom_wac->hid_data.barrelswitch3);
2574 wacom_wac->hid_data.tipswitch);
2588 wacom_wac->hid_data.tipswitch = false;
2634 wacom_wac->hid_data.cc_report = field->report->id;
2635 wacom_wac->hid_data.cc_index = field->index;
2636 wacom_wac->hid_data.cc_value_index = usage->usage_index;
2657 struct hid_data *hid_data = &wacom_wac->hid_data;
2659 bool touch_down = hid_data->tipswitch && hid_data->confidence;
2668 wacom_wac->hid_data.num_received++;
2669 if (wacom_wac->hid_data.num_received > wacom_wac->hid_data.num_expected)
2675 slot = input_mt_get_slot_by_key(input, hid_data->id);
2697 hid_data->x);
2699 hid_data->y);
2702 input_report_abs(input, ABS_MT_TOUCH_MAJOR, max(hid_data->width, hid_data->height));
2703 input_report_abs(input, ABS_MT_TOUCH_MINOR, min(hid_data->width, hid_data->height));
2704 if (hid_data->width != hid_data->height)
2705 input_report_abs(input, ABS_MT_ORIENTATION, hid_data->width <= hid_data->height ? 0 : 1);
2726 wacom_wac->hid_data.confidence = value;
2729 wacom_wac->hid_data.x = value;
2732 wacom_wac->hid_data.y = value;
2735 wacom_wac->hid_data.width = value;
2738 wacom_wac->hid_data.height = value;
2741 wacom_wac->hid_data.id = value;
2744 wacom_wac->hid_data.tipswitch = value;
2760 if (equivalent_usage == wacom_wac->hid_data.last_slot_field)
2770 struct hid_data* hid_data = &wacom_wac->hid_data;
2778 hid_data->confidence = true;
2780 hid_data->cc_report = 0;
2781 hid_data->cc_index = -1;
2782 hid_data->cc_value_index = -1;
2802 hid_data->last_slot_field = equivalent_usage;
2805 hid_data->cc_report = report->id;
2806 hid_data->cc_index = i;
2807 hid_data->cc_value_index = j;
2813 if (hid_data->cc_report != 0 &&
2814 hid_data->cc_index >= 0) {
2815 struct hid_field *field = report->field[hid_data->cc_index];
2816 int value = field->value[hid_data->cc_value_index];
2818 hid_data->num_expected = value;
2819 hid_data->num_received = 0;
2823 hid_data->num_expected = wacom_wac->features.touch_max;
2824 hid_data->num_received = 0;
2837 if (wacom_wac->hid_data.num_expected == 0)
2844 if (wacom_wac->hid_data.num_received < wacom_wac->hid_data.num_expected)
2851 wacom_wac->hid_data.num_received = 0;
2852 wacom_wac->hid_data.num_expected = 0;