diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spi/rm31080a_ts.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/include/linux/spi/rm31080a_ts.h b/include/linux/spi/rm31080a_ts.h index 8a07282e1..992b3f692 100644 --- a/include/linux/spi/rm31080a_ts.h +++ b/include/linux/spi/rm31080a_ts.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #define FALSE 0 | 24 | #define FALSE 0 |
| 25 | #define DEBUG_DRIVER 0x01 | 25 | #define DEBUG_DRIVER 0x01 |
| 26 | #define DEBUG_REGISTER 0x02 | 26 | #define DEBUG_REGISTER 0x02 |
| 27 | #define DEBUG_KTHREAD 0x04 | ||
| 27 | 28 | ||
| 28 | #define RM_IOCTL_REPORT_POINT 0x1001 | 29 | #define RM_IOCTL_REPORT_POINT 0x1001 |
| 29 | #define RM_IOCTL_SET_HAL_PID 0x1002 | 30 | #define RM_IOCTL_SET_HAL_PID 0x1002 |
| @@ -48,7 +49,7 @@ | |||
| 48 | #define RM_VARIABLE_DPW 0x0B | 49 | #define RM_VARIABLE_DPW 0x0B |
| 49 | #define RM_VARIABLE_NS_MODE 0x0C | 50 | #define RM_VARIABLE_NS_MODE 0x0C |
| 50 | #define RM_VARIABLE_TOUCHFILE_STATUS 0x0D | 51 | #define RM_VARIABLE_TOUCHFILE_STATUS 0x0D |
| 51 | #define RM_VARIABLE_STYLUS_STATUS 0x0E | 52 | #define RM_VARIABLE_TOUCH_EVENT 0x0E |
| 52 | 53 | ||
| 53 | 54 | ||
| 54 | #define RM_IOCTL_GET_VARIABLE 0x1011 | 55 | #define RM_IOCTL_GET_VARIABLE 0x1011 |
| @@ -59,6 +60,7 @@ | |||
| 59 | #define RM_IOCTL_SET_KRL_TBL 0x1013 | 60 | #define RM_IOCTL_SET_KRL_TBL 0x1013 |
| 60 | #define RM_IOCTL_WATCH_DOG 0x1014 | 61 | #define RM_IOCTL_WATCH_DOG 0x1014 |
| 61 | #define RM_IOCTL_SET_BASELINE 0x1015 | 62 | #define RM_IOCTL_SET_BASELINE 0x1015 |
| 63 | #define RM_IOCTL_INIT_SERVICE 0x1016 | ||
| 62 | 64 | ||
| 63 | #define RM_INPUT_RESOLUTION_X 4096 | 65 | #define RM_INPUT_RESOLUTION_X 4096 |
| 64 | #define RM_INPUT_RESOLUTION_Y 4096 | 66 | #define RM_INPUT_RESOLUTION_Y 4096 |
| @@ -130,6 +132,7 @@ | |||
| 130 | #define KRL_INDEX_RM_WRITE_IMG 13 | 132 | #define KRL_INDEX_RM_WRITE_IMG 13 |
| 131 | #define KRL_INDEX_RM_TLK 14 | 133 | #define KRL_INDEX_RM_TLK 14 |
| 132 | #define KRL_INDEX_RM_KL_TESTMODE 15 | 134 | #define KRL_INDEX_RM_KL_TESTMODE 15 |
| 135 | #define KRL_INDEX_RM_NS_SCF 16 | ||
| 133 | 136 | ||
| 134 | #define KRL_SIZE_SET_IDLE 128 | 137 | #define KRL_SIZE_SET_IDLE 128 |
| 135 | #define KRL_SIZE_PAUSE_AUTO 64 | 138 | #define KRL_SIZE_PAUSE_AUTO 64 |
| @@ -147,6 +150,7 @@ | |||
| 147 | #define KRL_SIZE_RM_WRITE_IMAGE 64 | 150 | #define KRL_SIZE_RM_WRITE_IMAGE 64 |
| 148 | #define KRL_SIZE_RM_TLK 128 | 151 | #define KRL_SIZE_RM_TLK 128 |
| 149 | #define KRL_SIZE_RM_KL_TESTMODE 128 | 152 | #define KRL_SIZE_RM_KL_TESTMODE 128 |
| 153 | #define KRL_SIZE_RM_SCF_PARA 64 | ||
| 150 | 154 | ||
| 151 | #define KRL_TBL_FIELD_POS_LEN_H 0 | 155 | #define KRL_TBL_FIELD_POS_LEN_H 0 |
| 152 | #define KRL_TBL_FIELD_POS_LEN_L 1 | 156 | #define KRL_TBL_FIELD_POS_LEN_L 1 |
| @@ -221,7 +225,8 @@ | |||
| 221 | #define INPUT_PROTOCOL_TYPE_B 0x02 | 225 | #define INPUT_PROTOCOL_TYPE_B 0x02 |
| 222 | #define INPUT_PROTOCOL_CURRENT_SUPPORT INPUT_PROTOCOL_TYPE_B | 226 | #define INPUT_PROTOCOL_CURRENT_SUPPORT INPUT_PROTOCOL_TYPE_B |
| 223 | 227 | ||
| 224 | #define INPUT_POINT_RESET 0x80 | 228 | #define INPUT_SLOT_RESET 0x80 |
| 229 | #define INPUT_ID_RESET 0xFF | ||
| 225 | #define MAX_REPORT_TOUCHED_POINTS 10 | 230 | #define MAX_REPORT_TOUCHED_POINTS 10 |
| 226 | 231 | ||
| 227 | #define POINT_TYPE_NONE 0x00 | 232 | #define POINT_TYPE_NONE 0x00 |
| @@ -244,6 +249,24 @@ | |||
| 244 | * NOTE: Need to sync with HAL | 249 | * NOTE: Need to sync with HAL |
| 245 | ***************************************************************************/ | 250 | ***************************************************************************/ |
| 246 | 251 | ||
| 252 | /*#define ENABLE_CALC_QUEUE_COUNT*/ | ||
| 253 | #define ENABLE_SLOW_SCAN | ||
| 254 | #define ENABLE_SMOOTH_LEVEL | ||
| 255 | #define ENABLE_SPI_SETTING 0 | ||
| 256 | #define ENABLE_FREQ_HOPPING 1 | ||
| 257 | #define ENABLE_QUEUE_GUARD 0 | ||
| 258 | #define ENABLE_EVENT_QUEUE 0 | ||
| 259 | |||
| 260 | #define ISR_POST_HANDLER WORK_QUEUE /*or KTHREAD*/ | ||
| 261 | #define WORK_QUEUE 0 | ||
| 262 | #define KTHREAD 1 | ||
| 263 | |||
| 264 | enum tch_update_reason { | ||
| 265 | STYLUS_DISABLE_BY_WATER = 0x01, | ||
| 266 | STYLUS_DISABLE_BY_NOISE, | ||
| 267 | STYLUS_IS_ENABLED = 0xFF, | ||
| 268 | }; | ||
| 269 | |||
| 247 | struct rm_touch_event { | 270 | struct rm_touch_event { |
| 248 | unsigned char uc_touch_count; | 271 | unsigned char uc_touch_count; |
| 249 | unsigned char uc_id[RM_TS_MAX_POINTS]; | 272 | unsigned char uc_id[RM_TS_MAX_POINTS]; |
| @@ -257,6 +280,13 @@ struct rm_touch_event { | |||
| 257 | unsigned char uc_pre_tool_type[RM_TS_MAX_POINTS]; | 280 | unsigned char uc_pre_tool_type[RM_TS_MAX_POINTS]; |
| 258 | }; | 281 | }; |
| 259 | 282 | ||
| 283 | #if ENABLE_EVENT_QUEUE | ||
| 284 | struct rm_touch_event_list { | ||
| 285 | struct list_head next_event; | ||
| 286 | struct rm_touch_event *event_record; | ||
| 287 | }; | ||
| 288 | #endif | ||
| 289 | |||
| 260 | struct rm_spi_ts_platform_data { | 290 | struct rm_spi_ts_platform_data { |
| 261 | int gpio_reset; | 291 | int gpio_reset; |
| 262 | int gpio_1v8; | 292 | int gpio_1v8; |
