mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
input: touchscreen: gsl_point_id: Add gsl_point_id.h
drivers/input/touchscreen/gsl_point_id.c:2187:6: warning: no previous prototype for 'gsl_ReportPressure' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:2209:6: warning: no previous prototype for 'gsl_TouchNear' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:2317:6: warning: no previous prototype for 'gsl_DataInit' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:2595:14: warning: no previous prototype for 'gsl_version_id' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:2601:14: warning: no previous prototype for 'gsl_mask_tiaoping' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:2647:6: warning: no previous prototype for 'gsl_alg_id_main' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:2697:5: warning: no previous prototype for 'gsl_obtain_gesture' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:3001:6: warning: no previous prototype for 'gsl_GestureExtern' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:3076:14: warning: no previous prototype for 'gsl_GestureBuffer' [-Wmissing-prototypes] drivers/input/touchscreen/gsl_point_id.c:549:5: warning: no previous prototype for 'abs' [-Wmissing-prototypes] Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: I85aba64c02e93734df77e806b96f264bf91e244b
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <linux/input/mt.h>
|
||||
#include <linux/wakelock.h>
|
||||
|
||||
#include "gsl_point_id.h"
|
||||
#include "tp_suspend.h"
|
||||
#include <linux/of_gpio.h>
|
||||
#define GSL_DEBUG 0
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/input/mt.h>
|
||||
#include <linux/wakelock.h>
|
||||
|
||||
#include "gsl_point_id.h"
|
||||
#include "tp_suspend.h"
|
||||
#include <linux/of_gpio.h>
|
||||
#define GSL_DEBUG 0
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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] =
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "gsl_point_id.h"
|
||||
//#include "linux/module.h"
|
||||
//#include <wdm.h>
|
||||
/*
|
||||
@@ -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<POINT_MAX;i++)
|
||||
@@ -2206,11 +2212,12 @@ void gsl_ReportPressure(unsigned int *p)
|
||||
}
|
||||
//EXPORT_SYMBOL(gsl_ReportPressure);
|
||||
|
||||
int gsl_TouchNear(void)
|
||||
static int gsl_TouchNear(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
//EXPORT_SYMBOL(gsl_TouchNear);
|
||||
#endif
|
||||
|
||||
static void DoubleClick(void)
|
||||
{
|
||||
@@ -2694,11 +2701,13 @@ void gsl_alg_id_main(struct gsl_touch_info *cinfo)
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#ifdef GESTURE_LICH
|
||||
|
||||
int gsl_obtain_gesture(void)
|
||||
#if 0
|
||||
static int gsl_obtain_gesture(void)
|
||||
{
|
||||
return GestureDeal();
|
||||
}
|
||||
//EXPORT_SYMBOL(gsl_obtain_gesture);
|
||||
#endif
|
||||
|
||||
static int GestureMain(unsigned int data_coor[],unsigned int num)
|
||||
{
|
||||
@@ -2784,6 +2793,7 @@ static void GestureInit(void)
|
||||
gesture_dis_min = 2;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int GestureStretch(void)
|
||||
{
|
||||
unsigned int x_max=0,x_min=0xffff,y_max=0,y_min=0xffff;
|
||||
@@ -2923,6 +2933,7 @@ static void ChangeXY(void)
|
||||
gesture_buf[i].all = ((gesture_buf[i].all & 0xfff) << 16) +
|
||||
((gesture_buf[i].all>>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.
|
||||
//
|
||||
|
||||
22
drivers/input/touchscreen/gsl_point_id.h
Normal file
22
drivers/input/touchscreen/gsl_point_id.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* drivers/input/touchscreen/gsl_point_id.h
|
||||
*
|
||||
* Copyright (c) 2012 Shanghai Basewin
|
||||
* Guan Yuwei<guanyuwei@basewin.com>
|
||||
*
|
||||
* 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 */
|
||||
@@ -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[]=
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "tp_suspend.h"
|
||||
|
||||
#include "gslx680_pad.h"
|
||||
#include "gsl_point_id.h"
|
||||
#include <linux/wakelock.h>
|
||||
//#define GSL_DEBUG
|
||||
#define REPORT_DATA_ANDROID_4_0
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user