All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Rakesh Iyer <riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] Input: keyboard - add device tree bindings for simple key matrixes
Date: Thu, 29 Dec 2011 13:28:30 -0600	[thread overview]
Message-ID: <4EFCBF5E.8030700@gmail.com> (raw)
In-Reply-To: <CAOesGMjZoP+FsGWo9cWKvgs8KD9tT6KBHbK5qKX8NTGOY3HUjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 12/29/2011 01:06 AM, Olof Johansson wrote:
> On Wed, Dec 28, 2011 at 11:01 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>> Olof Johansson wrote at Wednesday, December 28, 2011 11:34 PM:
>>> On Wed, Dec 28, 2011 at 10:16 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>>> Olof Johansson wrote at Wednesday, December 28, 2011 3:53 PM:
>>>>> From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>>>
>>>>> This adds a basic device tree binding for simple key matrix data.
>>>>>
>>>>> Signed-off-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
>>>>> ---
>>>>>
>>>>> Based on email exchange this morning, this is a first cut at a shared
>>>>> definition and helper function to parse and fill in the keymap data.
>>>>>
>>>>> Instead of doing the direct parsing into the final keymap format, I
>>>>> chose to fill in the pdata-equivalent since that is how the OF pdata
>>>>> fillers work right now if code is to be kept common with the legacy
>>>>> platform_device probe interface.
>>>>>
>>>>> This is a prerequisite for a revised version of the tegra-kbc device
>>>>> tree support that I will repost separately once this interface is stable.
>>>> ...
>>>>> diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt
>>>> ...
>>>>> +For simple keyboards with just a few buttons, you can specify each key
>>>>> +as a subnode of the keyboard controller, with the following
>>>>> +properties:
>>>>> +
>>>>> +- keypad,row: the row number to which the key is connected.
>>>>> +- keypad,column: the column number to which the key is connected.
>>>>> +- linux,code: the key-code to be reported when the key is pressed
>>>>> +  and released.
>>>>> +
>>>>> +Example:
>>>>> +
>>>>> +     key_1 {
>>>>> +             keypad,row = <0>;
>>>>> +             keypad,column = <3>;
>>>>> +             linux,code = <2>;
>>>>> +     };
>>>>> +
>>>>> +
>>>>> +For a more complex keyboard, such as a full laptop, a more compact
>>>>> +binding can be used instead, with the following property directly in
>>>>> +the keyboard controller node:
>>>>> +
>>>>> +- linux,keymap: an array of 3-cell entries containing the equivalent
>>>>> +  of the three separate properties above: row, column and linux
>>>>> +  key-code.
>>>>
>>>> Why allow two completely different bindings? Is there some deficiency
>>>> to the compact binding that means it isn't suitable for all cases?
>>>
>>> The main reason is that the samsung keyboard driver already implements
>>> the more verbose one, and allowing that binding to coexist while also
>>> providing a more compact one seems like the right thing to do.
>>
>> Can we deprecate the Samsung format, and only allow it for that Samsung
>> device (and allow both there), and require a single format for any other
>> keyboard?
> 
> I'm definitely ok with that. Thomas, Grant, Rob? The code in question
> is queued for 3.3, so it hasn't been out in a real release yet.
> 
> Adding Kukjin as well since it's getting merged through his tree.
> 

I think both can coexist because the Samsung version is really a
derivative of gpio-keys binding. I think we want to encourage your
keymap version, so only supporting it in the generic code should do that.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Input: keyboard - add device tree bindings for simple key matrixes
Date: Thu, 29 Dec 2011 13:28:30 -0600	[thread overview]
Message-ID: <4EFCBF5E.8030700@gmail.com> (raw)
In-Reply-To: <CAOesGMjZoP+FsGWo9cWKvgs8KD9tT6KBHbK5qKX8NTGOY3HUjQ@mail.gmail.com>

