mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 19:53:59 +08:00
73969ff0ed
This patch adds a generic driver for rotary encoders connected to GPIO pins of a system. It relies on gpiolib and generic hardware irqs. The documentation that also comes with this patch explains the concept and how to use the driver. Signed-off-by: Daniel Mack <daniel@caiaq.de> Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 lines
272 B
C
14 lines
272 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;
|
|
};
|
|
|
|
#endif /* __ROTARY_ENCODER_H__ */
|