Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Enable finger touch panel of HP Spectre x360 13-inch...



details:   https://anonhg.NetBSD.org/src/rev/891bde057c82
branches:  trunk
changeset: 452481:891bde057c82
user:      ryoon <ryoon%NetBSD.org@localhost>
date:      Tue Jul 09 12:56:30 2019 +0000

description:
Enable finger touch panel of HP Spectre x360 13-inch ae019TU

diffstat:

 sys/dev/hid/hidms.c |  9 ++++++---
 sys/dev/i2c/ims.c   |  8 ++++++--
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r 7c7b82beafb8 -r 891bde057c82 sys/dev/hid/hidms.c
--- a/sys/dev/hid/hidms.c       Tue Jul 09 12:55:45 2019 +0000
+++ b/sys/dev/hid/hidms.c       Tue Jul 09 12:56:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $  */
+/*     $NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $  */
 
 /*
  * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.3 2019/07/09 12:52:51 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidms.c,v 1.4 2019/07/09 12:56:30 ryoon Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,8 +81,11 @@
        bool isdigitizer;
        int i, hl;
 
+       /* Sync with ims_match() */
        isdigitizer = hid_is_collection(desc, size, id,
-           HID_USAGE2(HUP_DIGITIZERS, 0x0002));
+           HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)) ||
+            hid_is_collection(desc, size, id,
+               HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCH_SCREEN));
 
        if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
               id, hid_input, &ms->hidms_loc_x, &flags)) {
diff -r 7c7b82beafb8 -r 891bde057c82 sys/dev/i2c/ims.c
--- a/sys/dev/i2c/ims.c Tue Jul 09 12:55:45 2019 +0000
+++ b/sys/dev/i2c/ims.c Tue Jul 09 12:56:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $ */
+/* $NetBSD: ims.c,v 1.3 2019/07/09 12:56:30 ryoon Exp $ */
 /* $OpenBSD ims.c,v 1.1 2016/01/12 01:11:15 jcs Exp $ */
 
 /*
@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.2 2019/07/09 12:52:51 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ims.c,v 1.3 2019/07/09 12:56:30 ryoon Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,6 +81,10 @@
            HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)))
                return (IMATCH_IFACECLASS);
 
+       if (hid_is_collection(desc, size, iha->reportid,
+           HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCH_SCREEN)))
+               return (IMATCH_IFACECLASS);
+
        return (IMATCH_NONE);
 }
 



Home | Main Index | Thread Index | Old Index