input: touch: raydium: v60.6 code drop
[linux-2.6.git] / include / linux / spi / rm31080a_ctrl.h
1 /*
2  * Raydium RM31080 touchscreen header
3  *
4  * Copyright (C) 2012-2013, Raydium Semiconductor Corporation.
5  * Copyright (C) 2012-2013, NVIDIA Corporation.  All Rights Reserved.
6  *
7  * This program is free software; you can redistribute  it and/or modify it
8  * under  the terms of  the GNU General  Public License as published by the
9  * Free Software Foundation;  either version 2 of the  License, or (at your
10  * option) any later version.
11  *
12  */
13 #ifndef _RM31080A_CTRL_H_
14 #define _RM31080A_CTRL_H_
15
16 #define RM31080_REG_11 0x11
17 #define RM31080_REG_1F 0x1F
18
19 #define FILTER_NONTHRESHOLD_MODE                0x00
20
21 #define REPEAT_1                                                0x00
22
23 struct rm_tch_ctrl_para {
24
25         unsigned short u16DataLength;
26         unsigned short bICVersion;
27         unsigned short u16ResolutionX;
28         unsigned short u16ResolutionY;
29
30         unsigned char bActiveRepeatTimes[2];
31         unsigned char bIdleRepeatTimes[2];
32         unsigned char bTime2Idle;
33         unsigned char bfPowerMode;
34         unsigned char bDebugMessage;
35         unsigned char bTimerTriggerScale;
36         unsigned char bfIdleModeCheck;
37         unsigned char bWatchDogNormalCnt;
38 };
39
40 extern struct rm_tch_ctrl_para g_stCtrl;
41
42 int rm_tch_ctrl_clear_int(void);
43 int rm_tch_ctrl_scan_start(void);
44 void rm_tch_ctrl_wait_for_scan_finish(void);
45
46 void rm_tch_ctrl_init(void);
47 unsigned char rm_tch_ctrl_get_idle_mode(unsigned char *p);
48 void rm_tch_ctrl_set_parameter(void *arg);
49 void rm_set_repeat_times(u8 u8Times);
50 #endif                          /*_RM31080A_CTRL_H_*/