diff --git a/drivers/input/touchscreen/gsl3673.c b/drivers/input/touchscreen/gsl3673.c index 8a9b9f25af6a..c7d45e30c423 100644 --- a/drivers/input/touchscreen/gsl3673.c +++ b/drivers/input/touchscreen/gsl3673.c @@ -25,6 +25,7 @@ #include #include +#include "gsl_point_id.h" #include "tp_suspend.h" #include #define GSL_DEBUG 0 diff --git a/drivers/input/touchscreen/gsl3673.h b/drivers/input/touchscreen/gsl3673.h index bbcdd97fdbcc..ba279a15668c 100644 --- a/drivers/input/touchscreen/gsl3673.h +++ b/drivers/input/touchscreen/gsl3673.h @@ -22,10 +22,6 @@ struct gsl_touch_info int id[10]; int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); unsigned int gsl_config_data_id_3673[] = { 0x80348e, diff --git a/drivers/input/touchscreen/gsl3673_800x1280.c b/drivers/input/touchscreen/gsl3673_800x1280.c index 5d1cf194c68a..eee7370d4e30 100644 --- a/drivers/input/touchscreen/gsl3673_800x1280.c +++ b/drivers/input/touchscreen/gsl3673_800x1280.c @@ -25,6 +25,7 @@ #include #include +#include "gsl_point_id.h" #include "tp_suspend.h" #include #define GSL_DEBUG 0 diff --git a/drivers/input/touchscreen/gsl3673_800x1280.h b/drivers/input/touchscreen/gsl3673_800x1280.h index 38fa03963eb1..f8fade81fabc 100644 --- a/drivers/input/touchscreen/gsl3673_800x1280.h +++ b/drivers/input/touchscreen/gsl3673_800x1280.h @@ -21,10 +21,6 @@ struct gsl_touch_info { int id[10]; int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); static unsigned int gsl_config_data_id_3673[] = { 0x94ed81, 0x200, diff --git a/drivers/input/touchscreen/gsl3676/rk3368_th863c_10.h b/drivers/input/touchscreen/gsl3676/rk3368_th863c_10.h index 617860f76401..047fde75752f 100644 --- a/drivers/input/touchscreen/gsl3676/rk3368_th863c_10.h +++ b/drivers/input/touchscreen/gsl3676/rk3368_th863c_10.h @@ -27,11 +27,6 @@ struct gsl_touch_info { int id[10]; int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); - static unsigned int gsl_config_data_id[512] = { diff --git a/drivers/input/touchscreen/gsl_point_id.c b/drivers/input/touchscreen/gsl_point_id.c index d46730f21f80..836d7b8d635b 100644 --- a/drivers/input/touchscreen/gsl_point_id.c +++ b/drivers/input/touchscreen/gsl_point_id.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include "gsl_point_id.h" //#include "linux/module.h" //#include /* @@ -350,26 +351,27 @@ typedef struct static int gesture_num,gesture_num_last;//gesture_num static int gesture_dis_min; static int gesture_deal; -static int gesture_last; +//static int gesture_last; static int gesture_threshold[2]; static int x_scale; static int y_scale; static int double_down,double_up; -static const GESTURE_MODEL_TYPE * model_extern = NULL; -static int model_extern_len = 0; +//static const GESTURE_MODEL_TYPE * model_extern = NULL; +//static int model_extern_len = 0; static int GestureSqrt(int d); static int GestureDistance(GESTURE_POINT_TYPE* d1,GESTURE_POINT_TYPE* d2,int sqrt_able); static int GesturePush(GESTURE_POINT_TYPE* data); -static int GestureStretch(void); -static int GestureLength(void); -static int GestureDeal(void); -static int GestureModel(const GESTURE_MODEL_TYPE * model,int len,int threshold,int *out); +//static int GestureStretch(void); +//static int GestureLength(void); +//static int GestureDeal(void); +//static int GestureModel(const GESTURE_MODEL_TYPE * model,int len,int threshold,int *out); static int GestureMain(unsigned int data[],unsigned int pn); -static void GestureStandard(void); +//static void GestureStandard(void); static void GestureInit(void); -static void ChangeXY(void); -static int GestureLRUD(void); +//static void ChangeXY(void); +//static int GestureLRUD(void); static void GestureSet(unsigned int conf[]); +#if 0 static const GESTURE_MODEL_TYPE model_default[] ={ {0x10,'3',{ @@ -528,6 +530,7 @@ static const GESTURE_MODEL_TYPE model_default[] 0x010bfced,0x2513ffff,0x4937fdff,0x6d5bf9fa,0x9280f4f7,0xb6a4f0f1,0xdac8eeef,0xffececed,}}, }; #endif +#endif //+++++++++++++++++++++++++++++++++++++++++++++++++++++++ static void SortBubble(int t[],int size) { @@ -546,11 +549,13 @@ static void SortBubble(int t[],int size) } } } -int abs(int i){ +#if 0 +static int abs(int i){ if(i<0) return ~(--i); return i; } +#endif static int Sqrt(int d) { int ret = 0; @@ -2184,7 +2189,8 @@ static void PointPressure(void) } } -void gsl_ReportPressure(unsigned int *p) +#if 0 +static void gsl_ReportPressure(unsigned int *p) { int i; for(i=0;i>16) & 0xffff); } +#endif static void GestureSet(unsigned int conf[]) { @@ -2952,6 +2963,7 @@ static void GestureSet(unsigned int conf[]) } } +#if 0 static int GestureDeal(void) { int i; @@ -2998,7 +3010,7 @@ static int GestureDeal(void) return gesture_last; } -void gsl_GestureExtern(const GESTURE_MODEL_TYPE *model,int len) +static void gsl_GestureExtern(const GESTURE_MODEL_TYPE *model,int len) { model_extern = model; model_extern_len = len; @@ -3073,7 +3085,7 @@ static int GestureLRUD(void) return FALSE; } -unsigned int gsl_GestureBuffer(unsigned int **buf) +static unsigned int gsl_GestureBuffer(unsigned int **buf) { int i; if(gesture_num_last >= GESTURE_BUF_SIZE) @@ -3087,6 +3099,7 @@ unsigned int gsl_GestureBuffer(unsigned int **buf) } //EXPORT_SYMBOL(gsl_GestureBuffer); #endif +#endif /* // The DLL must have an entry point, but it is never called. // diff --git a/drivers/input/touchscreen/gsl_point_id.h b/drivers/input/touchscreen/gsl_point_id.h new file mode 100644 index 000000000000..4fc57ee4ce01 --- /dev/null +++ b/drivers/input/touchscreen/gsl_point_id.h @@ -0,0 +1,22 @@ +/* + * drivers/input/touchscreen/gsl_point_id.h + * + * Copyright (c) 2012 Shanghai Basewin + * Guan Yuwei + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _GSL_POINT_ID_H +#define _GSL_POINT_ID_H + +struct gsl_touch_info; + +unsigned int gsl_mask_tiaoping(void); +unsigned int gsl_version_id(void); +void gsl_alg_id_main(struct gsl_touch_info *cinfo); +void gsl_DataInit(unsigned int * conf_in); + +#endif /* _GSL_POINT_ID_H */ diff --git a/drivers/input/touchscreen/gslx680.h b/drivers/input/touchscreen/gslx680.h index 2a76ec410c81..e969a6146a2d 100644 --- a/drivers/input/touchscreen/gslx680.h +++ b/drivers/input/touchscreen/gslx680.h @@ -40,10 +40,6 @@ struct gsl_touch_info int id[10]; int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); /* unsigned int gsl_config_versions[]= diff --git a/drivers/input/touchscreen/gslx6801.h b/drivers/input/touchscreen/gslx6801.h index 45bb3469d2ea..db177eade6f8 100644 --- a/drivers/input/touchscreen/gslx6801.h +++ b/drivers/input/touchscreen/gslx6801.h @@ -29,11 +29,6 @@ struct gsl_touch_info { int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); - static unsigned int gsl_config_data_id[] = { 0x9eca05, 0x200, diff --git a/drivers/input/touchscreen/gslx680_d708/rockchip_gsl3670.h b/drivers/input/touchscreen/gslx680_d708/rockchip_gsl3670.h index 56df4062587e..5358b4266203 100644 --- a/drivers/input/touchscreen/gslx680_d708/rockchip_gsl3670.h +++ b/drivers/input/touchscreen/gslx680_d708/rockchip_gsl3670.h @@ -21,11 +21,6 @@ struct gsl_touch_info { int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); - unsigned int gsl_config_data_id[] = { 0x79a1cc, 0x200, diff --git a/drivers/input/touchscreen/gslx680_firefly.h b/drivers/input/touchscreen/gslx680_firefly.h index 8f40c59d7d2d..69b65866eb03 100644 --- a/drivers/input/touchscreen/gslx680_firefly.h +++ b/drivers/input/touchscreen/gslx680_firefly.h @@ -25,11 +25,6 @@ struct gsl_touch_info { int finger_num; }; -unsigned int gsl_mask_tiaoping(void); -unsigned int gsl_version_id(void); -void gsl_alg_id_main(struct gsl_touch_info *cinfo); -void gsl_DataInit(int *ret); - unsigned int gsl_config_data_id_3680B[] = { 0x72d266, 0x200, diff --git a/drivers/input/touchscreen/gslx680_pad.c b/drivers/input/touchscreen/gslx680_pad.c index c111782b2339..c8a69c8a3aea 100644 --- a/drivers/input/touchscreen/gslx680_pad.c +++ b/drivers/input/touchscreen/gslx680_pad.c @@ -32,6 +32,7 @@ #include "tp_suspend.h" #include "gslx680_pad.h" +#include "gsl_point_id.h" #include //#define GSL_DEBUG #define REPORT_DATA_ANDROID_4_0 diff --git a/drivers/input/touchscreen/gslx680_pad.h b/drivers/input/touchscreen/gslx680_pad.h index 3f816e8e364a..76395db2e79d 100644 --- a/drivers/input/touchscreen/gslx680_pad.h +++ b/drivers/input/touchscreen/gslx680_pad.h @@ -44,11 +44,6 @@ struct gsl_touch_chip_info unsigned long conf_in_len; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); - static unsigned int gsl_config_data_id[] = { 0x8a44e0, diff --git a/drivers/input/touchscreen/rochkchip_gslX680_8inch_800x1280_tg806_10.h b/drivers/input/touchscreen/rochkchip_gslX680_8inch_800x1280_tg806_10.h index 7d424c1e1c30..805911df6fb1 100644 --- a/drivers/input/touchscreen/rochkchip_gslX680_8inch_800x1280_tg806_10.h +++ b/drivers/input/touchscreen/rochkchip_gslX680_8inch_800x1280_tg806_10.h @@ -22,10 +22,6 @@ struct gsl_touch_info{ int id[10]; int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); static unsigned int gsl_config_data_id_3673[] = { 0xb976bc, diff --git a/drivers/input/touchscreen/tp_gslx680_board.h b/drivers/input/touchscreen/tp_gslx680_board.h index bc90005e215d..bbafa96c5d64 100644 --- a/drivers/input/touchscreen/tp_gslx680_board.h +++ b/drivers/input/touchscreen/tp_gslx680_board.h @@ -20,11 +20,6 @@ struct gsl_touch_info { int finger_num; }; -extern unsigned int gsl_mask_tiaoping(void); -extern unsigned int gsl_version_id(void); -extern void gsl_alg_id_main(struct gsl_touch_info *cinfo); -extern void gsl_DataInit(int *ret); - static unsigned int gsl_config_data_id[] = { 0x9296dd, 0x200,