Patch "HID: Improve Windows Precision Touchpad detection." has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    HID: Improve Windows Precision Touchpad detection.

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-improve-windows-precision-touchpad-detection.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b32cca2e43a852527fbf578518bbe16f73217333
Author: Blaž Hrastnik <blaz@xxxxxxx>
Date:   Wed Nov 6 20:02:46 2019 +0900

    HID: Improve Windows Precision Touchpad detection.
    
    [ Upstream commit 2dbc6f113acd74c66b04bf49fb027efd830b1c5a ]
    
    Per Microsoft spec, usage 0xC5 (page 0xFF) returns a blob containing
    data used to verify the touchpad as a Windows Precision Touchpad.
    
       0x85, REPORTID_PTPHQA,    //    REPORT_ID (PTPHQA)
        0x09, 0xC5,              //    USAGE (Vendor Usage 0xC5)
        0x15, 0x00,              //    LOGICAL_MINIMUM (0)
        0x26, 0xff, 0x00,        //    LOGICAL_MAXIMUM (0xff)
        0x75, 0x08,              //    REPORT_SIZE (8)
        0x96, 0x00, 0x01,        //    REPORT_COUNT (0x100 (256))
        0xb1, 0x02,              //    FEATURE (Data,Var,Abs)
    
    However, some devices, namely Microsoft's Surface line of products
    instead implement a "segmented device certification report" (usage 0xC6)
    which returns the same report, but in smaller chunks.
    
        0x06, 0x00, 0xff,        //     USAGE_PAGE (Vendor Defined)
        0x85, REPORTID_PTPHQA,   //     REPORT_ID (PTPHQA)
        0x09, 0xC6,              //     USAGE (Vendor usage for segment #)
        0x25, 0x08,              //     LOGICAL_MAXIMUM (8)
        0x75, 0x08,              //     REPORT_SIZE (8)
        0x95, 0x01,              //     REPORT_COUNT (1)
        0xb1, 0x02,              //     FEATURE (Data,Var,Abs)
        0x09, 0xC7,              //     USAGE (Vendor Usage)
        0x26, 0xff, 0x00,        //     LOGICAL_MAXIMUM (0xff)
        0x95, 0x20,              //     REPORT_COUNT (32)
        0xb1, 0x02,              //     FEATURE (Data,Var,Abs)
    
    By expanding Win8 touchpad detection to also look for the segmented
    report, all Surface touchpads are now properly recognized by
    hid-multitouch.
    
    Signed-off-by: Blaž Hrastnik <blaz@xxxxxxx>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index c60bb6f8eceb..7cd945575463 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -761,6 +761,10 @@ static void hid_scan_feature_usage(struct hid_parser *parser, u32 usage)
 	if (usage == 0xff0000c5 && parser->global.report_count == 256 &&
 	    parser->global.report_size == 8)
 		parser->scan_flags |= HID_SCAN_FLAG_MT_WIN_8;
+
+	if (usage == 0xff0000c6 && parser->global.report_count == 1 &&
+	    parser->global.report_size == 8)
+		parser->scan_flags |= HID_SCAN_FLAG_MT_WIN_8;
 }
 
 static void hid_scan_collection(struct hid_parser *parser, unsigned type)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux