6 void tpd_debug_no_response(struct i2c_client
*);
7 extern int tpd_debug_nr
;
9 #define TPD_DEBUG_CHECK_NO_RESPONSE \
11 wait_event_interruptible_timeout(waiter,tpd_flag!=0,HZ/10); \
13 tpd_debug_no_response(i2c_client); \
19 void tpd_debug_set_time(void);
20 extern int tpd_debug_time
;
21 extern long tpd_last_2_int_time
[2];
22 extern long tpd_last_down_time
;
23 extern int tpd_start_profiling
;
24 extern int tpd_down_status
;
26 #define TPD_DEBUG_PRINT_INT \
28 if(tpd_debug_time) { \
33 #define TPD_DEBUG_PRINT_UP \
35 if(pending==0 && tpd_debug_time) { \
37 printk("up on %ld ms (+%ld ms)\n", \
38 (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \
39 (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \
43 #define TPD_DEBUG_PRINT_DOWN \
45 if(tpd_debug_time) { \
46 if(tpd_down_status==0) printk("down on 0 ms\n"); \
47 else printk("move on %ld ms (+%ld ms)\n", \
48 (tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \
49 (tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \
54 #define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while(0);
56 extern int tpd_em_log
;
57 extern int tpd_em_log_to_fs
;
58 extern int tpd_type_cap
;
60 void tpd_em_log_output(int raw_x
, int raw_y
, int cal_x
, int cal_y
, int p
, int down
);
61 void tpd_em_log_store(int raw_x
, int raw_y
, int cal_x
, int cal_y
, int p
, int down
);
62 void tpd_em_log_release(void);
64 #define TPD_TYPE_RAW_DATA 2
65 #define TPD_TYPE_INT_DOWN 3
66 #define TPD_TYPE_INT_UP 4
67 #define TPD_TYPE_TIMER 5
68 #define TPD_TYPE_REJECT1 6
69 #define TPD_TYPE_REJECT2 7
70 #define TPD_TYPE_FIST_LATENCY 8
72 #define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down) \
75 if (!tpd_em_log_to_fs) { \
76 tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \
78 tpd_em_log_store(raw_x, raw_y, cal_x, cal_y, p, down); \
79 tpd_em_log_output(raw_x, raw_y, cal_x, cal_y, p, down); \
82 tpd_down_status = 1; \
84 tpd_down_status = 0; \
87 if (tpd_em_log_to_fs) { \
88 tpd_em_log_release(); \
93 #ifdef TPD_DEBUG_TRACK
94 extern void *dal_fb_addr
;
95 extern int tpd_debug_track
;
96 void tpd_up_debug_track(int x
, int y
);
97 void tpd_down_debug_track(int x
, int y
);
98 #define TPD_UP_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_up_debug_track(x,y); }while(0)
99 #define TPD_DOWN_DEBUG_TRACK(x,y) do { if(tpd_debug_track) tpd_down_debug_track(x,y); }while(0)
101 #endif // TPD_DEBUG_TRACK
102 #endif // TPD_DEBUG_CODE
104 // Macros that will be embedded in code
106 #ifndef TPD_DEBUG_CHECK_NO_RESPONSE
107 #define TPD_DEBUG_CHECK_NO_RESPONSE
110 #ifndef TPD_DEBUG_SET_TIME
111 #define TPD_DEBUG_SET_TIME
114 #ifndef TPD_DEBUG_PRINT_UP
115 #define TPD_DEBUG_PRINT_UP
118 #ifndef TPD_DEBUG_PRINT_DOWN
119 #define TPD_DEBUG_PRINT_DOWN
122 #ifndef TPD_UP_DEBUG_TRACK
123 #define TPD_UP_DEBUG_TRACK(x,y)
126 #ifndef TPD_DOWN_DEBUG_TRACK
127 #define TPD_DOWN_DEBUG_TRACK(x,y)
131 #endif // TPD_DEBUG_H