public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Sau Dan Lee <danlee@informatik.uni-freiburg.de>
Cc: linux-kernel@vger.kernel.org, Tuukka Toivonen <tuukkat@ee.oulu.fi>
Subject: Re: /dev/psaux-Interface
Date: Wed, 21 Apr 2004 01:51:06 -0500	[thread overview]
Message-ID: <200404210151.06636.dtor_core@ameritech.net> (raw)
In-Reply-To: <xb71xmhhmej.fsf@savona.informatik.uni-freiburg.de>

On Wednesday 21 April 2004 01:31 am, Sau Dan Lee wrote:
> >>>>> "Dmitry" == Dmitry Torokhov <dtor_core@ameritech.net> writes:
> 
>     Dmitry> It seems that the driver allows non-exclusive access to
>     Dmitry> the port - multiple users may fight to set up the
>     Dmitry> mode.
> 
> That's wrong.   The driver is  written so that multiple  processes can
> hold the device node open at the same time, in the same way /dev/psaux
> in pre2.6 kernels was.
> 

Don't we say the same thing?

> 
>     Dmitry> How they will agree on which one to set?  
> 
> GPM and XFree86 have been  coordinating themselves well on this on all
> my Linux systems since 1993.  And  this has continued to be so with my
> psaux Module on Linux 2.6.

Not all the world is GPM and XFree.

> 
> 
>     Dmitry> On the other hand I do not want psaux to give me only
>     Dmitry> exclusive access as I have had emough of GPM repeater
>     Dmitry> feeding X feeding Y ... etc.
> 
> Both GPM and XFree86 are aware of vc switching, I suppose.

Not all the world is GPM and XFree.

> 
> 
>     Dmitry> It does not support active multiplexing controller (4 AUX
>     Dmitry> ports) which becomes quite common and is the only sane
>     Dmitry> option when you have several mice of different types.
> 
> That's because I don't have such a thing, and the interface of serio.c
> is not documented.  Instead of  guessing how the interface is supposed
> to work, I think it's better to leave it to the kernel developers.

The question was whether to include it in the kernel as it is. If it is not
compled work then it should wait a bit.

> 
> 
>     Dmitry> Also I do not see where the code makes sure that it does
>     Dmitry> not bind to keyboard's port (so keyboard driver has to be
>     Dmitry> loaded first).
> 
> Ask  the  people  who  wrote  i8042.c  and  serio.c  to  document  the
> interface.  I  simply copied the necessary  stuff from psmouse-base.c.
> If that psmouse.ko works, then why should my psaux fail?
>
 
Because if you look in psmouse_probe we actually check if there is a mouse
behing the port.

> 
>     Dmitry> I think the right way is to fix the issues with psmouse
>     Dmitry> driver and use input system to tie all hardware together.
> 
> But  how can  you  add support  of  new protocols  and hardware?   Not
> everyone want to reimplement GPM  and XFree86 drivers in kernel space.
> It's much  easier to do  it in user  space.  Adding the  complexity of
> various devices and protocols into kernelspace is insane.
>

The thing is that processing in kernel space is not that complex. The only
thing kernel has to do is to parse raw data and convert to events. The events
are parsed by user space daemon with all required bells and whistles. See
for example Synaptics driver for Xfree86 by Peter Osterlund, or my GPM
patches for that matter.

Mousedev is a transitional thing, it will go away eventually or will have a
very limited use by legacy applications.
 
> The only  sane way to  do it, IMO,  is to restructure the  input layer
> slightly, so  that mouse protocols  are handled by  userspace daemons.
> The daemon(s) are  responsible for talking to the  device directly via
> device  nodes such  as /dev/misc/psaux_direct,  and  translating these
> into the  common protocol  (IMPS2?) and hand  it back to  kernel space
> (via a  special device  node).  The kernel  can then combine  the data
> from all daemons and repeat it on /dev/input/mice.
>
 
We have such thing - look at uinput module - it can be used to feed events
back into the kernel. 

-- 
Dmitry

  parent reply	other threads:[~2004-04-21  6:51 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       ` Dmitry Torokhov [this message]
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               ` /dev/psaux-Interface Dmitry Torokhov
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=200404210151.06636.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=danlee@informatik.uni-freiburg.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox