3 * Touch Screen I2C Driver for EETI Controller
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 // Release Date: 2010/11/08
19 #include <linux/module.h>
20 #include <linux/init.h>
21 #include <linux/kernel.h>
22 #include <linux/interrupt.h>
23 #include <linux/wait.h>
24 #include <linux/delay.h>
25 #include <linux/platform_device.h>
26 #include <linux/freezer.h>
27 #include <linux/proc_fs.h>
28 #include <linux/clk.h>
29 #include <linux/i2c.h>
30 #include <linux/gpio.h>
31 #include <linux/device.h>
32 #include <linux/cdev.h>
34 #include <asm/system.h>
35 #include <asm/uaccess.h>
36 #include <linux/poll.h>
37 #include <linux/kfifo.h>
38 #include <linux/version.h>
39 #include <linux/input.h>
40 #include <linux/irq.h>
41 #include <linux/async.h>
42 #include <mach/board.h>
45 #ifdef CONFIG_EETI_EGALAX_DEBUG
46 #define TS_DEBUG(fmt,args...) printk( KERN_DEBUG "[egalax_i2c]: " fmt, ## args)
47 #define DBG() printk("[%s]:%d => \n",__FUNCTION__,__LINE__)
49 #define TS_DEBUG(fmt,args...)
53 //#define _NON_INPUT_DEV // define this to disable register input device
55 static int global_major = 0; // dynamic major by default
56 static int global_minor = 0;
57 #define EETI_I2C_RATE (200*1000)
58 #define MAX_I2C_LEN 10
59 #define FIFO_SIZE PAGE_SIZE
60 #define MAX_SUPPORT_POINT 5
61 #define REPORTID_MOUSE 0x01
62 #define REPORTID_VENDOR 0x03
63 #define REPORTID_MTOUCH 0x04
66 #define EGALAX_IOC_MAGIC 0x72
67 #define EGALAX_IOCWAKEUP _IO(EGALAX_IOC_MAGIC, 1)
68 #define EGALAX_IOC_MAXNR 1
77 struct workqueue_struct *ktouch_wq;
78 struct work_struct work;
79 struct mutex mutex_wq;
80 struct i2c_client *client;
86 struct egalax_char_dev
90 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
91 struct kfifo* pDataKFiFo;
93 struct kfifo DataKFiFo;
95 unsigned char *pFiFoBuf;
98 wait_queue_head_t fifo_inq;
101 static struct _egalax_i2c *p_egalax_i2c_dev = NULL; // allocated in egalax_i2c_probe
102 static struct egalax_char_dev *p_char_dev = NULL; // allocated in init_module
103 static atomic_t egalax_char_available = ATOMIC_INIT(1);
104 static struct class *egalax_class;
105 #ifndef _NON_INPUT_DEV
106 static struct input_dev *input_dev = NULL;
107 static struct point_data PointBuf[MAX_SUPPORT_POINT];
108 #endif //#ifndef _NON_INPUT_DEV
110 static int egalax_cdev_open(struct inode *inode, struct file *filp)
112 struct egalax_char_dev *cdev;
116 cdev = container_of(inode->i_cdev, struct egalax_char_dev, cdev);
119 TS_DEBUG(" No such char device node \n");
123 if( !atomic_dec_and_test(&egalax_char_available) )
125 atomic_inc(&egalax_char_available);
126 return -EBUSY; /* already open */
130 filp->private_data = cdev;// Used by the read and write metheds
132 TS_DEBUG(" egalax_cdev_open done \n");
133 try_module_get(THIS_MODULE);
137 static int egalax_cdev_release(struct inode *inode, struct file *filp)
139 struct egalax_char_dev *cdev; // device information
143 cdev = container_of(inode->i_cdev, struct egalax_char_dev, cdev);
146 TS_DEBUG(" No such char device node \n");
150 atomic_inc(&egalax_char_available); /* release the device */
152 filp->private_data = NULL;
154 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
155 kfifo_reset( cdev->pDataKFiFo );
157 kfifo_reset( &cdev->DataKFiFo );
160 TS_DEBUG(" egalax_cdev_release done \n");
161 module_put(THIS_MODULE);
165 #define MAX_READ_BUF_LEN 50
166 static char fifo_read_buf[MAX_READ_BUF_LEN];
167 static ssize_t egalax_cdev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
169 int read_cnt, ret, fifoLen;
170 struct egalax_char_dev *cdev = file->private_data;
174 if( down_interruptible(&cdev->sem) )
177 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
178 fifoLen = kfifo_len(cdev->pDataKFiFo);
180 fifoLen = kfifo_len(&cdev->DataKFiFo);
183 while( fifoLen<1 ) /* nothing to read */
185 up(&cdev->sem); /* release the lock */
186 if( file->f_flags & O_NONBLOCK )
189 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
190 if( wait_event_interruptible(cdev->fifo_inq, kfifo_len( cdev->pDataKFiFo )>0) )
192 if( wait_event_interruptible(cdev->fifo_inq, kfifo_len( &cdev->DataKFiFo )>0) )
195 return -ERESTARTSYS; /* signal: tell the fs layer to handle it */
198 if( down_interruptible(&cdev->sem) )
202 if(count > MAX_READ_BUF_LEN)
203 count = MAX_READ_BUF_LEN;
205 TS_DEBUG("\"%s\" reading: real fifo data\n", current->comm);
206 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
207 read_cnt = kfifo_get(cdev->pDataKFiFo, fifo_read_buf, count);
209 read_cnt = kfifo_out_locked(&cdev->DataKFiFo, fifo_read_buf, count, &cdev->FiFoLock);
212 ret = copy_to_user(buf, fifo_read_buf, read_cnt)?-EFAULT:read_cnt;
219 static ssize_t egalax_cdev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
222 struct egalax_char_dev *cdev = file->private_data;
227 if( down_interruptible(&cdev->sem) )
230 if (count > MAX_I2C_LEN)
233 tmp = kmalloc(count,GFP_KERNEL);
240 if(copy_from_user(tmp, buf, count))
247 ret = i2c_master_normal_send(p_egalax_i2c_dev->client, tmp, count,EETI_I2C_RATE);
248 TS_DEBUG("I2C writing %zu bytes.\n", count);
257 static int wakeup_controller(int gpio)
263 if( (ret=gpio_request(gpio, "Touch Wakeup GPIO"))!=0 )
265 printk(KERN_ERR "[egalax_i2c]: Failed to request GPIO for Touch Wakeup GPIO. Err:%d\n", ret);
270 gpio_direction_output(gpio, 0);
271 for(i=0; i<100; i++);
272 gpio_direction_input(gpio);
273 printk(KERN_ERR "[egalax_i2c]: INT wakeup touch controller done\n");
279 static int egalax_cdev_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long args)
281 //struct egalax_char_dev *cdev = file->private_data;
284 if(_IOC_TYPE(cmd) != EGALAX_IOC_MAGIC)
286 if(_IOC_NR(cmd) > EGALAX_IOC_MAXNR)
289 if(_IOC_DIR(cmd) & _IOC_READ)
290 ret = !access_ok(VERIFY_WRITE, (void __user*)args, _IOC_SIZE(cmd));
291 else if(_IOC_DIR(cmd) & _IOC_WRITE)
292 ret = !access_ok(VERIFY_READ, (void __user*)args, _IOC_SIZE(cmd));
297 //printk(KERN_ERR "Handle device ioctl command\n");
300 case EGALAX_IOCWAKEUP:
301 ret = wakeup_controller(irq_to_gpio(p_egalax_i2c_dev->irq));
311 static unsigned int egalax_cdev_poll(struct file *filp, struct poll_table_struct *wait)
313 struct egalax_char_dev *cdev = filp->private_data;
314 unsigned int mask = 0;
318 poll_wait(filp, &cdev->fifo_inq, wait);
320 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
321 fifoLen = kfifo_len(cdev->pDataKFiFo);
323 fifoLen = kfifo_len(&cdev->DataKFiFo);
327 mask |= POLLIN | POLLRDNORM; /* readable */
328 if( (FIFO_SIZE - fifoLen) > MAX_I2C_LEN )
329 mask |= POLLOUT | POLLWRNORM; /* writable */
335 #ifndef _NON_INPUT_DEV
336 static int LastUpdateID = 0;
337 static void ProcessReport(unsigned char *buf, int buflen)
340 short X=0, Y=0, ContactID=0, Status=0;
341 if(buflen!=MAX_I2C_LEN || buf[0]!=0x04) // check buffer len & header
344 Status = buf[1]&0x01;
345 ContactID = (buf[1]&0x7C)>>2;
346 X = ((buf[3]<<8) + buf[2])>>4;
347 Y = ((buf[5]<<8) + buf[4])>>4;
349 PointBuf[ContactID].Status = Status;
350 PointBuf[ContactID].X = X;
351 PointBuf[ContactID].Y = Y;
353 TS_DEBUG("Get Point[%d] Update: Status=%d X=%d Y=%d\n", ContactID, Status, X, Y);
356 if( !Status || (ContactID <= LastUpdateID) )
358 for(i=0; i<MAX_SUPPORT_POINT;i++)
360 if(PointBuf[i].Status >= 0)
362 input_report_abs(input_dev, ABS_MT_TRACKING_ID, i);
363 input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, PointBuf[i].Status);
364 input_report_abs(input_dev, ABS_MT_WIDTH_MAJOR, 0);
365 input_report_abs(input_dev, ABS_MT_POSITION_X, PointBuf[i].X);
366 input_report_abs(input_dev, ABS_MT_POSITION_Y, PointBuf[i].Y);
368 input_mt_sync(input_dev);
370 if(PointBuf[i].Status == 0)
371 PointBuf[i].Status--;
374 input_sync(input_dev);
375 TS_DEBUG("Input sync point data done!\n");
378 LastUpdateID = ContactID;
381 static struct input_dev * allocate_Input_Dev(void)
384 struct input_dev *pInputDev=NULL;
386 pInputDev = input_allocate_device();
387 if(pInputDev == NULL)
389 TS_DEBUG("Failed to allocate input device\n");
390 return NULL;//-ENOMEM;
393 pInputDev->name = "eGalax Touch Screen";
394 pInputDev->phys = "I2C";
395 pInputDev->id.bustype = BUS_I2C;
396 pInputDev->id.vendor = 0x0EEF;
397 pInputDev->id.product = 0x0020;
399 set_bit(EV_ABS, pInputDev->evbit);
401 input_set_abs_params(pInputDev, ABS_MT_POSITION_X, 0, CONFIG_EETI_EGALAX_MAX_X, 0, 0);
402 input_set_abs_params(pInputDev, ABS_MT_POSITION_Y, 0, CONFIG_EETI_EGALAX_MAX_Y, 0, 0);
403 input_set_abs_params(pInputDev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
404 input_set_abs_params(pInputDev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
405 input_set_abs_params(pInputDev, ABS_MT_TRACKING_ID, 0, 10, 0, 0);
407 ret = input_register_device(pInputDev);
410 TS_DEBUG("Unable to register input device.\n");
411 input_free_device(pInputDev);
417 #endif //#ifndef _NON_INPUT_DEV
419 static int egalax_i2c_measure(struct i2c_client *client, char skip_packet)
421 u8 x_buf[MAX_I2C_LEN];
425 count = i2c_master_normal_recv(client, x_buf, MAX_I2C_LEN,EETI_I2C_RATE);
426 }while(count==EAGAIN && --loop);
428 if( count<0 || (x_buf[0]!=REPORTID_VENDOR && x_buf[0]!=REPORTID_MTOUCH) )
430 TS_DEBUG("I2C read error data with Len=%d hedaer=%d\n", count, x_buf[0]);
434 TS_DEBUG("egalax_i2c read data with Len=%d\n", count);
435 if(x_buf[0]==REPORTID_VENDOR)
436 TS_DEBUG("egalax_i2c get command packet\n");
438 if( skip_packet > 0 )
441 #ifndef _NON_INPUT_DEV
442 if( count>0 && x_buf[0]==REPORTID_MTOUCH )
444 ProcessReport(x_buf, count);
448 #endif //#ifndef _NON_INPUT_DEV
450 if( count>0 && p_char_dev->OpenCnts>0 ) // If someone reading now! put the data into the buffer!
452 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
453 kfifo_put(p_char_dev->pDataKFiFo, x_buf, count);
455 kfifo_in_locked(&p_char_dev->DataKFiFo, x_buf, count, &p_char_dev->FiFoLock);
457 wake_up_interruptible( &p_char_dev->fifo_inq );
463 static void egalax_i2c_wq(struct work_struct *work)
465 struct _egalax_i2c *egalax_i2c = container_of(work, struct _egalax_i2c, work);
466 struct i2c_client *client = egalax_i2c->client;
467 int gpio = client->irq;
468 TS_DEBUG("egalax_i2c_wq run\n");
469 mutex_lock(&egalax_i2c->mutex_wq);
471 /*continue recv data*/
472 while( !gpio_get_value(gpio) && egalax_i2c->work_state>0 )
474 egalax_i2c_measure(client, egalax_i2c->skip_packet);
478 if( egalax_i2c->skip_packet > 0 )
479 egalax_i2c->skip_packet = 0;
481 mutex_unlock(&egalax_i2c->mutex_wq);
483 if( egalax_i2c->work_state > 0 )
484 enable_irq(p_egalax_i2c_dev->irq);
486 TS_DEBUG("egalax_i2c_wq leave\n");
489 static irqreturn_t egalax_i2c_interrupt(int irq, void *dev_id)
491 struct _egalax_i2c *egalax_i2c = (struct _egalax_i2c *)dev_id;
492 TS_DEBUG("egalax_i2c_interrupt with irq:%d\n", irq);
493 disable_irq_nosync(irq);
494 queue_work(egalax_i2c->ktouch_wq, &egalax_i2c->work);
500 static int egalax_i2c_suspend(struct i2c_client *client, pm_message_t mesg)
502 struct _egalax_i2c *egalax_i2c = i2c_get_clientdata(client);
503 u8 cmdbuf[MAX_I2C_LEN]={0x03, 0x05, 0x0A, 0x03, 0x36, 0x3F, 0x02, 0, 0, 0};
505 i2c_master_normal_send(client, cmdbuf, MAX_I2C_LEN, EETI_I2C_RATE);
507 egalax_i2c->work_state = 0;
508 disable_irq(p_egalax_i2c_dev->irq);
509 cancel_work_sync(&egalax_i2c->work);
511 printk(KERN_DEBUG "[egalax_i2c]: device suspend done\n");
513 if(device_may_wakeup(&client->dev))
515 enable_irq_wake(p_egalax_i2c_dev->irq);
519 printk(KERN_DEBUG "[egalax_i2c]: device_may_wakeup false\n");
525 static int egalax_i2c_resume(struct i2c_client *client)
527 struct _egalax_i2c *egalax_i2c = i2c_get_clientdata(client);
529 if(device_may_wakeup(&client->dev))
531 disable_irq_wake(p_egalax_i2c_dev->irq);
535 printk(KERN_DEBUG "[egalax_i2c]: device_may_wakeup false\n");
538 wakeup_controller(irq_to_gpio(p_egalax_i2c_dev->irq));
539 egalax_i2c->work_state = 1;
540 enable_irq(p_egalax_i2c_dev->irq);
542 printk(KERN_DEBUG "[egalax_i2c]: device wakeup done\n");
547 #define egalax_i2c_suspend NULL
548 #define egalax_i2c_resume NULL
551 static int __devinit egalax_i2c_probe(struct i2c_client *client)
554 int gpio = client->irq;
555 struct eeti_egalax_platform_data *pdata = pdata = client->dev.platform_data;
557 printk(KERN_DEBUG "[egalax_i2c]: start probe\n");
559 p_egalax_i2c_dev = (struct _egalax_i2c *)kzalloc(sizeof(struct _egalax_i2c), GFP_KERNEL);
560 if (!p_egalax_i2c_dev)
562 printk(KERN_ERR "[egalax_i2c]: request memory failed\n");
567 #ifndef _NON_INPUT_DEV
568 input_dev = allocate_Input_Dev();
571 printk(KERN_ERR "[egalax_i2c]: allocate_Input_Dev failed\n");
575 TS_DEBUG("egalax_i2c register input device done\n");
576 memset(PointBuf, 0, sizeof(struct point_data)*MAX_SUPPORT_POINT);
577 #endif //#ifndef _NON_INPUT_DEV
579 if (pdata->init_platform_hw)
580 pdata->init_platform_hw();
582 p_egalax_i2c_dev->client = client;
583 mutex_init(&p_egalax_i2c_dev->mutex_wq);
585 p_egalax_i2c_dev->ktouch_wq = create_workqueue("egalax_touch_wq");
586 INIT_WORK(&p_egalax_i2c_dev->work, egalax_i2c_wq);
588 i2c_set_clientdata(client, p_egalax_i2c_dev);
590 if( gpio_get_value(gpio) )
591 p_egalax_i2c_dev->skip_packet = 0;
593 p_egalax_i2c_dev->skip_packet = 1;
595 p_egalax_i2c_dev->work_state = 1;
597 p_egalax_i2c_dev->irq = gpio_to_irq(client->irq);
599 ret = request_irq(p_egalax_i2c_dev->irq, egalax_i2c_interrupt, 0,
600 client->name, p_egalax_i2c_dev);
603 printk(KERN_ERR "[egalax_i2c]: request irq(%d) failed\n", p_egalax_i2c_dev->irq);
606 TS_DEBUG("egalax_i2c request irq(%d) gpio(%d) with result:%d\n", p_egalax_i2c_dev->irq, gpio, ret);
609 device_init_wakeup(&client->dev, 1);
612 printk(KERN_DEBUG "[egalax_i2c]: probe done\n");
616 i2c_set_clientdata(client, NULL);
617 destroy_workqueue(p_egalax_i2c_dev->ktouch_wq);
618 free_irq(p_egalax_i2c_dev->irq, p_egalax_i2c_dev);
619 #ifndef _NON_INPUT_DEV
620 input_unregister_device(input_dev);
621 input_free_device(input_dev);
623 #endif //#ifndef _NON_INPUT_DEV
626 kfree(p_egalax_i2c_dev);
627 p_egalax_i2c_dev = NULL;
629 printk(KERN_DEBUG "[egalax_i2c]: probe failed\n");
633 static int __devexit egalax_i2c_remove(struct i2c_client *client)
635 struct _egalax_i2c *egalax_i2c = i2c_get_clientdata(client);
639 #ifndef _NON_INPUT_DEV
642 TS_DEBUG("unregister input device\n");
643 input_unregister_device(input_dev);
644 input_free_device(input_dev);
647 #endif //#ifndef _NON_INPUT_DEV
649 if(p_egalax_i2c_dev->ktouch_wq)
651 destroy_workqueue(p_egalax_i2c_dev->ktouch_wq);
654 if(p_egalax_i2c_dev->irq)
656 free_irq(p_egalax_i2c_dev->irq, egalax_i2c);
659 i2c_set_clientdata(client, NULL);
661 p_egalax_i2c_dev = NULL;
666 static struct i2c_device_id egalax_i2c_idtable[] = {
671 MODULE_DEVICE_TABLE(i2c, egalax_i2c_idtable);
673 static struct i2c_driver egalax_i2c_driver = {
675 .name = "egalax_i2c",
677 .id_table = egalax_i2c_idtable,
678 .probe = egalax_i2c_probe,
679 .remove = __devexit_p(egalax_i2c_remove),
680 .suspend = egalax_i2c_suspend,
681 .resume = egalax_i2c_resume,
684 static const struct file_operations egalax_cdev_fops = {
685 .owner = THIS_MODULE,
686 .read = egalax_cdev_read,
687 .write = egalax_cdev_write,
688 .ioctl = egalax_cdev_ioctl,
689 .poll = egalax_cdev_poll,
690 .open = egalax_cdev_open,
691 .release= egalax_cdev_release,
694 static void egalax_i2c_ts_exit(void)
696 dev_t devno = MKDEV(global_major, global_minor);
701 TS_DEBUG("unregister character device\n");
702 if( p_char_dev->pFiFoBuf )
703 kfree(p_char_dev->pFiFoBuf);
705 cdev_del(&p_char_dev->cdev);
710 unregister_chrdev_region( devno, 1);
712 if(!IS_ERR(egalax_class))
714 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
715 class_device_destroy(egalax_class, devno);
717 device_destroy(egalax_class, devno);
719 class_destroy(egalax_class);
722 i2c_del_driver(&egalax_i2c_driver);
724 printk(KERN_DEBUG "[egalax_i2c]: driver exit\n");
727 static struct egalax_char_dev* setup_chardev(dev_t dev)
729 struct egalax_char_dev *pCharDev;
732 pCharDev = kmalloc(1*sizeof(struct egalax_char_dev), GFP_KERNEL);
735 memset(pCharDev, 0, sizeof(struct egalax_char_dev));
737 spin_lock_init( &pCharDev->FiFoLock );
738 pCharDev->pFiFoBuf = kmalloc(sizeof(unsigned char)*FIFO_SIZE, GFP_KERNEL);
739 if(!pCharDev->pFiFoBuf)
741 memset(pCharDev->pFiFoBuf, 0, sizeof(unsigned char)*FIFO_SIZE);
743 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
744 pCharDev->pDataKFiFo = kfifo_init(pCharDev->pFiFoBuf, FIFO_SIZE, GFP_KERNEL, &pCharDev->FiFoLock);
745 if( pCharDev->pDataKFiFo==NULL )
748 kfifo_init(&pCharDev->DataKFiFo, pCharDev->pFiFoBuf, FIFO_SIZE);
749 if( !kfifo_initialized(&pCharDev->DataKFiFo) )
753 pCharDev->OpenCnts = 0;
754 cdev_init(&pCharDev->cdev, &egalax_cdev_fops);
755 pCharDev->cdev.owner = THIS_MODULE;
756 sema_init(&pCharDev->sem, 1);
757 init_waitqueue_head(&pCharDev->fifo_inq);
759 result = cdev_add(&pCharDev->cdev, dev, 1);
762 TS_DEBUG(KERN_ERR "Error cdev ioctldev added\n");
769 kfree(pCharDev->pFiFoBuf);
776 static void __init egalax_i2c_ts_init_async(void *unused, async_cookie_t cookie)
783 // Asking for a dynamic major unless directed otherwise at load time.
786 devno = MKDEV(global_major, global_minor);
787 result = register_chrdev_region(devno, 1, "egalax_i2c");
791 result = alloc_chrdev_region(&devno, global_minor, 1, "egalax_i2c");
792 global_major = MAJOR(devno);
797 TS_DEBUG(" egalax_i2c cdev can't get major number\n");
801 // allocate the character device
802 p_char_dev = setup_chardev(devno);
809 egalax_class = class_create(THIS_MODULE, "egalax_i2c");
810 if(IS_ERR(egalax_class))
812 TS_DEBUG("Err: failed in creating class.\n");
817 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
818 class_device_create(egalax_class, NULL, devno, NULL, "egalax_i2c");
820 device_create(egalax_class, NULL, devno, NULL, "egalax_i2c");
822 TS_DEBUG("register egalax_i2c cdev, major: %d \n",global_major);
824 printk(KERN_DEBUG "[egalax_i2c]: init done\n");
825 return i2c_add_driver(&egalax_i2c_driver);
828 egalax_i2c_ts_exit();
832 static int __init egalax_i2c_ts_init(void)
834 async_schedule(egalax_i2c_ts_init_async, NULL);
837 module_init(egalax_i2c_ts_init);
838 module_exit(egalax_i2c_ts_exit);
840 MODULE_DESCRIPTION("egalax touch screen i2c driver");
841 MODULE_LICENSE("GPL");