1 /* linux/spi/ads7846.h */
3 /* Touchscreen characteristics vary between boards and models. The
4 * platform_data for the device's "struct device" holds this information.
6 * It's OK if the min/max values are zero.
10 ADS7846_FILTER_REPEAT,
11 ADS7846_FILTER_IGNORE,
14 struct ads7846_platform_data {
15 u16 model; /* 7843, 7845, 7846. */
16 u16 vref_delay_usecs; /* 0 for external vref; etc */
17 u16 vref_mv; /* external vref value, milliVolts */
18 bool keep_vref_on; /* set to keep vref on for differential
19 * measurements as well */
21 /* Settling time of the analog signals; a function of Vcc and the
22 * capacitance on the X/Y drivers. If set to non-zero, two samples
23 * are taken with settle_delay us apart, and the second one is used.
24 * ~150 uSec with 0.01uF caps.
26 u16 settle_delay_usecs;
28 /* If set to non-zero, after samples are taken this delay is applied
29 * and penirq is rechecked, to help avoid false events. This value
30 * is affected by the material used to build the touch layer.
32 u16 penirq_recheck_delay_usecs;
39 u16 pressure_min, pressure_max;
41 u16 debounce_max; /* max number of additional readings
43 u16 debounce_tol; /* tolerance used for filtering */
44 u16 debounce_rep; /* additional consecutive good readings
45 * required after the first two */
46 int (*get_pendown_state)(void);
47 int (*filter_init) (struct ads7846_platform_data *pdata,
49 int (*filter) (void *filter_data, int data_idx, int *val);
50 void (*filter_cleanup)(void *filter_data);