linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Manuel Reimer <mail+linux-input@m-reimer.de>
Cc: linux-input <linux-input@vger.kernel.org>
Subject: Re: How to properly extend uinput API
Date: Mon, 2 May 2016 11:35:42 -0700	[thread overview]
Message-ID: <20160502183542.GC37394@dtor-ws> (raw)
In-Reply-To: <51caa374-1fdc-bcc0-3aac-20292a77571b@m-reimer.de>

Hi Manuel,

On Sat, Apr 30, 2016 at 11:36:24AM +0200, Manuel Reimer wrote:
> Hello,
> 
> I'm currently trying to somehow get uinput connected with ff-memless.

I am not sure that exposing ff-memless to userspace is a good idea.
Right now what we have is a supporting library for several kernel
modules and there were considerations to change it to work differently.

I'd rather userspace took care of handling dumb devices if t decided to
handle device communication instead of leaving it to the kernel.

Thanks.

> 
> My first try (which is some kind of hack which prevents API changes
> and doesn't work at all) failed. Now my idea is to add some more
> simple (and probably working) API for this. All, I need in the
> "memless case", is some way to get two motor speeds sent to
> usermode, which doesn't require all this callback stuff.
> 
> There is a new API which, as far as I understand, is meant to be
> easier extendable:
> https://github.com/torvalds/linux/commit/052876f8e5
> 
> What I need is some way to pass an additional boolean to tell the
> kernel module that usermode wants to use ff-memless. Device setup is
> done with an struct "uinput_setup". As far as I know it isn't easily
> possible to extend this without breaking existing stuff.
> 
> It would be possible to write some hack which passes this
> information via magic-value through ff_effects_max but I think there
> has to be some nicer way.
> 
> So how to pass one more piece of information from usermode to kernel
> module while setup without breaking existing (probably
> closed-source) stuff? Keep a definition of the old struct version
> and decide which one to use based on size?
> 
> Thank you very much in advance for any help.
> 
> Manuel

-- 
Dmitry

  reply	other threads:[~2016-05-02 18:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30  9:36 How to properly extend uinput API Manuel Reimer
2016-05-02 18:35 ` Dmitry Torokhov [this message]
2016-05-02 21:57   ` Manuel Reimer
2016-05-02 22:51     ` Dmitry Torokhov
2016-05-03  9:08       ` Clément VUCHENER
2016-05-03 17:22       ` 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=20160502183542.GC37394@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=mail+linux-input@m-reimer.de \
    /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).