diff mbox

rotary encoder

Message ID 6F142F21F5134B03BDACDD706E7BCA3C@tech (mailing list archive)
State New, archived
Headers show

Commit Message

Dmitriy Vasil'ev June 29, 2010, 3:06 p.m. UTC
None
diff mbox

Patch

diff -ur linux-2.6.34/include/linux/rotary_encoder.h 
linux/include/linux/rotary_encoder.h
--- linux-2.6.34/include/linux/rotary_encoder.h Mon May 17 01:17:36 2010
+++ linux/include/linux/rotary_encoder.h Thu Jun 17 14:23:26 2010
@@ -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__ */