All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-kernel@vger.kernel.org
Cc: Sau Dan Lee <danlee@informatik.uni-freiburg.de>,
	Kim Holviala <kim@holviala.com>,
	Tuukka Toivonen <tuukkat@ee.oulu.fi>
Subject: Re: /dev/psaux-Interface
Date: Thu, 22 Apr 2004 02:23:41 -0500	[thread overview]
Message-ID: <200404220223.41361.dtor_core@ameritech.net> (raw)
In-Reply-To: <xb71xmgebkr.fsf@savona.informatik.uni-freiburg.de>

On Thursday 22 April 2004 02:06 am, Sau Dan Lee wrote:
> >>>>> "Dmitry" == Dmitry Torokhov <dtor_core@ameritech.net> writes:
> 
>     Dmitry> OK, here you go. It is the first cut. The driver creates
>     Dmitry> an absolute device for the touchscreen and a fake
>     Dmitry> pass-through port to for the pointing device which works
>     Dmitry> in relative mode. All fancy stuff can be done in userspace
>     Dmitry> via evdev.
> 
> I  still  haven't  tried  it.   But upon  first  inspection,  I  found
> something undesirable already.
> 
> +static void lbtouch_pass_pt_packet(struct serio *ptport, unsigned char *packet)
> +{
> +	struct psmouse *child = ptport->private;
> +
> +	if (child && child->state == PSMOUSE_ACTIVATED) {
> +		serio_interrupt(ptport, packet[0], 0, NULL);
> +		serio_interrupt(ptport, packet[1], 0, NULL);
> +		serio_interrupt(ptport, packet[2], 0, NULL);
> +	}
> +}
> +
> 
> So,  you're  imposing the  policy  that  the  packets must  as  3-byte
> packets?

Yes, this is my uderstanding of Lifebook protocol. It is incapable of anything
but bare PS/2 as far as the pointing device goes. If we ever get a spec we can
revisit it.

> My  experiences in  writing my XFree86  driver is  that some 
> bytes  are sometimes  dropped, for  reasons I  don't know.   My driver
> would  attempt to  resync, although  not reliably  because  the packet
> format   in   touch-screen   mode   does  not   provide   a   reliable
> synchronization mechanism (such  as parity, a special bit  to mark the
> end of a packet, etc.).
>

There is a timeout and synchronization attempt in psmosue_interrupt (parent
of this module) so you should be covered. 

> I don't know whether the dropping  of bytes is specific to my machine,
> or is common to all B142 models.
> 
> 
> +static psmouse_ret_t lbtouch_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
> +{
> +	struct input_dev *dev = &psmouse->dev;
> +	unsigned char *p = psmouse->packet;
> +	int x, y, touch;
> +
> +	input_regs(dev, regs);
> +
> +	if (psmouse->pktcnt < 3)
> +		return PSMOUSE_GOOD_DATA;
> +
> 
> The  same problem.   You  wait  for a  complete  3-byte packet  before
> emitting an event.  What happens to dropped bytes?
> 

The packet is dropped when we wait for a byte for too long.

-- 
Dmitry

  reply	other threads:[~2004-04-22  7:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.58.0402271451420.11281@stekt37>
2004-04-19  8:35 ` /dev/psaux-Interface Tuukka Toivonen
2004-04-19  8:52   ` /dev/psaux-Interface Andrew Morton
2004-04-19  9:53     ` /dev/psaux-Interface Kim Holviala
2004-04-19 10:16     ` /dev/psaux-Interface Sau Dan Lee
2004-04-19 10:53       ` /dev/psaux-Interface Arjan van de Ven
2004-04-19 11:18         ` /dev/psaux-Interface Jamie Lokier
2004-04-19 11:47           ` /dev/psaux-Interface Sau Dan Lee
2004-04-21 10:48         ` /dev/psaux-Interface Neil Brown
2004-04-21 11:24           ` /dev/psaux-Interface Sau Dan Lee
2004-04-21 11:52             ` /dev/psaux-Interface Tuukka Toivonen
2004-04-21 14:14               ` /dev/psaux-Interface Sau Dan Lee
2004-04-21 12:38             ` /dev/psaux-Interface Neil Brown
2004-04-21 14:21               ` /dev/psaux-Interface Sau Dan Lee
2004-04-20 12:56   ` /dev/psaux-Interface Dmitry Torokhov
2004-04-20 20:41     ` /dev/psaux-Interface Kim Holviala
     [not found]     ` <xb71xmhhmej.fsf@savona.informatik.uni-freiburg.de>
2004-04-21  6:51       ` /dev/psaux-Interface Dmitry Torokhov
2004-04-21  7:15         ` /dev/psaux-Interface Sau Dan Lee
2004-04-22  6:39           ` /dev/psaux-Interface Dmitry Torokhov
2004-04-22  7:06             ` /dev/psaux-Interface Sau Dan Lee
2004-04-22  7:23               ` Dmitry Torokhov [this message]
2004-04-21  7:18 /dev/psaux-Interface Sau Dan Lee
2004-04-21  7:21 ` /dev/psaux-Interface Kim Holviala
2004-04-21  8:13   ` /dev/psaux-Interface Sau Dan Lee
  -- strict thread matches above, loose matches on Subject: below --
2004-04-19 13:50 /dev/psaux-Interface tabris
2004-02-27 11:45 /dev/psaux-Interface Bernhard Gruber
2004-02-27 20:19 ` /dev/psaux-Interface Bernhard Gruber

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=200404220223.41361.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=danlee@informatik.uni-freiburg.de \
    --cc=kim@holviala.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tuukkat@ee.oulu.fi \
    /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.