Subject: Re: making tpcalib MI
To: Ty Sarna <>
From: Matthew Orgass <>
List: tech-kern
Date: 05/25/2004 21:29:30
On 2004-05-25 wrote:

> I've written a driver for a USB touchpanel controller, which needs
> calibration support.  For the kernel part of this, there is some
> nice-looking code in sys/dev/hpc that is almost MI. The only problem
> area is the WSMOUSEIO_GETID ioctl implementation, which relies on hpc
> "platid" stuff.

  IMO, GETID should go in the individual drivers since it has nothing to
do with calibration in particular.  I don't know if there is another
convienient place to share the code, but copy&paste should be fine.

> For the userland part, tpctl is a much bigger challenge, since it
> depends on the hpcfb interface.  Possible solutions include a
> limited-function non-calibrating version of tpctl on non-hpcfb
> platforms, so that /etc/rc.d/tpctl can still be used once inital
> calibration is done, or have it call out to an external (X-based)
> program if hpcfb isn't supported, or just do a completely different
> X-based program, or...

  I think it is only hpcfb specific by using the extended configuration
info that is needed for hpc frame buffers.  For many other frame buffers
it should be possible to fill in the values from the info in
WSDISPLAYIO_GINFO.  At some point, HPCFBIO_GCONF or something like it
should be made the general frame buffer configuration info ioctl, IMO.
An additional X utility would be good too.  It might also be reasonable to
do a text-only "touch what you want to be the corners" mode.

Matthew Orgass