hid-uclogic-params.c (606dadc1878f2fdeaa6e435c9c83f58a01387a7d) | hid-uclogic-params.c (8b013098be2c91ea5e15225c8b39ace08fdd7448) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * HID driver for UC-Logic devices not fully compliant with HID standard 4 * - tablet initialization and parameter retrieval 5 * 6 * Copyright (c) 2018 Nikolai Kondrashov 7 */ 8 --- 748 unchanged lines hidden (view full) --- 757 uclogic_rdesc_buttonpad_v2_size, 758 UCLOGIC_RDESC_BUTTONPAD_V2_ID); 759 if (rc != 0) { 760 hid_err(hdev, 761 "failed creating v2 buttonpad parameters: %d\n", 762 rc); 763 goto cleanup; 764 } | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * HID driver for UC-Logic devices not fully compliant with HID standard 4 * - tablet initialization and parameter retrieval 5 * 6 * Copyright (c) 2018 Nikolai Kondrashov 7 */ 8 --- 748 unchanged lines hidden (view full) --- 757 uclogic_rdesc_buttonpad_v2_size, 758 UCLOGIC_RDESC_BUTTONPAD_V2_ID); 759 if (rc != 0) { 760 hid_err(hdev, 761 "failed creating v2 buttonpad parameters: %d\n", 762 rc); 763 goto cleanup; 764 } |
765 /* Set bitmask marking frame reports in pen reports */ 766 p.pen_frame_flag = 0x20; | 765 /* Link frame button subreports from pen reports */ 766 p.pen.subreport_list[0].mask = 0x20; 767 p.pen.subreport_list[0].id = 768 UCLOGIC_RDESC_BUTTONPAD_V2_ID; |
767 goto output; 768 } 769 hid_dbg(hdev, "pen v2 parameters not found\n"); 770 } 771 772 /* Try to probe v1 pen parameters */ 773 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); 774 if (rc != 0) { --- 8 unchanged lines hidden (view full) --- 783 &found, hdev); 784 if (rc != 0) { 785 hid_err(hdev, "v1 buttonpad probing failed: %d\n", rc); 786 goto cleanup; 787 } 788 hid_dbg(hdev, "buttonpad v1 parameters%s found\n", 789 (found ? "" : " not")); 790 if (found) { | 769 goto output; 770 } 771 hid_dbg(hdev, "pen v2 parameters not found\n"); 772 } 773 774 /* Try to probe v1 pen parameters */ 775 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); 776 if (rc != 0) { --- 8 unchanged lines hidden (view full) --- 785 &found, hdev); 786 if (rc != 0) { 787 hid_err(hdev, "v1 buttonpad probing failed: %d\n", rc); 788 goto cleanup; 789 } 790 hid_dbg(hdev, "buttonpad v1 parameters%s found\n", 791 (found ? "" : " not")); 792 if (found) { |
791 /* Set bitmask marking frame reports */ 792 p.pen_frame_flag = 0x20; | 793 /* Link frame button subreports from pen reports */ 794 p.pen.subreport_list[0].mask = 0x20; 795 p.pen.subreport_list[0].id = 796 UCLOGIC_RDESC_BUTTONPAD_V1_ID; |
793 } 794 goto output; 795 } 796 hid_dbg(hdev, "pen v1 parameters not found\n"); 797 798 uclogic_params_init_invalid(&p); 799 800output: --- 322 unchanged lines hidden --- | 797 } 798 goto output; 799 } 800 hid_dbg(hdev, "pen v1 parameters not found\n"); 801 802 uclogic_params_init_invalid(&p); 803 804output: --- 322 unchanged lines hidden --- |