public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] input: Add new sun4i-lradc-keys drivers
Date: Fri, 3 Jan 2014 18:15:59 +0100	[thread overview]
Message-ID: <20140103171559.GM3144@lukather> (raw)
In-Reply-To: <20140102203831.GA3239@core.coreip.homeip.net>

On Thu, Jan 02, 2014 at 12:38:31PM -0800, Dmitry Torokhov wrote:
> On Thu, Jan 02, 2014 at 09:20:22PM +0100, Maxime Ripard wrote:
> > On Thu, Jan 02, 2014 at 02:45:29PM +0100, Hans de Goede wrote:
> > > >Also, instead of inventing yet another vendor-specific property, why not re-use
> > > >a button binding similar to gpio-keys like:
> > > >
> > > >        lradc: lradc at 01c22800 {
> > > >                compatible = "allwinner,sun4i-lradc-keys";
> > > >                reg = <0x01c22800 0x100>;
> > > >                interrupts = <31>;
> > > >                allwinner,chan0-step = <200>;
> > > >
> > > >		#address-cells = <1>;
> > > >		#size-cells = <0>;
> > > >
> > > >		button at 0 {
> > > >			reg = <0>; /* your channel index from above */
> > > >			linux,code = <115>; /* already used as dt-property */
> > > >		};
> > > >
> > > >		button at 1 {
> > > >			reg = <1>;
> > > >			linux,code = <114>;
> > > >		};
> > > 
> > > Ugh no. Having a vendor specific property which is KISS certainly
> > > beats this, both wrt ease of writing dts files as well as wrt the
> > > dts parsing code in the driver.
> > 
> > I'd agree with Heiko here. This is pretty much the same construct
> > that's already in use in other input drivers, like gpio-keys.
> > 
> > This is also something that can really easily be made generic, since
> > this is something that is rather common.
> 
> Except that button definition from gpio-keys does not use 'reg' property
> but rather gpio. I'd rather we did not cram non-applicable attributes
> into that definition just to make it "reusable" like that.
> 
> I'd be OK with having similar (but not claiming to be the same) mappings
> though.

Yes, this is what I was meaning. Sorry if it was not clear enough.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140103/b1b5c3a0/attachment.sig>

  reply	other threads:[~2014-01-03 17:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-01 19:30 [PATCH 0/4] input: Add new sun4i-lradc-keys driver Hans de Goede
2014-01-01 19:30 ` [PATCH 1/4] input: Add new sun4i-lradc-keys drivers Hans de Goede
2014-01-01 20:56   ` Dmitry Torokhov
2014-01-02  9:37     ` Hans de Goede
2014-01-02 11:59       ` Heiko Stübner
2014-01-02 13:45         ` Hans de Goede
2014-01-02 20:20           ` Maxime Ripard
2014-01-02 20:38             ` Dmitry Torokhov
2014-01-03 17:15               ` Maxime Ripard [this message]
2014-01-02 22:36             ` Hans de Goede
2014-01-03 17:36               ` Maxime Ripard
2014-01-03 18:23                 ` Dmitry Torokhov
2014-01-06 10:04                   ` Heiko Stübner
2014-01-06 10:13                   ` Maxime Ripard
2014-01-01 19:30 ` [PATCH 2/4] ARM: dts: sun4i: Add lradc node Hans de Goede
2014-01-01 19:30 ` [PATCH 3/4] ARM: dts: sun5i: " Hans de Goede
2014-01-01 19:45   ` Andrew Lunn
2014-01-02  9:37     ` [linux-sunxi] " Hans de Goede
2014-01-01 19:30 ` [PATCH 4/4] ARM: dts: sun7i: " Hans de Goede

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=20140103171559.GM3144@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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