From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Abraham Subject: Re: [PATCH 2/2] input: samsung-keypad: Add device tree support Date: Thu, 15 Sep 2011 06:37:48 +0530 Message-ID: References: <1315916779-21793-1-git-send-email-thomas.abraham@linaro.org> <1315916779-21793-2-git-send-email-thomas.abraham@linaro.org> <1315916779-21793-3-git-send-email-thomas.abraham@linaro.org> <20110914161144.GF3134@ponder.secretlab.ca> <20110914171318.GA24425@ponder.secretlab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-samsung-soc-owner@vger.kernel.org To: Grant Likely Cc: devicetree-discuss@lists.ozlabs.org, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jy0922.shim@samsung.com, dh09.lee@samsung.com List-Id: devicetree@vger.kernel.org On 15 September 2011 00:40, Grant Likely wr= ote: > On Wed, Sep 14, 2011 at 12:09 PM, Thomas Abraham > wrote: >> On 14 September 2011 22:43, Grant Likely = wrote: >>> On Wed, Sep 14, 2011 at 10:19:22PM +0530, Thomas Abraham wrote: >>>> On 14 September 2011 21:41, Grant Likely wrote: >>>> > On Tue, Sep 13, 2011 at 05:56:19PM +0530, Thomas Abraham wrote: >>>> >> +- Keys represented as child nodes: Each key connected to the k= eypad >>>> >> + =A0controller is represented as a child node to the keypad co= ntroller >>>> >> + =A0device node and should include the following properties. >>>> >> + =A0- keypad,row: the row number to which the key is connected= =2E >>>> >> + =A0- keypad,column: the column number to which the key is con= nected. >>>> >> + =A0- keypad,key-code: the key-code to be reported when the ke= y is pressed >>>> >> + =A0 =A0and released. >>>> > >>>> > What defines the meanings of the key codes? >>>> >>>> The key-code could be any value which the system would want the ke= ypad >>>> driver to report when that key is pressed. >>> >>> Are they linux keycodes? =A0If so, then this property name can >>> probably be linux,code. =A0There is already precedence for that >>> usage in Documentation/devicetree/bindings/gpio/gpio-keys.txt. =A0(= I >>> would personally prefer "linux,key-code", but sometimes it is bette= r >>> to go with existing precidence) You could also use linux,input-type= as >>> specified in that binding. >> >> Ok. For linux, "keypad,key-code" would mean linux keycodes. The >> property name 'keypad,key-code' was chosen since it can be reused on >> non-linux platforms as well. I did have a look at >> Documentation/devicetree/bindings/gpio/gpio-keys.txt while doing thi= s, >> but preferred using 'keypad,key-code' since it would be generic. Giv= en >> a choice, I would like to retain this. > > This was debated a bit on the gpio-keys binding. =A0The binding *must= * > specify where it is getting the keycodes from. =A0For the gpio-keys > binding, it was decided that the Linux keycodes were sufficient since > they are exported to userspace, and therefore part of the stable > kernel ABI (they will never change). =A0"keypad,key-code" is complete= ly > useless as a generic binding since it doesn't specify where the > keycode meanings come from. =A0Besides, "linux,code" can be reused on > non-linux platforms too, it just means that the authoritative source > of the keycodes is the Linux kernel. > > g > Ok. I understand this now. I will change this to "linux,code" in the next submission. Thanks, Thomas. From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas.abraham@linaro.org (Thomas Abraham) Date: Thu, 15 Sep 2011 06:37:48 +0530 Subject: [PATCH 2/2] input: samsung-keypad: Add device tree support In-Reply-To: References: <1315916779-21793-1-git-send-email-thomas.abraham@linaro.org> <1315916779-21793-2-git-send-email-thomas.abraham@linaro.org> <1315916779-21793-3-git-send-email-thomas.abraham@linaro.org> <20110914161144.GF3134@ponder.secretlab.ca> <20110914171318.GA24425@ponder.secretlab.ca> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 15 September 2011 00:40, Grant Likely wrote: > On Wed, Sep 14, 2011 at 12:09 PM, Thomas Abraham > wrote: >> On 14 September 2011 22:43, Grant Likely wrote: >>> On Wed, Sep 14, 2011 at 10:19:22PM +0530, Thomas Abraham wrote: >>>> On 14 September 2011 21:41, Grant Likely wrote: >>>> > On Tue, Sep 13, 2011 at 05:56:19PM +0530, Thomas Abraham wrote: >>>> >> +- Keys represented as child nodes: Each key connected to the keypad >>>> >> + ?controller is represented as a child node to the keypad controller >>>> >> + ?device node and should include 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. >>>> >> + ?- keypad,key-code: the key-code to be reported when the key is pressed >>>> >> + ? ?and released. >>>> > >>>> > What defines the meanings of the key codes? >>>> >>>> The key-code could be any value which the system would want the keypad >>>> driver to report when that key is pressed. >>> >>> Are they linux keycodes? ?If so, then this property name can >>> probably be linux,code. ?There is already precedence for that >>> usage in Documentation/devicetree/bindings/gpio/gpio-keys.txt. ?(I >>> would personally prefer "linux,key-code", but sometimes it is better >>> to go with existing precidence) You could also use linux,input-type as >>> specified in that binding. >> >> Ok. For linux, "keypad,key-code" would mean linux keycodes. The >> property name 'keypad,key-code' was chosen since it can be reused on >> non-linux platforms as well. I did have a look at >> Documentation/devicetree/bindings/gpio/gpio-keys.txt while doing this, >> but preferred using 'keypad,key-code' since it would be generic. Given >> a choice, I would like to retain this. > > This was debated a bit on the gpio-keys binding. ?The binding *must* > specify where it is getting the keycodes from. ?For the gpio-keys > binding, it was decided that the Linux keycodes were sufficient since > they are exported to userspace, and therefore part of the stable > kernel ABI (they will never change). ?"keypad,key-code" is completely > useless as a generic binding since it doesn't specify where the > keycode meanings come from. ?Besides, "linux,code" can be reused on > non-linux platforms too, it just means that the authoritative source > of the keycodes is the Linux kernel. > > g > Ok. I understand this now. I will change this to "linux,code" in the next submission. Thanks, Thomas.