All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Lanslott Gish <lanslott.gish@gmail.com>
Cc: Daniel Ritz <daniel.ritz-ml@swissonline.ch>,
	Greg KH <greg@kroah.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-usb <linux-usb-devel@lists.sourceforge.net>,
	tejohnson@yahoo.com, hc@mivu.no, vojtech@suse.cz
Subject: Re: [RFC][PATCH] USB touch screen driver, all-in-one
Date: Tue, 14 Mar 2006 11:38:54 +0100	[thread overview]
Message-ID: <20060314103854.GC32065@lug-owl.de> (raw)
In-Reply-To: <38c09b90603131710p7932c12qf6e8602b9b0b59c8@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

On Tue, 2006-03-14 09:10:13 +0800, Lanslott Gish <lanslott.gish@gmail.com> wrote:
> i fixed some codes and add swap_x & swap_y functions.
> and test your patch passed for my touchset hrdware.
> here is the patch only for your usbtouchscreen.c
> could you help to apply this?
> thank you.
> 
> Regards,
> 
> Lanslott Gish
> 
> ==============================================================
> --- linux-2.6.16-rc6.patched/drivers/usb/input/usbtouchscreen.c
> +++ linux-2.6.16-rc6/drivers/usb/input/usbtouchscreen.c
> @@ -224,13 +224,24 @@
>   * PanJit Part
>   */
>  #ifdef CONFIG_USB_TOUCHSCREEN_PANJIT
> +
> +static int swap_x;
> +module_param(swap_x, bool, 0644);
> +MODULE_PARM_DESC(swap_x, "If set X axe is swapped before XY swapped.");
> +static int swap_y;
> +module_param(swap_y, bool, 0644);
> +MODULE_PARM_DESC(swap_y, "If set Y axe is swapped before XY swapped.");
> +
>  static int panjit_read_data(char *pkt, int *x, int *y, int *touch, int *press)
>  {
> -       *x = pkt[1] | (pkt[2] << 8);
> -       *y = pkt[3] | (pkt[4] << 8);
> +       *x = (pkt[1] & 0x0F) | ((pkt[2]& 0xFF) << 8);
> +       *y = (pkt[3] & 0x0F) | ((pkt[4]& 0xFF) << 8);
>         *touch = (pkt[0] & 0x01) ? 1 : 0;
> 
> -       return 1;
> +	if(swap_x) *x = *x ^ 0x0FFF;
> +	if(swap_y) *y = *y ^ 0x0FFF;
> +
> + 	return 1;
>  }
>  #endif
> 

Um, I think it's generally a good idea to allow this, but I'd say this
should go into the common code part using the pre-known number range.

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-03-14 10:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-10  9:24 [PATCH] Try to add support for universal USB touchscreen device, and WISH for help~ Lanslott Gish
2006-03-11 20:55 ` [RFC][PATCH] USB touch screen driver, all-in-one Daniel Ritz
2006-03-12  1:31   ` Dmitry Torokhov
2006-03-13  1:01   ` Lanslott Gish
2006-03-14  1:10     ` Lanslott Gish
2006-03-14 10:38       ` Jan-Benedict Glaw [this message]
2006-03-15  4:30         ` Lanslott Gish
2006-03-15 14:08           ` Jan-Benedict Glaw
2006-03-16  6:46             ` Lanslott Gish
2006-03-15 21:53           ` Daniel Ritz
2006-03-17  2:46             ` Lanslott Gish
2006-03-17 21:50               ` Daniel Ritz
2006-03-21  4:23                 ` Lanslott Gish
2006-03-21 20:22                   ` Daniel Ritz
2006-03-21 22:48                     ` Todd E. Johnson
2006-03-21  6:39               ` Lanslott Gish
2006-03-21 20:21                 ` Daniel Ritz
2006-03-15 21:54   ` Daniel Ritz
2006-03-15 22:13     ` Greg KH

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=20060314103854.GC32065@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=daniel.ritz-ml@swissonline.ch \
    --cc=dmitry.torokhov@gmail.com \
    --cc=greg@kroah.com \
    --cc=hc@mivu.no \
    --cc=lanslott.gish@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=tejohnson@yahoo.com \
    --cc=vojtech@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.