diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2009-04-17 23:12:35 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-04-17 23:37:21 -0400 |
commit | bd3ce6556072bdc8ea66dfd5448e184f189bdc7f (patch) | |
tree | 264a0272647abe0ae4a7093abb3d6afc9b0a1bd2 /include | |
parent | 3f3e7c6e139f704e2f48ea3b45ff7724a8d46456 (diff) |
Input: rotary_encoder - add support for REL_* axes
The rotary encoder driver only supports returning input events
for ABS_* axes, this adds support for REL_* axes. The relative
axis input event is reported as -1 for each counter-clockwise
step and +1 for each clockwise step.
The ability to clamp the position of ABS_* axes between 0 and
a maximum of "steps" has also been added.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rotary_encoder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h index 12d63a30c347..215278b8df2a 100644 --- a/include/linux/rotary_encoder.h +++ b/include/linux/rotary_encoder.h | |||
@@ -8,6 +8,8 @@ struct rotary_encoder_platform_data { | |||
8 | unsigned int gpio_b; | 8 | unsigned int gpio_b; |
9 | unsigned int inverted_a; | 9 | unsigned int inverted_a; |
10 | unsigned int inverted_b; | 10 | unsigned int inverted_b; |
11 | bool relative_axis; | ||
12 | bool rollover; | ||
11 | }; | 13 | }; |
12 | 14 | ||
13 | #endif /* __ROTARY_ENCODER_H__ */ | 15 | #endif /* __ROTARY_ENCODER_H__ */ |