public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Elo touch panel
       [not found] ` <20060207081415.GA6731@suse.cz>
@ 2006-02-07 23:41   ` Shaun Jackman
  2006-02-08  8:51     ` Vojtech Pavlik
  0 siblings, 1 reply; 2+ messages in thread
From: Shaun Jackman @ 2006-02-07 23:41 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: lkml

On 2/7/06, Vojtech Pavlik <vojtech@suse.cz> wrote:
> On Mon, Feb 06, 2006 at 07:30:26PM -0700, Shaun Jackman wrote:
...
> > I then run...
> >       $ inputattach -elo /dev/ttyS3
> > .. at which point dmesg says...
> >       serio: Serial port ttyS3
> > but it never gives a message indicating that the Elo driver has been
> > attached to ttyS3. Is there anything else I must configure?
>
> Try to look at /proc/bus/input/devices. The elo_connect() function
> should get called at the point the port is created. Unfortunately, I
> never could test this driver, because I don't have any touchscreens
> anymore (ever had one and it broke when I was moving). So there may be
> problems in the driver. But I believe others had some success running
> it.
>
> Looking at the driver, one will probably need to set the panel type in
> inputattach ...

There's a bug in inputattach. The SERIO_RS232 constant is completely
mucking the bits that specify the protocol.

--- inputattach.c-      2006-02-07 14:37:04.000000000 -0700
+++ inputattach.c       2006-02-07 16:22:07.000000000 -0700
@@ -455,7 +455,7 @@
                return 1;
        }

-       devt = SERIO_RS232 | input_types[type].type | (id << 8) | (extra << 16);
+       devt = input_types[type].type | (id << 8) | (extra << 16);

        if(ioctl(fd, SPIOCSTYPE, &devt)) {
                fprintf(stderr, "inputattach: can't set device type\n");

Cheers,
Shaun

APPENDIX A

You probably know this better than I do, but the .type above is
misnamed. It should really be .proto. It's impossible, as far as I can
tell, to specify the type (like SERIO_RS232) with a SPIOCSTYPE call.

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

* Re: Elo touch panel
  2006-02-07 23:41   ` Elo touch panel Shaun Jackman
@ 2006-02-08  8:51     ` Vojtech Pavlik
  0 siblings, 0 replies; 2+ messages in thread
From: Vojtech Pavlik @ 2006-02-08  8:51 UTC (permalink / raw)
  To: Shaun Jackman; +Cc: lkml

On Tue, Feb 07, 2006 at 04:41:16PM -0700, Shaun Jackman wrote:

> There's a bug in inputattach. The SERIO_RS232 constant is completely
> mucking the bits that specify the protocol.
> 
> --- inputattach.c-      2006-02-07 14:37:04.000000000 -0700
> +++ inputattach.c       2006-02-07 16:22:07.000000000 -0700
> @@ -455,7 +455,7 @@
>                 return 1;
>         }
> 
> -       devt = SERIO_RS232 | input_types[type].type | (id << 8) | (extra << 16);
> +       devt = input_types[type].type | (id << 8) | (extra << 16);
> 
>         if(ioctl(fd, SPIOCSTYPE, &devt)) {
>                 fprintf(stderr, "inputattach: can't set device type\n");
> 
> Cheers,
> Shaun
> 
> APPENDIX A
> 
> You probably know this better than I do, but the .type above is
> misnamed. It should really be .proto. It's impossible, as far as I can
> tell, to specify the type (like SERIO_RS232) with a SPIOCSTYPE call.
 
It's an incompatibility in a later rework of serio.h/serport.c.
SERIO_RS232 used to be 0x02000000, now the constant isn't shifted up
anymore, which messed up things. Also, the type used to be possible to
set, but I don't think that needs to be fixed, since there are so far no
ttys that'd need a different serio type. 

I'll apply your fix to inpuatttach. Thanks for spotting the bug.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

end of thread, other threads:[~2006-02-08  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <7f45d9390602061830k6b984ban6fb302a3089cac6c@mail.gmail.com>
     [not found] ` <20060207081415.GA6731@suse.cz>
2006-02-07 23:41   ` Elo touch panel Shaun Jackman
2006-02-08  8:51     ` Vojtech Pavlik

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