From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbcFNLpe (ORCPT ); Tue, 14 Jun 2016 07:45:34 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54271 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbcFNLp3 (ORCPT ); Tue, 14 Jun 2016 07:45:29 -0400 X-Sasl-enc: WgjjZqXRk3MW9x7nlaju5OMLV/DF2L7brzRQOb+e7x7p 1465904727 Date: Tue, 14 Jun 2016 14:45:23 +0300 From: Andrey Utkin To: 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 , Arnd Bergmann , Mark Brown , Daniel Hung-yu Wu , Moritz Fischer , Geert Uytterhoeven , S Twiss , Rob Herring , Grant Grundler Subject: Mainlining of Pyra nub joystick driver Message-ID: <20160614114523.GC4820@zver> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Existing driver: http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=drivers/input/misc/as5013.c;h=1bfb5243f692c0c0a9c93881968849cac947c92d;hb=refs/heads/work/hns/input/as5013