All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Reimer <Manuel.Spam@nurfuerspam.de>
To: linux-input@vger.kernel.org
Subject: uinput: How to use force feedback?
Date: Sun, 17 Jan 2016 14:27:29 +0100	[thread overview]
Message-ID: <n7g4s1$i1l$1@ger.gmane.org> (raw)

Hello,

I have an existing uinput driver, which itself sits on an open device 
with a blocking read(), waiting for events to come in. Every event is 
translated to a key code and then sent to uinput.

My next step would be to pass through force feedback information, but I 
don't really understand how I should do this.

As far as I can see, the "uninput device" itself sends events in this 
case. But my main loop is already blocked by the "read", I use to get 
device events.

I see two possible solutions:
- "Somehow", I should be able to get "blocking read" from two open 
devices. As far as I found out, so far, "select" should be the right 
command to do this?
- I could start two threads. One blocked by the "device events" and one 
by the "uinput events".

Which one would you recommend? Is uinput/ioctl thread safe? Is the 
second thread a good idea or is the communication, coming from uinput, 
such "low traffic", that it doesn't delay key handling in a relevant way?

Thank you very much in advance

Manuel


             reply	other threads:[~2016-01-17 13:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 13:27 Manuel Reimer [this message]
2016-01-17 15:46 ` uinput: How to use force feedback? Elias Vanderstuyft
2016-01-17 15:47   ` Elias Vanderstuyft
2016-01-18 17:39   ` Tuomas Räsänen
2016-02-05 15:54   ` Manuel Reimer
2016-02-05 20:58     ` Manuel Reimer
2016-02-10 21:41       ` Elias Vanderstuyft
2016-02-15 20:05         ` Manuel Reimer

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='n7g4s1$i1l$1@ger.gmane.org' \
    --to=manuel.spam@nurfuerspam.de \
    --cc=linux-input@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 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.