linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matteo Croce <technoboy85@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] usbtouchscreen: option to swap X and Y axes
Date: Sat, 20 Sep 2008 18:47:42 +0200	[thread overview]
Message-ID: <200809201847.42939.technoboy85@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0809200444570.27884@twin.jikos.cz>

On Saturday 20 September 2008 04:45:48 Jiri Kosina wrote:
> On Thu, 18 Sep 2008, Matteo Croce wrote:
> > Here there is a patch to invert the X and Y axes, as my controller swaps
> > it:
> >
> > Signed-off-by: Matteo Croce <matteo@openwrt.org>
> >
> > --- a/drivers/input/touchscreen/usbtouchscreen.c	2008-09-18
> > 18:50:44.294868149 +0200
> > +++ b/drivers/input/touchscreen/usbtouchscreen.c	2008-09-18
> > 18:50:44.226867816 +0200
> > @@ -56,8 +56,16 @@
> >  #define DRIVER_DESC		"USB Touchscreen Driver"
> >
> >  static int swap_xy;
> > +static int invert_x;
> > +static int invert_y;
> > +
> >  module_param(swap_xy, bool, 0644);
> > +module_param(invert_x, bool, 0644);
> > +module_param(invert_y, bool, 0644);
> > +
> >  MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped.");
> > +MODULE_PARM_DESC(invert_x, "If set X axe is inverted.");
> > +MODULE_PARM_DESC(invert_y, "If set Y axe is inverted.");
>
> If this is done just by certain devices, maybe VID/PID-based autodetection
> might be much more user friendly than using module parameter?

no, sometimes you have to swap just because you attached it in the wrong 
direction,
this is what appened to me, I have 50 swapped touchscreens, and i decided to 
hack
the driver instead to redo all the work

      reply	other threads:[~2008-09-20 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 17:16 [PATCH] usbtouchscreen: option to swap X and Y axes Matteo Croce
2008-09-20  2:45 ` Jiri Kosina
2008-09-20 16:47   ` Matteo Croce [this message]

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=200809201847.42939.technoboy85@gmail.com \
    --to=technoboy85@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).