aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/wacom/wacom_i2c_func.h
blob: 3754e138741f38ba616a928d42fe2268c3acbffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
 *  wacom_i2c_func.h - Wacom G5 Digitizer Controller (I2C bus)
 *
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

 #ifndef _LINUX_WACOM_I2C_FUNC_H
#define _LINUX_WACOM_I2C_FUNC_H

#ifdef CONFIG_SEC_TOUCHSCREEN_DVFS_LOCK
#include <mach/cpufreq.h>
#define SEC_DVFS_LOCK_TIMEOUT 3
#endif

#ifdef SEC_BUS_LOCK
#include <mach/dev.h>
#define SEC_DVFS_LOCK_TIMEOUT_MS	200
#define SEC_BUS_LOCK_FREQ		267160
#define SEC_BUS_LOCK_FREQ2	400200
#endif

#ifdef COOR_WORK_AROUND
extern unsigned char screen_rotate;
extern unsigned char user_hand;
#endif

#define WACOM_I2C_STOP		0x30
#define WACOM_I2C_START		0x31
#define WACOM_I2C_GRID_CHECK	0xC9
#define WACOM_STATUS			0xD8

#ifdef WACOM_USE_BOXFILTER
extern int g_boxThreshold_C[];
extern int g_boxThreshold_X[];
extern int g_boxThreshold_Y[];
extern int g_boxThreshold_Trs[];
#endif

extern int wacom_i2c_send(struct wacom_i2c *wac_i2c,
			  const char *buf, int count, bool mode);
extern int wacom_i2c_recv(struct wacom_i2c *wac_i2c,
			char *buf, int count, bool mode);
extern int wacom_i2c_test(struct wacom_i2c *wac_i2c);
extern int wacom_i2c_coord(struct wacom_i2c *wac_i2c);
extern int wacom_i2c_query(struct wacom_i2c *wac_i2c);
extern int wacom_checksum(struct wacom_i2c *wac_i2c);
extern void forced_release(struct wacom_i2c *wac_i2c);
#ifdef WACOM_PDCT_WORK_AROUND
extern void forced_hover(struct wacom_i2c *wac_i2c);
#endif

#ifdef WACOM_IRQ_WORK_AROUND
extern void wacom_i2c_pendct_work(struct work_struct *work);
#endif

#ifdef CONFIG_SEC_TOUCHSCREEN_DVFS_LOCK
extern void free_dvfs_lock(struct work_struct *work);
#endif

#endif	/* _LINUX_WACOM_I2C_FUNC_H */