All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Utkin <andrey_utkin@fastmail.com>
To: "H. Nikolaus Schaller" <hns@goldelico.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>,
	Arnd Bergmann <arnd@arndb.de>, 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: [Kernel] Mainlining of Pyra nub joystick driver
Date: Thu, 16 Jun 2016 22:51:06 +0300	[thread overview]
Message-ID: <20160616195106.GG4820@zver> (raw)
In-Reply-To: <DAA6B14A-062E-45E9-97DD-18D55480F0A8@goldelico.com>

On Tue, Jun 14, 2016 at 07:09:50PM +0200, H. Nikolaus Schaller wrote:
> 
> > Am 14.06.2016 um 19:02 schrieb Andrey Utkin <andrey_utkin@fastmail.com>:
> > Update: found drivers/input/joystick/as5011.c in mainline kernel,
> > will look how it works with as5013 hardware.
> 
> Before you spend too much time on it, they have not much in
> common except the manufacturer and the as501x designation.
> 
> Register models (data sheet) are very different.

Thanks for this hint, Nikolaus!

But still, apart from register models I guess as5011 driver is a good
starting point for a fork. I am considering this because
 - as5011 driver has support for button push event, and as5013 doesn't;
 - as5011 driver conforms to mainline standards much better than
   existing out-of-tree as5013 driver. It also conforms to what
   reviewers expect to see: anyway as5013 won't pass review unless all
   tricky modes are dropped. This is according to Arnd reply; Pyra dev
   team member aTc also votes for userspace input management daemon.

I am considering forking instead of adding conditional logic to as5011
because I don't have a chance to test as5011 hardware, so I could break
it unintentionally and never know about that. This is serious because
I'm going to add support of all power modes and other parameters
eventually.

There is one thing which both as5011 and as5013 existing drivers do:
expose a header file in include/linux/input/, with some "struct
blah_blah_platform_data" declaration. This header file is not included
anywhere except for corresponding driver's .c file. So I think this
header file is not needed, and all its contents should be inlined into
single driver's source file. From asking on #kernelnewbies IRC chat, I
gained some confidence that there's no subtleties regarding this.

I guess "struct drivername_platform_data" is something deprecated by
now, as long as there are devicetree files and of_...() API, so I should
port vsense_dt_init() logic from existing as5013 driver?

Also info about GPIO pin for button push interrupt should be added to
devicetree files. Or please indicate that it's not going to have its
GPIO pin for button interrupt - then driver should check button status
at once with periodic position check.

  reply	other threads:[~2016-06-16 19:51 UTC|newest]

Thread overview: 7+ 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
2016-06-14 17:02 ` [Kernel] " Andrey Utkin
2016-06-14 17:09   ` H. Nikolaus Schaller
2016-06-16 19:51     ` Andrey Utkin [this message]
2016-06-17 11:20       ` H. Nikolaus Schaller
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=20160616195106.GG4820@zver \
    --to=andrey_utkin@fastmail.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=grundler@chromium.org \
    --cc=hns@goldelico.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.