Jongrak Kwon | ae680ab | 2012-06-15 22:06:54 -0700 | [diff] [blame] | 1 | /* include/linux/lge_touch_core.h |
| 2 | * |
| 3 | * Copyright (C) 2011 LGE. |
| 4 | * |
| 5 | * Writer: yehan.ahn@lge.com, hyesung.shin@lge.com |
| 6 | * |
| 7 | * This software is licensed under the terms of the GNU General Public |
| 8 | * License version 2, as published by the Free Software Foundation, and |
| 9 | * may be copied, distributed, and modified under those terms. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #ifndef LGE_TOUCH_SYNAPTICS_H |
| 19 | #define LGE_TOUCH_SYNAPTICS_H |
| 20 | |
Jongrak Kwon | ae680ab | 2012-06-15 22:06:54 -0700 | [diff] [blame] | 21 | #define ARRAYED_TOUCH_FW_BIN |
Jongrak Kwon | ae680ab | 2012-06-15 22:06:54 -0700 | [diff] [blame] | 22 | #define NUM_OF_EACH_FINGER_DATA_REG 5 |
| 23 | #define MAX_NUM_OF_FINGERS 10 |
| 24 | |
| 25 | #define DESCRIPTION_TABLE_START 0xe9 |
Jongrak Kwon | 420825a | 2012-06-26 16:33:25 -0700 | [diff] [blame] | 26 | #define ANALOG_TABLE_START 0xe9 |
| 27 | #define BUTTON_TABLE_START 0xe3 |
Jongrak Kwon | ae680ab | 2012-06-15 22:06:54 -0700 | [diff] [blame] | 28 | |
| 29 | struct ts_function_descriptor { |
| 30 | u8 query_base; |
| 31 | u8 command_base; |
| 32 | u8 control_base; |
| 33 | u8 data_base; |
| 34 | u8 int_source_count; |
| 35 | u8 id; |
| 36 | }; |
| 37 | |
| 38 | struct finger_data { |
| 39 | u8 finger_status_reg[3]; |
| 40 | u8 finger_reg[MAX_NUM_OF_FINGERS][NUM_OF_EACH_FINGER_DATA_REG]; |
| 41 | }; |
| 42 | |
| 43 | struct button_data { |
| 44 | u16 key_code; |
| 45 | }; |
| 46 | |
| 47 | struct cur_touch_data { |
| 48 | u8 device_status_reg; /* DEVICE_STATUS_REG */ |
| 49 | u8 interrupt_status_reg; |
| 50 | u8 button_data_reg; |
| 51 | struct finger_data finger; |
| 52 | struct button_data button; |
| 53 | }; |
| 54 | |
| 55 | struct interrupt_bit_mask { |
| 56 | u8 flash; |
| 57 | u8 status; |
| 58 | u8 abs; |
| 59 | u8 button; |
| 60 | }; |
| 61 | |
| 62 | struct synaptics_ts_data { |
| 63 | u8 is_probed; |
| 64 | struct regulator *regulator_vdd; |
| 65 | struct regulator *regulator_vio; |
| 66 | struct i2c_client *client; |
| 67 | struct touch_platform_data *pdata; |
| 68 | struct ts_function_descriptor common_dsc; |
| 69 | struct ts_function_descriptor finger_dsc; |
| 70 | struct ts_function_descriptor button_dsc; |
| 71 | struct ts_function_descriptor flash_dsc; |
| 72 | struct cur_touch_data ts_data; |
| 73 | struct touch_fw_info *fw_info; |
| 74 | struct interrupt_bit_mask interrupt_mask; |
| 75 | #if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372) |
| 76 | struct ts_function_descriptor analog_dsc; |
| 77 | #endif |
| 78 | |
| 79 | #if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372) |
| 80 | u8 ic_panel_type; |
| 81 | #endif |
| 82 | }; |
| 83 | |
| 84 | #if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372) |
| 85 | enum {IC7020_GFF, IC7020_G2, IC3203_G2, IC7020_GFF_H_PTN, IC7020_G2_H_PTN}; |
| 86 | #endif |
| 87 | |
| 88 | /* extern function */ |
| 89 | extern int FirmwareUpgrade(struct synaptics_ts_data *ts, const char* fw_path); |
| 90 | #endif |