[PATCH v2] Input: matrix-keypad - support binary column select gpios

Stephen Warren swarren at wwwdotorg.org
Thu Feb 21 08:09:03 EST 2013


On 02/20/2013 12:27 PM, Anatolij Gustschin wrote:
> On hardware with limited gpios one column select gpio can select
> two different rows when using some additional hardware logic:
> high value selects one row, low value selects another row. Add
> support for such matrix keyboards and document device tree
> bindings used to describe them.
> 
> Since half of the columns is always not selected, interrupts won't be
> generated for press events on these columns. To generate interrupts
> for not selected columns we need to periodicaly switch to these columns
> in order to catch the potential press events. This is done by additional
> work function.

> diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt

> +- col-gpios-binary:	specify that high and low states of a column gpio
> +			select two different rows (boards with limited gpios
> +			could support this by additional hardware logic)

1 GPIO and 2 columns is essentially a special case with a 1->2 line decoder.

Do the binding definition and code work fine if you have e.g. 3 GPIOs,
and a 3->8 decoder in order to support 8 columns?


More information about the devicetree-discuss mailing list