Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ads7846.h
Go to the documentation of this file.
1 /* linux/spi/ads7846.h */
2 
3 /* Touchscreen characteristics vary between boards and models. The
4  * platform_data for the device's "struct device" holds this information.
5  *
6  * It's OK if the min/max values are zero.
7  */
12 };
13 
15  u16 model; /* 7843, 7845, 7846, 7873. */
16  u16 vref_delay_usecs; /* 0 for external vref; etc */
17  u16 vref_mv; /* external vref value, milliVolts
18  * ads7846: if 0, use internal vref */
19  bool keep_vref_on; /* set to keep vref on for differential
20  * measurements as well */
21  bool swap_xy; /* swap x and y axes */
22 
23  /* Settling time of the analog signals; a function of Vcc and the
24  * capacitance on the X/Y drivers. If set to non-zero, two samples
25  * are taken with settle_delay us apart, and the second one is used.
26  * ~150 uSec with 0.01uF caps.
27  */
29 
30  /* If set to non-zero, after samples are taken this delay is applied
31  * and penirq is rechecked, to help avoid false events. This value
32  * is affected by the material used to build the touch layer.
33  */
35 
38 
42 
43  u16 debounce_max; /* max number of additional readings
44  * per sample */
45  u16 debounce_tol; /* tolerance used for filtering */
46  u16 debounce_rep; /* additional consecutive good readings
47  * required after the first two */
48  int gpio_pendown; /* the GPIO used to decide the pendown
49  * state if get_pendown_state == NULL */
50  int gpio_pendown_debounce; /* platform specific debounce time for
51  * the gpio_pendown */
54  void **filter_data);
55  int (*filter) (void *filter_data, int data_idx, int *val);
56  void (*filter_cleanup)(void *filter_data);
58  bool wakeup;
59  unsigned long irq_flags;
60 };
61