NetBSD-Users archive

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

Re: touch screen support



On Mon, 2023-05-29 at 08:39 +0000, Michael van Elst wrote:
> dtyson%anduin.org.uk@localhost (Dave Tyson) writes:
> 
> > I guess these touch screens need some calibration to set the x/y
> > bounds
> > and maybe some mods to the driver. Can anyone hit me with a cluebat
> > as
> > to where to start...
> 
> There are lots touchpads that need a more relaxed interpretation of
> their
> capabilities. The uts driver already ignores the missing
> Digitizer:In_Range
> HID usage for Elan touchpads.
> 
> The FreeBSD driver (wmt(4)) seems to ignore it completely. I'm not
> sure if that is sufficient (Linux applies a ton of quirks to the
> different touch screen models).
> 
> For a start it might be sufficient to go the FreeBSD way:
> 
> Index: uts.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/usb/uts.c,v
> retrieving revision 1.16
> diff -p -u -r1.16 uts.c
> --- uts.c       10 May 2023 00:12:44 -0000      1.16
> +++ uts.c       29 May 2023 08:38:50 -0000
> @@ -215,7 +215,7 @@ uts_attach(device_t parent, device_t sel
>                 } else {
>                         aprint_error_dev(sc->sc_dev,
>                             "touchscreen has no range report\n");
> -                       return;
> +                       // return;
>                 }
>         }
> 

I have filed a bug report kern/57446 against the problem. Your patch
worked fine. On the amd64 system the touch screen attached correctly
and appears to work perfectly. In fact the only downside is that the
usb mouse seems to work a bit slower. I suspect a minor tweak to the x
config will fix this. I am quite impressed as to how well the touch
screen performs...

On the RPI system the touch screen attaches OK and X sees a wsmouse,
however I cannot seem to select windows on the desktop or move the
cursor. I don't have a keyboard attached (so using a serial console)
which makes testing a bit more difficult. Hopefully I will soon get an
adaptor to hook the touch screen to a usb hub so I can do more testing.

Cheers,
Dave


Home | Main Index | Thread Index | Old Index