1 /* BEGIN PN:DTS2013051703879 ,Added by l00184147, 2013/5/17*/
2 //add Touch driver for G610-T11
3 /* BEGIN PN:DTS2013012601133 ,Modified by l00184147, 2013/1/26*/
4 /* BEGIN PN:DTS2013011401860 ,Modified by l00184147, 2013/1/14*/
5 /* BEGIN PN:SPBB-1218 ,Added by l00184147, 2012/12/20*/
8 * Cypress TrueTouch(TM) Standard Product V4 Core driver module.
9 * For use with Cypress Txx4xx parts.
10 * Supported parts include:
14 * Copyright (C) 2012 Cypress Semiconductor
15 * Copyright (C) 2011 Sony Ericsson Mobile Communications AB.
17 * Author: Aleksej Makarov <aleksej.makarov@sonyericsson.com>
18 * Modifed by: Cypress Semiconductor to add touch settings
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22 * version 2, and only version 2, as published by the
23 * Free Software Foundation.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License along
31 * with this program; if not, write to the Free Software Foundation, Inc.,
32 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34 * Contact Cypress Semiconductor at www.cypress.com <ttdrivers@cypress.com>
38 #ifndef _LINUX_CYTTSP4_CORE_H
39 #define _LINUX_CYTTSP4_CORE_H
41 #define CYTTSP4_CORE_NAME "cyttsp4_core"
43 #define CYTTSP4_STR(x) #x
44 #define CYTTSP4_STRINGIFY(x) CYTTSP4_STR(x)
46 #define CY_DRIVER_NAME TTDA
47 #define CY_DRIVER_MAJOR 02
48 #define CY_DRIVER_MINOR 02
50 #define CY_DRIVER_REVCTRL 402597 /*00000A */
52 #define CY_DRIVER_VERSION \
53 CYTTSP4_STRINGIFY(CY_DRIVER_NAME) \
54 "." CYTTSP4_STRINGIFY(CY_DRIVER_MAJOR) \
55 "." CYTTSP4_STRINGIFY(CY_DRIVER_MINOR) \
56 "." CYTTSP4_STRINGIFY(CY_DRIVER_REVCTRL)
58 #define CY_DRIVER_DATE "20121109" /* YYYYMMDD */
60 /* x-axis resolution of panel in pixels */
61 #define CY_PCFG_RESOLUTION_X_MASK 0x7F
63 /* y-axis resolution of panel in pixels */
64 #define CY_PCFG_RESOLUTION_Y_MASK 0x7F
66 /* x-axis, 0:origin is on left side of panel, 1: right */
67 #define CY_PCFG_ORIGIN_X_MASK 0x80
69 /* y-axis, 0:origin is on top side of panel, 1: bottom */
70 #define CY_PCFG_ORIGIN_Y_MASK 0x80
72 #define CY_TOUCH_SETTINGS_MAX 32
73 #define CY_TOUCH_SETTINGS_PARAM_REGS 6
75 struct touch_settings
{
83 struct cyttsp4_touch_firmware
{
90 /* BEGIN PN:SPBB-1254 ,Added by F00184246, 2013/2/18*/
91 struct cyttsp4_sett_param_map
{
93 struct touch_settings
*param
;
95 /* END PN:SPBB-1254 ,Added by F00184246, 2013/2/18*/
96 /* BEGIN PN:SPBB-1254 ,Modified by F00184246, 2013/2/18*/
97 struct cyttsp4_loader_platform_data
{
98 struct cyttsp4_touch_firmware
*fw
;
99 struct touch_settings
*param_regs
;
100 struct touch_settings
*param_size
;
101 struct cyttsp4_sett_param_map
*param_map
;
104 /* END PN:SPBB-1254 ,Modified by F00184246, 2013/2/18*/
106 struct cyttsp4_core_platform_data
{
109 int level_irq_udelay
;
110 unsigned use_configure_sensitivity
:1;
111 int (*xres
)(struct cyttsp4_core_platform_data
*pdata
,
113 int (*init
)(struct cyttsp4_core_platform_data
*pdata
,
114 int on
, struct device
*dev
);
115 int (*power
)(struct cyttsp4_core_platform_data
*pdata
,
116 int on
, struct device
*dev
, atomic_t
*ignore_irq
);
117 int (*irq_stat
)(struct cyttsp4_core_platform_data
*pdata
,
119 struct touch_settings
*sett
[CY_TOUCH_SETTINGS_MAX
];
120 struct cyttsp4_loader_platform_data
*loader_pdata
;
124 extern void cyttsp4_pr_buf(struct device
*dev
, u8
*pr_buf
, u8
*dptr
, int size
,
125 const char *data_name
);
127 #define cyttsp4_pr_buf(a, b, c, d, e) do { } while (0)
130 #endif /* _LINUX_CYTTSP4_CORE_H */
131 /* END PN:SPBB-1218 ,Added by l00184147, 2012/12/20*/
132 /* END PN:DTS2013011401860 ,Modified by l00184147, 2013/1/14*/
133 /* END PN:DTS2013012601133 ,Modified by l00184147, 2013/1/26*/
134 /* END PN:DTS2013051703879 ,Added by l00184147, 2013/5/17*/