The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Daniel Ritz <daniel.ritz-ml@swissonline.ch>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: daniel.ritz@gmx.ch, linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH] usb: generic calibration support
Date: Fri, 17 Nov 2006 00:24:32 +0100	[thread overview]
Message-ID: <200611170024.33248.daniel.ritz-ml@swissonline.ch> (raw)
In-Reply-To: <200611161125.38901.hs4233@mail.mn-solutions.de>

hi

On Thursday 16 November 2006 11.25, Holger Schurig wrote:
> From: Holger Schurig <hs4233@mail.mn-solutions.de>
> 
> Generic calibration support for usbtouchscreen.
> 
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
> 
> ---
> 
> With build-in calibration support, the "swap_xy" kernel parameter
> vanishes and usbtouchscreen instead gains a new kernel-parameter
> which holds 7 integers.
> 
> This is used to calibrate the resulting output of the driver. Let
> x_o and y_o be the original x,y coordinate, as reported from the
> device. Then x_r,y_r (the x,y coordinate reported to the input event
> subsystem) are:
> 
>     x_r = ( a*x_o + b*y_o + c ) / s
>     y_r = ( c*x_o + d*y_o + e ) / s
> 
> The default values for (a,b,c,d,e,s) are (1,0,0,0,1,0,1). To
> simulate swap_xy, one would set them to (0,1,0,1,0,0,1). Once can
> also use swap_x or swap_y alone, or define other, linear
> transpositions. The algorithm used is the same as in Qt/Embedded
> 3.x for the QWSCalibratedMouseHandler.
> 
> This interface allows re-calibration at runtime, without
> restarting the X-Server or any other event consumer.
> 
> 
> Please review this patch and schedule it for inclusion once 
> 2.6.19 comes out.

sorry, but i have to give you a big NACK on that one:
- no more modparam: it should be per-device sysfs attributes
  (swap_xy is basically only for touchkitusb compatibility and shoud be
   converted to per-device sysfs attribute as well. i just never got to
   do it)
- calibration can be handled in userspace just fine
- even for in-kernel it's in the wrong place. there are other devices
  that report raw absolute data...so it would belong to the input layer

Cc'ing Dmitry Torokhov as he might have some comments about calibration
support in the input layer.

thanks, rgds
-daniel

  reply	other threads:[~2006-11-16 23:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 10:25 [PATCH] usb: generic calibration support Holger Schurig
2006-11-16 23:24 ` Daniel Ritz [this message]
2006-11-17  8:12   ` Holger Schurig
2006-11-17 14:16     ` Dmitry Torokhov
2006-11-17 14:53       ` Holger Schurig
2006-11-17 15:22         ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611170024.33248.daniel.ritz-ml@swissonline.ch \
    --to=daniel.ritz-ml@swissonline.ch \
    --cc=daniel.ritz@gmx.ch \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox