Merge tag 'lsk-v4.4-16.06-android'
[firefly-linux-kernel-4.4.55.git] / drivers / input / touchscreen / gt801_ts.h
1 /*
2  * drivers/input/touchscreen/gt801_ts.h
3  *
4  * Copyright (C) 2010 ROCKCHIP, Inc.
5  *
6  * This software is licensed under the terms of the GNU General Public
7  * License version 2, as published by the Free Software Foundation, and
8  * may be copied, distributed, and modified under those terms.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
15
16 #ifndef __DRIVERS_TOUCHSCREEN_GT801_TS_H
17 #define __DRIVERS_TOUCHSCREEN_GT801_TS_H
18
19 #define IOMUX_NAME_SIZE 48
20
21 enum regadd {
22         ptxh = 0, ptxl = 1, ptyh = 2, ptyl = 3, ptpressure = 4,
23 };
24 enum touchstate {
25         TOUCH_UP = 0, TOUCH_DOWN = 1,
26 };      
27
28 struct gt801_platform_data {
29
30         u16             model;                  /* 801. */
31         bool    swap_xy;                /* swap x and y axes */
32         u16             x_min, x_max;
33         u16             y_min, y_max;
34     int         gpio_reset;
35     int     gpio_reset_active_low;
36         int             gpio_pendown;           /* the GPIO used to decide the pendown */
37
38         char    pendown_iomux_name[IOMUX_NAME_SIZE];
39         char    resetpin_iomux_name[IOMUX_NAME_SIZE];
40         int             pendown_iomux_mode;
41         int             resetpin_iomux_mode;
42         
43         int         (*get_pendown_state)(void);
44 };
45 #endif