public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
* calibrating a hid device
@ 2010-05-24 20:11 Rafi Rubin
       [not found] ` <4BFADD60.7020901-hkHJxBBPWjbG6jMu9gPlYQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Rafi Rubin @ 2010-05-24 20:11 UTC (permalink / raw)
  To: linux-input, Jiri Kosina, linux-usb; +Cc: Dmitry Torokhov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've written a calibration tool for my touch screen that works well from user
space (just sends a few commands over usb telling the digitizer to recalibrate
and reset itself).  I've been running that with the ntrig and usbhid modules
unloaded.

Now I'm trying to translate that to something in the kernel which I can run just
by poking a sysfs node.  However as I sort of expected, it doesn't actually work
quite right.  I've been seeing something like this:

- From user space:
  S Ii:3:002:2 -115:2 94 <
  C Ii:3:002:2 0:2 94 = 033fbc07 0000a014 f012ce01 68010100 000c0701 00000000
00fa0096 00000b00

kernel space:
  S Ii:3:002:2 -115:2 94 <
  C Ii:3:002:2 -2:2 0


What sort of calls should I wrap the calibration code with?

Also, the process seems to involve telling the digitizer to go off and run
calibration, and then interrupting it after a while.  I've been using a number
of microseconds dumped to the sysfs node for that.  Is there any harm in using
"msleep(val);"?


Once I get this sorted out, I'll clean up the code a bit and send in some
patches (and documentation for this and filtering).

Rafi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkv63V0ACgkQwuRiAT9o609I3gCgg9ZKGqwWFsZQa2wyX270JlGq
qj4An1w776oL0CiLEZPnKFwvIT0PDKWV
=dtIw
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-25 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-24 20:11 calibrating a hid device Rafi Rubin
     [not found] ` <4BFADD60.7020901-hkHJxBBPWjbG6jMu9gPlYQ@public.gmane.org>
2010-05-24 20:20   ` Jiri Kosina
2010-05-24 22:54     ` Rafi Rubin
2010-05-25  1:59       ` Alan Stern
2010-05-25 10:15         ` Rafi Rubin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox