2 * Copyright (C) 2010, Imagis Technology Co. Ltd. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 #ifndef __IST30XX_MISC_H__
17 #define __IST30XX_MISC_H__
19 #include "ist30xx_tsp.h"
22 #define IST30XXB_RAW_ADDR (0x40100200)
23 #define IST30XXB_FILTER_ADDR (0x40101000)
25 #define IST30XX_RX_CNT_ADDR (0x20000038)
26 #define IST30XX_CONFIG_ADDR (0x20000040)
28 #define NODE_FLAG_RAW (1)
29 #define NODE_FLAG_BASE (1 << 1)
30 #define NODE_FLAG_FILTER (1 << 2)
31 #define NODE_FLAG_DIFF (1 << 3)
32 #define NODE_FLAG_ALL (0xF)
33 #define NODE_FLAG_NO_CCP (1 << 7)
40 u16 raw[NODE_TX_NUM][NODE_RX_NUM];
41 u16 base[NODE_TX_NUM][NODE_RX_NUM];
42 u16 filter[NODE_TX_NUM][NODE_RX_NUM];
49 struct TSP_DIRECTION {
54 typedef struct _TSP_INFO {
55 struct TSP_CH_NUM ch_num;
56 struct TSP_DIRECTION dir;
57 struct TSP_NODE_BUF node;
62 typedef struct _TKEY_INFO {
70 int ist30xx_parse_touch_node(u8 flag, struct TSP_NODE_BUF *node);
71 int ist30xx_read_touch_node(u8 flag, struct TSP_NODE_BUF *node);
73 int ist30xx_tsp_update_info(void);
74 int ist30xx_tkey_update_info(void);
76 int ist30xx_get_tsp_info(struct ist30xx_data *data);
77 int ist30xx_get_tkey_info(struct ist30xx_data *data);
79 int ist30xx_init_misc_sysfs(void);
81 #endif // __IST30XX_MISC_H__