On 12/29/2011 01:06 AM, Olof Johansson wrote:
> On Wed, Dec 28, 2011 at 11:01 PM, Stephen Warren <swarren@nvidia.com> wrote:
>> Olof Johansson wrote at Wednesday, December 28, 2011 11:34 PM:
>>> On Wed, Dec 28, 2011 at 10:16 PM, Stephen Warren <swarren@nvidia.com> wrote:
>>>> Olof Johansson wrote at Wednesday, December 28, 2011 3:53 PM:
>>>>> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>>>>>
>>>>> This adds a basic device tree binding for simple key matrix data.
>>>>>
>>>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>>>> ---
>>>>>
>>>>> Based on email exchange this morning, this is a first cut at a shared
>>>>> definition and helper function to parse and fill in the keymap data.
>>>>>
>>>>> Instead of doing the direct parsing into the final keymap format, I
>>>>> chose to fill in the pdata-equivalent since that is how the OF pdata
>>>>> fillers work right now if code is to be kept common with the legacy
>>>>> platform_device probe interface.
>>>>>
>>>>> This is a prerequisite for a revised version of the tegra-kbc device
>>>>> tree support that I will repost separately once this interface is stable.
>>>> ...
>>>>> diff --git a/Documentation/devicetree/bindings/input/matrix-keymap.txt
>>>> ...
>>>>> +For simple keyboards with just a few buttons, you can specify each key
>>>>> +as a subnode of the keyboard controller, with the following
>>>>> +properties:
>>>>> +
>>>>> +- keypad,row: the row number to which the key is connected.
>>>>> +- keypad,column: the column number to which the key is connected.
>>>>> +- linux,code: the key-code to be reported when the key is pressed
>>>>> +  and released.
>>>>> +
>>>>> +Example:
>>>>> +
>>>>> +     key_1 {
>>>>> +             keypad,row = <0>;
>>>>> +             keypad,column = <3>;
>>>>> +             linux,code = <2>;
>>>>> +     };
>>>>> +
>>>>> +
>>>>> +For a more complex keyboard, such as a full laptop, a more compact
>>>>> +binding can be used instead, with the following property directly in
>>>>> +the keyboard controller node:
>>>>> +
>>>>> +- linux,keymap: an array of 3-cell entries containing the equivalent
>>>>> +  of the three separate properties above: row, column and linux
>>>>> +  key-code.
>>>>
>>>> Why allow two completely different bindings? Is there some deficiency
>>>> to the compact binding that means it isn't suitable for all cases?
>>>
>>> The main reason is that the samsung keyboard driver already implements
>>> the more verbose one, and allowing that binding to coexist while also
>>> providing a more compact one seems like the right thing to do.
>>
>> Can we deprecate the Samsung format, and only allow it for that Samsung
>> device (and allow both there), and require a single format for any other
>> keyboard?
> 
> I'm definitely ok with that. Thomas, Grant, Rob? The code in question
> is queued for 3.3, so it hasn't been out in a real release yet.
> 
> Adding Kukjin as well since it's getting merged through his tree.
> 

I think both can coexist because the Samsung version is really a
derivative of gpio-keys binding. I think we want to encourage your
keymap version, so only supporting it in the generic code should do that.

