linux/include/linux/rotary_encoder.h
@@ -1,15 +1,28 @@
#ifndef __ROTARY_ENCODER_H__
#define __ROTARY_ENCODER_H__
+struct rotary_encoder_button {
+ /* Configuration parameters */
+ u16 code; /* input event code (KEY_*, SW_*) */
+ int gpio;
+ int active_low;
+ //char *desc;
+ u16 type; /* input event type (EV_KEY, EV_SW) */
+ int debounce_interval; /* debounce ticks interval in msecs */
+ bool rep;/* enable input subsystem auto repeat */
+};
+
struct rotary_encoder_platform_data {
unsigned int steps;
- unsigned int axis;
+ u16 type; /*(EV_KEY, EV_REL, EV_ABS)*/
unsigned int gpio_a;
unsigned int gpio_b;
unsigned int inverted_a;
unsigned int inverted_b;
- bool relative_axis;
+ u16 codeleft; /*(REL_X, REL_Y, ABS_X, ABS_Y, KEY_...)*/
+ u16 coderight; /*(REL_X, REL_Y, ABS_X, ABS_Y, KEY_...)*/
bool rollover;
+ struct rotary_encoder_button button;
};
#endif /* __ROTARY_ENCODER_H__ */