mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
fix driver bug : muti-touch & td8801
This commit is contained in:
parent
d924261aac
commit
5eb1bc7285
|
|
@ -350,8 +350,9 @@ static void goodix_ts_work_func(struct work_struct *work)
|
|||
syn_flag = 1;
|
||||
}
|
||||
|
||||
input_sync(ts->input_dev);
|
||||
}
|
||||
}
|
||||
input_sync(ts->input_dev);
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_TOUCH_KEY
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ static void pixcir_ts_poscheck(struct pixcir_i2c_ts_data *data)
|
|||
input_report_abs(tsdata->input, ABS_MT_POSITION_X, point[i].posy);
|
||||
input_report_abs(tsdata->input, ABS_MT_POSITION_Y, point[i].posx);
|
||||
|
||||
input_sync(tsdata->input);
|
||||
//input_sync(tsdata->input);
|
||||
|
||||
DBG("brn%d=%2d id%d=%1d x=%5d y=%5d \n",
|
||||
i,point[i].brn,i,point[i].id,point[i].posy,point[i].posx);
|
||||
|
|
@ -286,17 +286,17 @@ static void pixcir_ts_work_func(struct work_struct *work)
|
|||
DBG("%s: >>>>>touch release\n\n",__FUNCTION__);
|
||||
enable_irq(tsdata->client->irq);
|
||||
//input_report_key(tsdata->input, BTN_TOUCH, 0);
|
||||
input_report_abs(tsdata->input, ABS_MT_TOUCH_MAJOR, 0);
|
||||
//input_report_abs(tsdata->input, ABS_MT_TOUCH_MAJOR, 0);
|
||||
input_mt_slot(tsdata->input, 0);
|
||||
input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, false);
|
||||
//input_report_key(tsdata->input, ABS_MT_WIDTH_MAJOR,0);
|
||||
input_sync(tsdata->input);
|
||||
break;
|
||||
}
|
||||
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
input_sync(tsdata->input);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -291,9 +291,9 @@ int modem_poweron_off(int on_off)
|
|||
static int power_on =1;
|
||||
static int mtk23d_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct rk2818_23d_data *pdata = gpdata;
|
||||
//struct rk2818_23d_data *pdata = gpdata;
|
||||
//struct rk2818_23d_data *pdata = gpdata = pdev->dev.platform_data;
|
||||
struct platform_data *pdev = container_of(pdata, struct device, platform_data);
|
||||
//struct platform_data *pdev = container_of(pdata, struct device, platform_data);
|
||||
|
||||
MODEMDBG("modem_open\n");
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ static int mtk23d_open(struct inode *inode, struct file *file)
|
|||
power_on = 0;
|
||||
modem_poweron_off(1);
|
||||
}
|
||||
device_init_wakeup(&pdev, 1);
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -424,6 +424,7 @@ static int mtk23d_probe(struct platform_device *pdev)
|
|||
MODEMDBG("mtk23d_probe\n");
|
||||
|
||||
//pdata->io_init();
|
||||
pdata->dev = &pdev->dev;
|
||||
|
||||
mt6223d_data = kzalloc(sizeof(struct modem_dev), GFP_KERNEL);
|
||||
if(NULL == mt6223d_data)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ MODULE_LICENSE("GPL");
|
|||
#define MODEMDBG(fmt,argss...)
|
||||
#endif
|
||||
|
||||
static bool wakelock_inited;
|
||||
#define SLEEP 1
|
||||
#define READY 0
|
||||
struct rk2818_23d_data *gpdata = NULL;
|
||||
|
|
@ -40,7 +39,6 @@ struct rk2818_23d_data *gpdata = NULL;
|
|||
int modem_poweron_off(int on_off)
|
||||
{
|
||||
struct rk2818_23d_data *pdata = gpdata;
|
||||
int result, error = 0, irq = 0;
|
||||
|
||||
if(on_off)
|
||||
{
|
||||
|
|
@ -53,18 +51,12 @@ int modem_poweron_off(int on_off)
|
|||
printk("tdsc8800_poweroff\n");
|
||||
gpio_set_value(pdata->bp_power, pdata->bp_power_active_low? GPIO_LOW:GPIO_HIGH);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static int tdsc8800_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct rk2818_23d_data *pdata = gpdata;
|
||||
//struct rk2818_23d_data *pdata = gpdata = pdev->dev.platform_data;
|
||||
struct platform_data *pdev = container_of(pdata, struct device, platform_data);
|
||||
|
||||
MODEMDBG("tdsc8800_open\n");
|
||||
|
||||
int ret = 0;
|
||||
modem_poweron_off(1);
|
||||
device_init_wakeup(&pdev, 1);
|
||||
device_init_wakeup(gpdata->dev, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -75,7 +67,7 @@ static int tdsc8800_release(struct inode *inode, struct file *file)
|
|||
|
||||
return 0;
|
||||
}
|
||||
static int tdsc8800_ioctl(struct inode *inode,struct file *file, unsigned int cmd, unsigned long arg)
|
||||
static long tdsc8800_ioctl(struct file *file, unsigned int a, unsigned long b)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -97,12 +89,13 @@ static int tdsc8800_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct rk2818_23d_data *pdata = gpdata = pdev->dev.platform_data;
|
||||
struct modem_dev *tdsc8800_data = NULL;
|
||||
int result, error = 0, irq = 0;
|
||||
int result = 0;
|
||||
|
||||
MODEMDBG("tdsc8800_probe\n");
|
||||
|
||||
//pdata->io_init();
|
||||
|
||||
pdata->dev = &pdev->dev;
|
||||
tdsc8800_data = kzalloc(sizeof(struct modem_dev), GFP_KERNEL);
|
||||
if(NULL == tdsc8800_data)
|
||||
{
|
||||
|
|
@ -133,7 +126,6 @@ static int tdsc8800_probe(struct platform_device *pdev)
|
|||
gpio_free(pdata->bp_power);
|
||||
err6:
|
||||
kfree(tdsc8800_data);
|
||||
ret:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -172,8 +164,9 @@ static struct platform_driver tdsc8800_driver = {
|
|||
|
||||
static int __init tdsc8800_init(void)
|
||||
{
|
||||
MODEMDBG("tdsc8800_init ret=%d\n");
|
||||
return platform_driver_register(&tdsc8800_driver);
|
||||
int ret = platform_driver_register(&tdsc8800_driver);
|
||||
MODEMDBG("tdsc8800_init ret=%d\n",ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit tdsc8800_exit(void)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ struct modem_dev
|
|||
|
||||
/* 耳机数æ<C2B0>®ç»“æž„ä½?*/
|
||||
struct rk2818_23d_data {
|
||||
struct device *dev;
|
||||
int (*io_init)(void);
|
||||
int (*io_deinit)(void);
|
||||
unsigned int bp_power;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user