blob: 58368be0b4c075465443f8574e0d333c6c30b212 [file] [log] [blame]
Michael Hennerichb4be4682009-03-09 20:12:52 -07001/* linux/spi/ad7879.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 */
8struct ad7879_platform_data {
9 u16 model; /* 7879 */
10 u16 x_plate_ohms;
11 u16 x_min, x_max;
12 u16 y_min, y_max;
13 u16 pressure_min, pressure_max;
14
Michael Hennerich66808842012-07-06 10:44:19 -070015 bool swap_xy; /* swap x and y axes */
16
Michael Hennerichb4be4682009-03-09 20:12:52 -070017 /* [0..255] 0=OFF Starts at 1=550us and goes
18 * all the way to 9.440ms in steps of 35us.
19 */
20 u8 pen_down_acc_interval;
21 /* [0..15] Starts at 0=128us and goes all the
22 * way to 4.096ms in steps of 128us.
23 */
24 u8 first_conversion_delay;
25 /* [0..3] 0 = 2us, 1 = 4us, 2 = 8us, 3 = 16us */
26 u8 acquisition_time;
27 /* [0..3] Average X middle samples 0 = 2, 1 = 4, 2 = 8, 3 = 16 */
28 u8 averaging;
29 /* [0..3] Perform X measurements 0 = OFF,
30 * 1 = 4, 2 = 8, 3 = 16 (median > averaging)
31 */
32 u8 median;
Michael Hennerichec51b7f2010-01-19 00:27:58 -080033 /* 1 = AUX/VBAT/GPIO export GPIO to gpiolib
34 * requires CONFIG_GPIOLIB
35 */
36 bool gpio_export;
37 /* identifies the first GPIO number handled by this chip;
38 * or, if negative, requests dynamic ID allocation.
39 */
40 s32 gpio_base;
Michael Hennerichb4be4682009-03-09 20:12:52 -070041};