Module Name: src Committed By: ryoon Date: Tue Jul 9 12:56:30 UTC 2019
Modified Files: src/sys/dev/hid: hidms.c src/sys/dev/i2c: ims.c Log Message: Enable finger touch panel of HP Spectre x360 13-inch ae019TU To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidms.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ims.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/hid/hidms.c diff -u src/sys/dev/hid/hidms.c:1.3 src/sys/dev/hid/hidms.c:1.4 --- src/sys/dev/hid/hidms.c:1.3 Tue Jul 9 12:52:51 2019 +++ src/sys/dev/hid/hidms.c Tue Jul 9 12:56:30 2019 @@ -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 @@ hidms_setup(device_t self, struct hidms 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)) { Index: src/sys/dev/i2c/ims.c diff -u src/sys/dev/i2c/ims.c:1.2 src/sys/dev/i2c/ims.c:1.3 --- src/sys/dev/i2c/ims.c:1.2 Tue Jul 9 12:52:51 2019 +++ src/sys/dev/i2c/ims.c Tue Jul 9 12:56:30 2019 @@ -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 @@ ims_match(device_t parent, cfdata_t matc 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); }