Re: [PATCHv3 1/2] drivers: input: keypad: Add device tree support

From: Stephen Warren
Date: Mon Apr 23 2012 - 12:41:43 EST

On 04/23/2012 09:40 AM, Poddar, Sourav wrote:
> Hi Stephen,
> On Mon, Apr 23, 2012 at 8:56 PM, Stephen Warren <swarren@xxxxxxxxxxxxx> wrote:
>> On 04/23/2012 09:27 AM, Sourav Poddar wrote:
>>> Update the Documentation with omap4 keypad device tree
>>> binding information.
>>> Add device tree support for omap4 keypad driver.
>> Shouldn't this use the already-defined matrix keyboard bindings at
>> Documentation/devicetree/bindings/input/matrix-keymap.txt?
> True, that is one way of describing the linux-keymap, but i think it can be
> done either ways.

Well, there certainly is more than one way to represent the data.
However, it'd be best to avoid creating new bindings for every piece of
hardware when there's already an existing binding that can be used. By
reusing the binding, different HW can be configured in the same way thus
re-using any knowledge someone has of the binding.

> Are you hinting at getting rid of Documentation for each seperate modules and
> just use a single Documentation/devicetree/bindings/input/matrix-keymap.txt?

You'd probably still need a device-specific binding in order to define
which compatible values were necessary, which reg values were necessary,
to reference the common binding documentation, to document any required
additional custom properties, and document any limitations. For example,
see how Olof wrote Documentation/devicetree/bindings/input/tegra-kbc.txt
based on the common matrix keyboard binding.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at