All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@euromail.se>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Nuno Santos <nsantos@edigma.com>, linux-input@vger.kernel.org
Subject: Re: Interacting with a input kernel driver from user space
Date: Tue, 15 Nov 2011 11:32:25 +0100	[thread overview]
Message-ID: <20111115103225.GA8074@polaris.bitmath.org> (raw)
In-Reply-To: <20111114171300.GB12659@core.coreip.homeip.net>

> > >>I need to be able to communicate to and from the device from the an
> > >>application build in Qt. So, there must be something really generic that I
> > >>can call from the application environment. In windows I use window API to
> > >>call IOCTLS interaction.
> > >Why? I thought this thing is an input device? Why does an application
> > >have to modify a running device? Is this modification local to the
> > >application<->device interface or does it also affect all other
> > >running applications that use this device?
> > Yes, it is an multitouch overlay input device. However all the
> > processing is done on the host side. The device delivers raw data
> > into the system and all the tracking and touch information is
> > processed on the kernel side. The control panel for this device
> > shows the input data and permits some parameter change. In order to
> > visualize that data I need to be able to get a complete structure
> > from it. When I change a parameter it will reflect the change to the
> > input being reported to all the applications that use that input
> > device.
> > >
> > >If it is a configuration value to put the device into a different
> > >state or similar, then you can use a sysfs attribute. The user can
> > >change this with "echo<value>  >/sys/class/input/inputX/<attribute>"
> > For setting new simple values I see I can use this interface, but
> > two questions arise. How can I send a structure with this interface?
> 
> Yes, using binary attributes.
> 
> > Can I fopen this sys file and send the whole structure thru this
> > mechanism. What about receiving data from the device?
> 
> Depend on the kind of data you need to get. Is the device state as
> delivered through input device is not enough? Then maybe you don't want
> to use input interface but rather use something like hiddev or hidraw
> for direct access to the device, do the needed processing in userspace
> and then use uinput to route the events back to kernel for distribution.
> 
> However so far we managed to do contact tracking in kernel...
> 
> What I do not want to have is custom input driver ioctls; I want clients
> to work off declared input capabilities aas much as possible.

Right. Unless we are talking about haptic feedback or leds,
information really flows one way, so there should be no reason to send
anything back to the kernel. For detected but anonymous touches, we
have MT protocol A in the input subsystem. If your raw data does not
even contain detected touches, I would try hidraw, as Dmitry
suggested.

Thanks,
Henrik

  reply	other threads:[~2011-11-15 10:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 12:24 Interacting with a input kernel driver from user space Nuno Santos
2011-11-14 15:37 ` David Herrmann
2011-11-14 16:00   ` Nuno Santos
2011-11-14 16:09     ` David Herrmann
2011-11-14 16:31       ` Nuno Santos
2011-11-14 16:58         ` David Herrmann
2011-11-14 18:24           ` Nuno Santos
2011-11-14 18:57             ` Dmitry Torokhov
2011-11-14 23:17               ` Oliver Neukum
2011-11-14 23:34                 ` Dmitry Torokhov
2011-11-15  9:41                   ` Nuno Santos
2011-11-15  9:38                 ` Nuno Santos
2011-11-15  9:35               ` Nuno Santos
2011-11-15 18:23                 ` Dmitry Torokhov
2011-11-15 18:41                   ` Nuno Santos
2011-11-15 19:20                     ` Dmitry Torokhov
2011-11-14 17:13         ` Dmitry Torokhov
2011-11-15 10:32           ` Henrik Rydberg [this message]
2011-11-15 10:40             ` Nuno Santos
2011-11-15 19:07             ` Chase Douglas
2011-11-16 10:25               ` Nuno Santos
2011-11-16 10:28                 ` Nuno Santos
2011-11-16 17:28       ` Nuno Santos
2011-11-16 19:27         ` Dmitry Torokhov
2011-11-17 15:39           ` Nuno Santos
2011-11-17 16:58           ` Nuno Santos

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=20111115103225.GA8074@polaris.bitmath.org \
    --to=rydberg@euromail.se \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=nsantos@edigma.com \
    /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.