Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 2021 22:26:14 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a711310d2db5 - stable/13 - hid: Add extra constant to units of measurement
Message-ID:  <202108232226.17NMQEIt014732@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=a711310d2db5549dce218960e5f405d8fe13d66c

commit a711310d2db5549dce218960e5f405d8fe13d66c
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-08-16 20:13:24 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-08-23 22:20:30 +0000

    hid: Add extra constant to units of measurement
    
    Some devices like eGalax touchscreens use value of 0x33 instead of 0x13
    for inches as unit of measure.
    
    Reported by:    Mark Kane <mark_AT_kane_DOT_mn>
    
    (cherry picked from commit be75951af1ec2d69d34a8701700b9bfd2a50679e)
---
 sys/dev/hid/hid.c | 1 +
 sys/dev/hid/hid.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sys/dev/hid/hid.c b/sys/dev/hid/hid.c
index 699bfa4a8bb3..f201182ac20f 100644
--- a/sys/dev/hid/hid.c
+++ b/sys/dev/hid/hid.c
@@ -856,6 +856,7 @@ hid_item_resolution(struct hid_item *hi)
 		divisor = 10;
 		break;
 	case HUM_INCH:
+	case HUM_INCH_EGALAX:
 		multiplier = 10;
 		divisor = 254;
 		break;
diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h
index 37ab8c9cdf7e..f0311bae689c 100644
--- a/sys/dev/hid/hid.h
+++ b/sys/dev/hid/hid.h
@@ -185,6 +185,7 @@
 #define	HUM_CENTIMETER	0x11
 #define	HUM_RADIAN	0x12
 #define	HUM_INCH	0x13
+#define	HUM_INCH_EGALAX	0x33
 #define	HUM_DEGREE	0x14
 
 #if defined(_KERNEL) || defined(_STANDALONE)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108232226.17NMQEIt014732>