public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andrey Utkin <andrey_utkin@fastmail.com>
Cc: linux-input@vger.kernel.org, devel@driverdev.osuosl.org,
	kernel-mentors@selenic.com, linux-kernel@vger.kernel.org,
	letux-kernel@openphoenux.org, kernel@pyra-handheld.com,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Mark Brown <broonie@kernel.org>,
	Daniel Hung-yu Wu <hywu@google.com>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	S Twiss <stwiss.opensource@diasemi.com>,
	Rob Herring <robh@kernel.org>,
	Grant Grundler <grundler@chromium.org>
Subject: Re: Mainlining of Pyra nub joystick driver
Date: Tue, 14 Jun 2016 17:14:52 +0200	[thread overview]
Message-ID: <5881169.t4LCy37Pi6@wuerfel> (raw)
In-Reply-To: <20160614114523.GC4820@zver>

On Tuesday, June 14, 2016 2:45:23 PM CEST Andrey Utkin wrote:
> There's a pair of "nub" devices on Pyra handheld PC
> (https://pyra-handheld.com/), and there's driver for nub, which is going
> to be reworked for upstreaming. While the device itself fits most to
> "joystick" category, the computer itself lacks touchpad and mouse
> buttons, and the existing driver is capable of switching between modes, in
> which it shows up like one of the following:
>  - scrolling wheel,
>  - mouse buttons set,
>  - pointer updating its absolute position (graphic pad alike AFAIU),
>  - pointer device behaving like actual joystick / pointing stick.
> 
> Currently modes switching happens through r/w file in /proc, which is of
> couse going to be changed.
> 
> I wonder if such mode switching mechanism is tolerable for inclusion to
> upstream kernel in this case. I'd like some advice how to rearrange the
> driver to save most of flexibility while matching upstream kernel
> conventions. I am especially interested in comments from subsystem
> maintainers.
> 

My best idea for this is that the device driver should just report one
type of device, with the other modes being handled on top of that,
by a generic kernel framework or in user space.

Code for registering the same inputs to all those frameworks doesn't
seem to belong into a driver.

	Arnd

  reply	other threads:[~2016-06-14 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 11:45 Mainlining of Pyra nub joystick driver Andrey Utkin
2016-06-14 15:14 ` Arnd Bergmann [this message]
2016-06-14 17:02 ` [Kernel] " Andrey Utkin
2016-06-14 17:09   ` H. Nikolaus Schaller
2016-06-16 19:51     ` Andrey Utkin
2016-06-17 11:20       ` H. Nikolaus Schaller

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=5881169.t4LCy37Pi6@wuerfel \
    --to=arnd@arndb.de \
    --cc=andrey_utkin@fastmail.com \
    --cc=broonie@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=grundler@chromium.org \
    --cc=hywu@google.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kernel-mentors@selenic.com \
    --cc=kernel@pyra-handheld.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moritz.fischer@ettus.com \
    --cc=robh@kernel.org \
    --cc=stwiss.opensource@diasemi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox