Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 20:54:55 +0000 (UTC)
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324772 - head/sys/dev/usb/input
Message-ID:  <201710192054.v9JKstJo050629@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wulf
Date: Thu Oct 19 20:54:55 2017
New Revision: 324772
URL: https://svnweb.freebsd.org/changeset/base/324772

Log:
  ums(4): Unreverse evdev Tilt-axis reporting to match Linux.
  
  sysmouse tilt to button mapping remained unchanged.
  
  Reviewed by:		hselasky
  Approved by:		gonzo (mentor)
  MFC after:		2 weeks
  Differential Revision:	https://reviews.freebsd.org/D12671

Modified:
  head/sys/dev/usb/input/ums.c

Modified: head/sys/dev/usb/input/ums.c
==============================================================================
--- head/sys/dev/usb/input/ums.c	Thu Oct 19 20:52:17 2017	(r324771)
+++ head/sys/dev/usb/input/ums.c	Thu Oct 19 20:54:55 2017	(r324772)
@@ -296,7 +296,7 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t e
 
 		if ((info->sc_flags & UMS_FLAG_T_AXIS) &&
 		    (id == info->sc_iid_t)) {
-			dt -= hid_get_data(buf, len, &info->sc_loc_t);
+			dt += hid_get_data(buf, len, &info->sc_loc_t);
 			/* T-axis is translated into button presses */
 			buttons_found |= (1UL << 5) | (1UL << 6);
 		}
@@ -332,10 +332,10 @@ ums_intr_callback(struct usb_xfer *xfer, usb_error_t e
 			/* translate T-axis into button presses until further */
 			if (dt > 0) {
 				ums_put_queue(sc, 0, 0, 0, 0, buttons);
-				buttons |= 1UL << 5;
+				buttons |= 1UL << 6;
 			} else if (dt < 0) {
 				ums_put_queue(sc, 0, 0, 0, 0, buttons);
-				buttons |= 1UL << 6;
+				buttons |= 1UL << 5;
 			}
 
 			sc->sc_status.button = buttons;



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