[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5881169.t4LCy37Pi6@wuerfel>
Date: Tue, 14 Jun 2016 17:14:52 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Andrey Utkin <andrey_utkin@...tmail.com>
Cc: linux-input@...r.kernel.org, devel@...verdev.osuosl.org,
kernel-mentors@...enic.com, linux-kernel@...r.kernel.org,
letux-kernel@...nphoenux.org, kernel@...a-handheld.com,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Mark Brown <broonie@...nel.org>,
Daniel Hung-yu Wu <hywu@...gle.com>,
Moritz Fischer <moritz.fischer@...us.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
S Twiss <stwiss.opensource@...semi.com>,
Rob Herring <robh@...nel.org>,
Grant Grundler <grundler@...omium.org>
Subject: Re: Mainlining of Pyra nub joystick driver
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
Powered by blists - more mailing lists