summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ist30xx/ist30xx_tsp.h
blob: aca0a629d87c876507faad2ccaff272abc9dfd8e (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
/*
 *  Copyright (C) 2010, Imagis Technology Co. Ltd. All Rights Reserved.
 *
 *  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.
 *
 */

#ifndef __IST30XX_TSP_H__
#define __IST30XX_TSP_H__

#define IST30XX_DD_VERSION  (3)
// Multi TSP not yet enabled in imagis 3038.
#define IST30XX_MULTIPLE_TSP    (0)

#define TSP_CHIP_VENDOR     ("IMAGIS")
#define TSP_CHIP_NAME       ("IST3038")

#define FLAG_NODE_Y         (0)
#define FLAG_NODE_X         (1)

#define NODE_TX_NUM         (22)
#define NODE_RX_NUM         (14)
#define NODE_TOTAL_NUM      (NODE_TX_NUM * NODE_RX_NUM)

#define TSP_TX_NUM          (21)
#define TSP_RX_NUM          (13)
#define TSP_TOTAL_NUM       (TSP_TX_NUM * TSP_RX_NUM)

#define TSP_THRESHOLD       (30)
#define TKEY_THRESHOLD      (600)

#define IST30XXB_PARSE_TSPTYPE(k)   ((k >> 1) & 0xF)

#define TSP_TYPE_UNKNOWN    (0xF0)
#define TSP_TYPE_ALPS       (0xF)
#define TSP_TYPE_EELY       (0xE)
#define TSP_TYPE_TOP        (0xD)
#define TSP_TYPE_MELFAS     (0xC)
#define TSP_TYPE_ILJIN      (0xB)
#define TSP_TYPE_SYNOPEX    (0xA)
#define TSP_TYPE_SMAC       (0x9)
#define TSP_TYPE_OTHERS     (0x8)

#endif  // __IST30XX_TSP_H__