mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
bd3ce65560
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>
15 lines
309 B
C
15 lines
309 B
C
#ifndef __ROTARY_ENCODER_H__
|
|
#define __ROTARY_ENCODER_H__
|
|
|
|
struct rotary_encoder_platform_data {
|
|
unsigned int steps;
|
|
unsigned int axis;
|
|
unsigned int gpio_a;
|
|
unsigned int gpio_b;
|
|
unsigned int inverted_a;
|
|
unsigned int inverted_b;
|
|
bool relative_axis;
|
|
bool rollover;
|
|
};
|
|
|
|
#endif /* __ROTARY_ENCODER_H__ */
|