]> Pileus Git - ~andy/linux/blobdiff - drivers/input/mouse/synaptics.h
Input: synaptics - refactor agm packet parsing
[~andy/linux] / drivers / input / mouse / synaptics.h
index 7453938bf5efb4f9c6903316349d9f29f0761ae6..a9efbf3e3ea1c833208dd689da64649937929298 100644 (file)
@@ -19,7 +19,8 @@
 #define SYN_QUE_RESOLUTION             0x08
 #define SYN_QUE_EXT_CAPAB              0x09
 #define SYN_QUE_EXT_CAPAB_0C           0x0c
-#define SYN_QUE_EXT_DIMENSIONS         0x0d
+#define SYN_QUE_EXT_MAX_COORDS         0x0d
+#define SYN_QUE_EXT_MIN_COORDS         0x0f
 
 /* synatics modes */
 #define SYN_BIT_ABSOLUTE_MODE          (1 << 7)
  * 1   0x60    multifinger mode        identifies firmware finger counting
  *                                     (not reporting!) algorithm.
  *                                     Not particularly meaningful
- * 1   0x80    covered pad             W clipped to 14, 15 == pad mostly covered
- * 2   0x01    clickpad bit 1          2-button ClickPad
- * 2   0x02    deluxe LED controls     touchpad support LED commands
+ * 1   0x80    covered pad             W clipped to 14, 15 == pad mostly covered
+ * 2   0x01    clickpad bit 1          2-button ClickPad
+ * 2   0x02    deluxe LED controls     touchpad support LED commands
  *                                     ala multimedia control bar
  * 2   0x04    reduced filtering       firmware does less filtering on
  *                                     position data, driver should watch
  *                                     for noise.
+ * 2   0x20    report min              query 0x0f gives min coord reported
  */
 #define SYN_CAP_CLICKPAD(ex0c)         ((ex0c) & 0x100000) /* 1-button ClickPad */
 #define SYN_CAP_CLICKPAD2BTN(ex0c)     ((ex0c) & 0x000100) /* 2-button ClickPad */
 #define SYN_CAP_MAX_DIMENSIONS(ex0c)   ((ex0c) & 0x020000)
+#define SYN_CAP_MIN_DIMENSIONS(ex0c)   ((ex0c) & 0x002000)
 #define SYN_CAP_ADV_GESTURE(ex0c)      ((ex0c) & 0x080000)
+#define SYN_CAP_REDUCED_FILTERING(ex0c)        ((ex0c) & 0x000400)
 
 /* synaptics modes query bits */
 #define SYN_MODE_ABSOLUTE(m)           ((m) & (1 << 7))
 #define SYN_NEWABS_RELAXED             2
 #define SYN_OLDABS                     3
 
+/* amount to fuzz position data when touchpad reports reduced filtering */
+#define SYN_REDUCED_FILTER_FUZZ                8
+
 /*
  * A structure to describe the state of the touchpad hardware (buttons and pad)
  */
@@ -130,7 +137,8 @@ struct synaptics_data {
        unsigned long int ext_cap_0c;           /* Ext Caps from 0x0c query */
        unsigned long int identity;             /* Identification */
        unsigned int x_res, y_res;              /* X/Y resolution in units/mm */
-       unsigned int x_max, y_max;              /* Max dimensions (from FW) */
+       unsigned int x_max, y_max;              /* Max coordinates (from FW) */
+       unsigned int x_min, y_min;              /* Min coordinates (from FW) */
 
        unsigned char pkt_type;                 /* packet type - old, new, etc */
        unsigned char mode;                     /* current mode byte */
@@ -138,7 +146,11 @@ struct synaptics_data {
 
        struct serio *pt_port;                  /* Pass-through serio port */
 
-       struct synaptics_hw_state mt;           /* current gesture packet */
+       /*
+        * Last received Advanced Gesture Mode (AGM) packet. An AGM packet
+        * contains position data for a second contact, at half resolution.
+        */
+       struct synaptics_hw_state agm;
 };
 
 void synaptics_module_init(void);