kern/183032: uep driver not working with eGalax touchcontroller

Brock Williams brock at cottonwoodcomputer.com
Thu Jan 23 00:00:03 UTC 2014


The following reply was made to PR kern/183032; it has been noted by GNATS.

From: Brock Williams <brock at cottonwoodcomputer.com>
To: "bug-followup at FreeBSD.org" <bug-followup at FreeBSD.org>
Cc:  
Subject: Re: kern/183032: uep driver not working with eGalax touchcontroller
Date: Wed, 22 Jan 2014 16:40:12 -0700

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --DV5GdWiT519VmvlJfxGD7BNHPasDbAB27
 Content-Type: multipart/mixed;
  boundary="------------010804040602030505040406"
 
 This is a multi-part message in MIME format.
 --------------010804040602030505040406
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Attached is a simple patch I made to the xf86-input-mouse port to
 implement the SwapXY option.  This makes my eGalax touchscreen usable.
 
 I'm sure there is a more elegant way to do this but it works for our
 needs.
 
 Brock
 --=20
 Brock Williams  brock at cottonwoodcomputer.com
 Cottonwood Computer Solutions, Inc.
 www.cottonwoodcomputer.com      406-896-4910
 
 --------------010804040602030505040406
 Content-Type: text/plain; charset=UTF-8;
  name="patch-src-bsd_mouse.c-swapxy"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
  filename="patch-src-bsd_mouse.c-swapxy"
 
 --- src/bsd_mouse.c	2014-01-22 16:32:09.000000000 -0700
 +++ /home/ccs/bsd_mouse.c	2014-01-22 16:32:36.000000000 -0700
 @@ -916,7 +916,7 @@
      hid_item_t h;
      struct UsbMseAcol *acol;
      struct UsbMseLcol *lcol;
 -    int mdepth, rsize, *rsizep, acolused, lcolused, used;
 +    int mdepth, rsize, *rsizep, acolused, lcolused, used, swapxy;
 =20
      pUsbMse =3D malloc(sizeof(UsbMseRec));
      if (pUsbMse =3D=3D NULL) {
 @@ -939,6 +939,9 @@
              return FALSE;
          }
      }
 +
 +    swapxy=3Dxf86SetBoolOption(pInfo->options, "SwapXY", 0);
 +
      /* Get USB informations */
      reportDesc =3D hid_get_report_desc(pInfo->fd);
      mdepth =3D 0;
 @@ -991,7 +994,7 @@
  	    if (mdepth =3D=3D 0)
  		break;
  	    used =3D 1;
 -	    if (h.usage =3D=3D 0x00010030) { /* X */
 +	    if ( (swapxy=3D=3D0 && h.usage =3D=3D 0x00010030) || (swapxy=3D=3D1=
  && h.usage=3D=3D0x00010031)) { /* X */
  		lcol->loc_x =3D h;
  		if ((h.flags & 0x04) =3D=3D 0) {
  		    if (acol->xmin =3D=3D acol->xmax) {
 @@ -1002,7 +1005,7 @@
  			acol->xmax =3D max(acol->xmax, h.logical_maximum);
  		    }
  		}
 -	    } else if (h.usage =3D=3D 0x00010031) { /* Y */
 +	    } else if ( (swapxy=3D=3D0 && h.usage =3D=3D 0x00010031) || (swapxy=
 =3D=3D1 && h.usage=3D=3D0x00010030)) { /* Y */
  		lcol->loc_y =3D h;
  		if ((h.flags & 0x04) =3D=3D 0) {
  		    if (acol->ymin =3D=3D acol->ymax) {
 
 --------------010804040602030505040406--
 
 --DV5GdWiT519VmvlJfxGD7BNHPasDbAB27
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAEBAgAGBQJS4FbcAAoJEAej1IqUgufIiIEH/jALDvb5LmxZjSEKukq5XJGr
 7WquUoadKa5uq8qEi3StpgM/d9X4roSyY17q8EQzhNhaJrJHDIc8Ke3Zg83Uwatw
 fsZ6gcKh5Y8T5PUrD3j8dJJXu7EdWw32op17K3I82NP2LEeNZ+k2QuL8QHpJne7s
 pDQ6zUnkadrSBDuT/qX8jza+fsEXOTAudla1zYrxdJ2zk//1fJ2GV52RACXnvfCS
 CIFCPQmhAdkEvCsv9/ouxu0EO6JOPWEjrDPUCQClZ4qJS5WWF04LhAs1v3uXI9lR
 TnaOXalGBbVYy64rKNe21ehcF+2E22HD9W4Yw1RzmIXDHdponuHmxX/AWHaCwoE=
 =9PYY
 -----END PGP SIGNATURE-----
 
 --DV5GdWiT519VmvlJfxGD7BNHPasDbAB27--


More information about the freebsd-bugs mailing list