From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751828AbcFNPN5 (ORCPT ); Tue, 14 Jun 2016 11:13:57 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:51607 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbcFNPN4 (ORCPT ); Tue, 14 Jun 2016 11:13:56 -0400 From: Arnd Bergmann To: Andrey Utkin 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 , Krzysztof Kozlowski , Mark Brown , Daniel Hung-yu Wu , Moritz Fischer , Geert Uytterhoeven , S Twiss , Rob Herring , Grant Grundler Subject: Re: Mainlining of Pyra nub joystick driver Date: Tue, 14 Jun 2016 17:14:52 +0200 Message-ID: <5881169.t4LCy37Pi6@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160614114523.GC4820@zver> References: <20160614114523.GC4820@zver> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:PGAsCM3LcB6dssWlP2yM4XbUveiwZT9l86TD0zMo2CJRgdLcbqs lMiMDNzssKjVQW3MmQI5+IW7itZAGGr3PcDHAeoTZ/7+y8FhowCZzQU1k78F1l8EiGZue7F AGNcnB6H0Di5qzmQ09Uq9jxyTqL7imVRlQCakjVPFBfBAwqtI905zkpYGzc7Et41r3zvqxU 11SPoyNTHscEK4hxLaWRw== X-UI-Out-Filterresults: notjunk:1;V01:K0:h1vH9MDqL9I=:h9U18Wucf+3gJot88QpEU+ j8BxYbQoUosjhSSefgkXCjsyW3lxsWF6QrgIaudigMBHswkUqQgmeBCsJNsHRtuDQrGXodrEs d/zsoj98mvHudAxQamD6nnr1F38tmUTaL5WFYUwAFP66COt7l5/dlTHBfP4HBc4nSJdLhPWnk hrN8NXmjIB1c3NZjtRS7Xr522wWctwPYef1lhB2szlfP/+ltwZBQxYZdGRSkaaaBi+vtuQWVG vFW1OsZ9yiGu9QhQUqwzB8PXYnKEgqRlmGgaEtFWgK8a6dnNkyR3j4Gxtj8KigOABQPpgg1Y3 DfndLogEDqlFYoHA4k2ZZZv1418oOh9pWeAORK8HSdtjm51e6xrf9nffiFm/XkuFGBd2fnP9t +cgZsE+588irxy4y7PhB9qWq8/Nywr7k7vLiI0Nn/t1UCtUkNhL9qH4U+LmBB5vG3dC3JHHGx Spezbaw5y1rMHsIf7nW7vyCROC6t6ZYGQ20U2gbKPk47bbpZ5+C8nLg1InTIyCvy3ipFn96Vs OSWv3Qe7R91tfs1kCY97ml+UCQ/1u/xBrEX3cSQ2ihdRsEKOJbS1fdQ9L2Sc6vfNSVtEKym7p tp49JATxuezcUijPh4Wjxbt9X2PFL6kpSNXrLJccDTrCsTN3hxxzVmWdmkr6ZzWW5uCebTql2 PVOuIWZsB5L1uBwSuAhr68rvqNcGbx8iI6b6/+2lN17XjNZNyZuXwhXiKxv+woM0b3zA+1T5O YtlFqMuVbk063tcS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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