Input: rotary-encoder - support more than 2 gpios as input

This changes how the used gpios are stored (i.e. a struct gpio_descs
instead of two struct gpio_desc) and as with >2 gpios the states are
numbered differently the function rotary_encoder_get_state returns
unencoded numbers instead of grey encoded numbers before. The latter has
some implications on how the returned value is used and so the change is
bigger than one might expect at first.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Uwe Kleine-König
2016-03-01 18:25:26 -08:00
committed by Dmitry Torokhov
parent a9e340dce3
commit 7dde4e7474
2 changed files with 65 additions and 93 deletions

View File

@@ -1,7 +1,7 @@
Rotary encoder DT bindings
Required properties:
- gpios: a spec for two GPIOs to be used
- gpios: a spec for at least two GPIOs to be used, most significant first
Optional properties:
- linux,axis: the input subsystem axis to map to this rotary encoder.