Thread (5 messages) 5 messages, 3 authors, 2011-09-15

Re: [PATCH 2/2] input: samsung-keypad: Add device tree support

From: Grant Likely <hidden>
Date: 2011-09-14 19:10:47
Also in: linux-arm-kernel, linux-devicetree, linux-samsung-soc

Possibly related (same subject, not in this thread)

On Wed, Sep 14, 2011 at 12:09 PM, Thomas Abraham
[off-list ref] wrote:
On 14 September 2011 22:43, Grant Likely [off-list ref] wrote:
quoted
On Wed, Sep 14, 2011 at 10:19:22PM +0530, Thomas Abraham wrote:
quoted
On 14 September 2011 21:41, Grant Likely [off-list ref] wrote:
quoted
On Tue, Sep 13, 2011 at 05:56:19PM +0530, Thomas Abraham wrote:
quoted
+- 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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help