linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephane Chauveau <s.chauveau@chello.nl>
To: linux-hotplug@vger.kernel.org
Subject: Re: hotplug, input  and XFree86
Date: Fri, 05 Oct 2001 15:51:29 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-100229708922075@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-100229087228546@msgid-missing>

Humm... Stupid mailer :-) 
Here is the complete mail:


Hi, 

is there a project to handle hotpluging of X11 input devices?

For example, I have a Wacom USB tablet. Hotplug works well except 
that the input subsystem is not yet integrated so I have to guess 
which  input device number is use by the tablet. 

Even with a proper input subsystem, the X server will have to 
be stopped and restarted when a new device is plugged in :-(

A first approach could be to change XFree86 but I have the 
feeling that I could take months or years.

So I propose to develop a generic 'input' driver for 
XFree86. This input driver will only understand a subset
of the kernel-input events corresponding more or less
to the native X11 events (motions in n-dimensions, 
n-buttons press/release and key press/release).

Those events will not be provided directly by the kernel
drivers by a daemon started before the X server.

The daemon will be responsible for
  - Creating one or more devices (daemon device) for each 
    physical device  that could be plugged in the system 
    Those file devices can be opened by the XFree86 generic 'input' 
    driver even if the physical device is yet not plugged in.
  - respond to hotplug requests by mapping those demon daemon devices
    to the kernel input devices.
  - translate kernel input events to XFree86 input events
    and redirect them to the appropriate daemon device.


Example: For my wacom, the daemon would load a wacom.o
driver and create 3 devices.

/dev/daemon-input/wacom-stylus
/dev/daemon-input/wacom-eraser
/dev/daemon-input/wacom-mouse

consider that the wacom is plugged in /dev/input/event0.

the daemon driver has to interpret the wacom specific event
ABS_PRESSURE, BTN_TOOL_STYLUS, BTN_TOOL_ERASER, ABS_TILTX,
and map them to more standard event. In the XFree wacom driver,
the pressure is on the Z axis so all ABS_PRESSURE events will
be transformed into ABS_Z events. 
The BTN_TOOL_??? events will be used to select the output 
device to use. 

 
From an XFree point of view, all devices have to be
configured in the XF86Config file. 

Example: for the wacom stylus

Section "InputDevice"
        Identifier  "gstylus"
        Driver  "generic-input"
        Option  "Device" "/dev/daemon-input/wacom-stylus"
       
        # my wacom supports only 3 dimensions: X, Y and Pressure
        Option "Dimensions" "3"
        
        Option "Mode0" "absolute"
        Option "Max0"  "10206"

        Option "Mode1" "absolute"
        Option "Max1"  "7422"

        Option "Mode2" "absolute"
        Option "Max2"  "511"

        # and 3 buttons
        Option "Buttons"  "3"

EndSection




  


 


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2001-10-05 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-05 14:07 hotplug, input and XFree86 Stephane Chauveau
2001-10-05 15:51 ` Stephane Chauveau [this message]
2001-10-05 18:43 ` Tim Jansen
2001-10-06  7:39 ` Stephane Chauveau
2001-10-06  9:45 ` Vojtech Pavlik

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=marc-linux-hotplug-100229708922075@msgid-missing \
    --to=s.chauveau@chello.nl \
    --cc=linux-hotplug@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).