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

Stephen Warren swarren at wwwdotorg.org
Tue Apr 24 02:41:41 EST 2012


On 04/23/2012 09:40 AM, Poddar, Sourav wrote:
> Hi Stephen,
> 
> On Mon, Apr 23, 2012 at 8:56 PM, Stephen Warren <swarren at wwwdotorg.org> 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.


More information about the devicetree-discuss mailing list