Rob

  parent reply	other threads:[~2011-12-29 19:28 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 22:52 [PATCH] Input: keyboard - add device tree bindings for simple key matrixes Olof Johansson
2011-12-28 22:52 ` Olof Johansson
     [not found] ` <1325112771-31941-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-12-28 23:30   ` Rob Herring
2011-12-28 23:30     ` Rob Herring
     [not found]     ` <4EFBA698.6080601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-28 23:37       ` Olof Johansson
2011-12-28 23:37         ` Olof Johansson
2011-12-29  6:16   ` Stephen Warren
2011-12-29  6:16     ` Stephen Warren
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF17755DC8D2-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-29  6:34       ` Olof Johansson
2011-12-29  6:34         ` Olof Johansson
     [not found]         ` <CAOesGMiNuW3mexN_8PtunZkaVX4Uph-OgZFr5zLhaB1nih_EEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-29  7:01           ` Stephen Warren
2011-12-29  7:01             ` Stephen Warren
2011-12-29  7:06             ` Olof Johansson
2011-12-29  7:06               ` Olof Johansson
2012-01-02  4:11               ` Thomas Abraham
2012-01-02  4:11                 ` Thomas Abraham
     [not found]               ` <CAOesGMjZoP+FsGWo9cWKvgs8KD9tT6KBHbK5qKX8NTGOY3HUjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-29 19:28                 ` Rob Herring [this message]
2011-12-29 19:28                   ` Rob Herring
2012-01-02  7:21                 ` Grant Likely
2012-01-02  7:21                   ` Grant Likely
     [not found]                   ` <20120102072121.GB13015-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2012-01-03 17:44                     ` Olof Johansson
2012-01-03 17:44                       ` Olof Johansson
2011-12-29 18:42   ` [PATCH v2] " Olof Johansson
2011-12-29 18:42     ` Olof Johansson
2011-12-29 21:14     ` Rob Herring
2011-12-29 21:14       ` Rob Herring
     [not found]       ` <4EFCD846.40901-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-29 21:33         ` Olof Johansson
2011-12-29 21:33           ` Olof Johansson
2011-12-29 22:05     ` Dmitry Torokhov
2011-12-29 22:05       ` Dmitry Torokhov
     [not found]       ` <20111229220515.GA17621-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2011-12-29 22:26         ` Olof Johansson
2011-12-29 22:26           ` Olof Johansson
     [not found]     ` <1325184146-3527-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2012-01-02  6:09       ` [PATCH v3] " Olof Johansson
2012-01-02  6:09         ` Olof Johansson
     [not found]         ` <1325484557-27695-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2012-01-02 18:39           ` Simon Glass
2012-01-02 18:39             ` [U-Boot] " Simon Glass
2012-01-02 18:39             ` Simon Glass
2012-01-03 15:43             ` Olof Johansson
2012-01-03 15:43               ` [U-Boot] " Olof Johansson
2012-01-03 15:43               ` Olof Johansson
     [not found]               ` <20120103154317.GA27061-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2012-01-03 16:22                 ` Simon Glass
2012-01-03 16:22                   ` [U-Boot] " Simon Glass
2012-01-03 16:22                   ` Simon Glass
     [not found]                   ` <CAPnjgZ3xN8+Ve28bcg1OQ4mv5rWvA-9ijP57UsuMQ5D1d=7Xxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-03 16:29                     ` Russell King - ARM Linux
2012-01-03 16:29                       ` [U-Boot] " Russell King - ARM Linux
2012-01-03 16:29                       ` Russell King - ARM Linux
2012-01-03 16:44                       ` Dmitry Torokhov
2012-01-03 16:44                         ` [U-Boot] " Dmitry Torokhov
2012-01-03 16:44                         ` Dmitry Torokhov
     [not found]                         ` <20120103164431.GA31647-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2012-01-03 16:48                           ` Olof Johansson
2012-01-03 16:48                             ` [U-Boot] " Olof Johansson
2012-01-03 16:48                             ` Olof Johansson
2012-01-03 17:06                           ` Russell King - ARM Linux
2012-01-03 17:06                             ` [U-Boot] " Russell King - ARM Linux
2012-01-03 17:06                             ` Russell King - ARM Linux
     [not found]                             ` <20120103170615.GZ2914-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-01-03 17:57                               ` Dmitry Torokhov
2012-01-03 17:57                                 ` [U-Boot] " Dmitry Torokhov
2012-01-03 17:57                                 ` Dmitry Torokhov
2012-01-03 22:28           ` [PATCH] Input: tegra-kbc - add device tree support Olof Johansson
2012-01-03 22:28             ` Olof Johansson
     [not found]             ` <1325629702-10307-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2012-01-03 22:42               ` Stephen Warren
2012-01-03 22:42                 ` Stephen Warren
     [not found]                 ` <74CDBE0F657A3D45AFBB94109FB122FF17761F1203-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-03 22:58                   ` Olof Johansson
2012-01-03 22:58                     ` Olof Johansson
     [not found]                     ` <CAOesGMhYscMgsNbZ+W0vdcRFmMiV3yQYLRxgGLfMVHKuhEAe-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-03 23:21                       ` Dmitry Torokhov
2012-01-03 23:21                         ` Dmitry Torokhov
2012-01-03 17:46         ` [PATCH v3] Input: keyboard - add device tree bindings for simple key matrixes Stephen Warren
2012-01-03 17:46           ` Stephen Warren
2012-01-03 21:37         ` [PATCH v4] " Olof Johansson
2012-01-03 21:37           ` Olof Johansson
     [not found]           ` <1325626648-9425-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2012-01-03 22:37             ` Stephen Warren
2012-01-03 22:37               ` Stephen Warren
2012-01-08  1:05               ` Simon Glass
2012-01-08  1:05                 ` Simon Glass
     [not found]                 ` <CAPnjgZ3G7yFOrngJP=KtJNcgAWtZg3xn22tRMMi+pUnZ2rJpBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-09 18:38                   ` Olof Johansson
     [not found]                     ` <CAOesGMitmYb2jb1VvjNfU8jcsCrDJ5zQkm+Hh171ddMi4POUYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-09 18:46                       ` Simon Glass
2012-03-14  4:42               ` Dmitry Torokhov
2012-03-14  4:42                 ` Dmitry Torokhov

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=4EFCBF5E.8030700@gmail.com \
    --to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 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.