2 * drivers/input/touchscreen/gslX680.c
4 * Copyright (c) 2012 Shanghai Basewin
5 * Guan Yuwei<guanyuwei@basewin.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/module.h>
14 #include <linux/delay.h>
15 #include <linux/hrtimer.h>
16 #include <linux/i2c.h>
17 #include <linux/input.h>
18 #include <linux/interrupt.h>
20 #include <linux/platform_device.h>
21 #include <linux/async.h>
22 #include <linux/irq.h>
23 #include <linux/workqueue.h>
24 #include <linux/proc_fs.h>
25 #include <linux/input/mt.h>
26 #include "rockchip_gslX680_rk3128.h"
27 #include <linux/of_gpio.h>
28 #include <linux/gpio.h>
29 #include <linux/slab.h>
30 #include <linux/device.h>
31 #include "tp_suspend.h"
36 /* #define GSL_DEBUG */
37 /* #define GSL_TIMER */
38 #define REPORT_DATA_ANDROID_4_0
40 /* #define HAVE_TOUCH_KEY */
42 #define GSLX680_I2C_NAME "gslX680"
43 #define GSLX680_I2C_ADDR 0x40
45 /* #define IRQ_PORT RK2928_PIN1_PB0 */
46 /* #define WAKE_PORT RK2928_PIN0_PD3 */
48 #define GSL_DATA_REG 0x80
49 #define GSL_STATUS_REG 0xe0
50 #define GSL_PAGE_REG 0xf0
54 #define MAX_CONTACTS 10
55 #define DMA_TRANS_LEN 0x20
56 /* #define FILTER_POINT */
61 #define WRITE_I2C_SPEED (350*1000)
62 #define I2C_SPEED (200*1000)
66 #define CLOSE_TP_POWER 0
69 static void set_tp_power(bool flag);
74 static int key_state_flag;
85 const u16 key_array[] = {
92 #define MAX_KEY_NUM (sizeof(key_array)/sizeof(key_array[0]))
94 struct key_data gsl_key_data[MAX_KEY_NUM] = {
95 {KEY_BACK, 2048, 2048, 2048, 2048},
96 {KEY_HOME, 2048, 2048, 2048, 2048},
97 {KEY_MENU, 2048, 2048, 2048, 2048},
98 {KEY_SEARCH, 2048, 2048, 2048, 2048},
117 static struct gsl_ts_data devices[] = {
123 .data_reg = GSL_DATA_REG,
124 .status_reg = GSL_STATUS_REG,
127 .touch_meta_data = 4,
133 struct i2c_client *client;
134 struct input_dev *input;
135 struct work_struct work;
136 struct workqueue_struct *wq;
137 struct gsl_ts_data *dd;
141 #if defined(CONFIG_HAS_EARLYSUSPEND)
142 struct early_suspend early_suspend;
145 struct timer_list gsl_timer;
150 static struct gsl_ts *g_gsl_ts;
153 #define print_info(fmt, args...) printk(fmt, ##args)
155 #define print_info(fmt, args...)
158 static int ts_global_reset_pin;
160 static u32 id_sign[MAX_CONTACTS+1] = {0};
161 static u8 id_state_flag[MAX_CONTACTS+1] = {0};
162 static u8 id_state_old_flag[MAX_CONTACTS+1] = {0};
163 static u16 x_old[MAX_CONTACTS+1] = {0};
164 static u16 y_old[MAX_CONTACTS+1] = {0};
168 int i2c_master_normal_send(const struct i2c_client *client, const char *buf, int count, int scl_rate)
171 struct i2c_adapter *adap = client->adapter;
174 msg.addr = client->addr;
175 msg.flags = client->flags;
177 msg.buf = (char *)buf;
178 msg.scl_rate = scl_rate;
179 ret = i2c_transfer(adap, &msg, 1);
180 return (ret == 1) ? count : ret;
183 int i2c_master_normal_recv(const struct i2c_client *client, char *buf, int count, int scl_rate)
185 struct i2c_adapter *adap = client->adapter;
189 msg.addr = client->addr;
190 msg.flags = client->flags | I2C_M_RD;
192 msg.buf = (char *)buf;
193 msg.scl_rate = scl_rate;
195 ret = i2c_transfer(adap, &msg, 1);
197 return (ret == 1) ? count : ret;
200 static int gslX680_shutdown_low(void)
202 gpio_direction_output(ts_global_reset_pin, GPIO_LOW);
203 gpio_set_value(ts_global_reset_pin, GPIO_LOW);
207 static int gslX680_shutdown_high(void)
209 gpio_direction_output(ts_global_reset_pin, GPIO_HIGH);
210 gpio_set_value(ts_global_reset_pin, GPIO_HIGH);
213 static inline u16 join_bytes(u8 a, u8 b)
222 static u32 gsl_write_interface(struct i2c_client *client, const u8 reg, u8 *buf, u32 num)
224 struct i2c_msg xfer_msg[1];
228 xfer_msg[0].addr = client->addr;
229 xfer_msg[0].len = num + 1;
230 xfer_msg[0].flags = client->flags & I2C_M_TEN;
231 xfer_msg[0].buf = buf;
232 xfer_msg[0].scl_rate = WRITE_I2C_SPEED;
234 return i2c_transfer(client->adapter, xfer_msg, 1) == 1 ? 0 : -EFAULT;
237 static int gsl_ts_write(struct i2c_client *client, u8 addr, u8 *pdata, int datalen)
241 unsigned int bytelen;
246 printk("%s too big datalen = %d!\n", __func__, datalen);
252 if (datalen != 0 && pdata != NULL) {
253 memcpy(&tmp_buf[bytelen], pdata, datalen);
256 ret = i2c_master_normal_send(client, tmp_buf, bytelen, I2C_SPEED);
260 static int gsl_ts_read(struct i2c_client *client, u8 addr, u8 *pdata, unsigned int datalen)
265 printk("%s too big datalen = %d!\n", __func__, datalen);
269 ret = gsl_ts_write(client, addr, NULL, 0);
271 printk("%s set data address fail!\n", __func__);
274 return i2c_master_normal_recv(client, pdata, datalen, I2C_SPEED);
278 static __inline__ void fw2buf(u8 *buf, const u32 *fw)
280 u32 *u32_buf = (int *)buf;
284 static void gsl_load_fw(struct i2c_client *client)
286 u8 buf[DMA_TRANS_LEN*4 + 1] = {0};
291 u8 read_buf[4] = {0};
292 const struct fw_data *ptr_fw;
293 printk("=============gsl_load_fw start==============\n");
295 #ifdef GSL1680E_COMPATIBLE
297 gsl_ts_read(client, 0xfc, read_buf, 4);
300 if (read_buf[2] != 0x82 && read_buf[2] != 0x88) {
302 gsl_ts_read(client, 0xfc, read_buf, 4);
304 if (read_buf[2] == 0x82) {
305 ptr_fw = GSL1680E_FW;
306 source_len = ARRAY_SIZE(GSL1680E_FW);
311 source_len = ARRAY_SIZE(GSLX680_FW);
314 for (source_line = 0; source_line < source_len; source_line++) {
315 /* init page trans, set the page val */
316 if (GSL_PAGE_REG == ptr_fw[source_line].offset) {
317 fw2buf(cur, &ptr_fw[source_line].val);
318 gsl_write_interface(client, GSL_PAGE_REG, buf, 4);
321 if (1 == send_flag % (DMA_TRANS_LEN < 0x20 ? DMA_TRANS_LEN : 0x20))
322 buf[0] = (u8)ptr_fw[source_line].offset;
324 fw2buf(cur, &ptr_fw[source_line].val);
327 if (0 == send_flag % (DMA_TRANS_LEN < 0x20 ? DMA_TRANS_LEN : 0x20)) {
328 gsl_write_interface(client, buf[0], buf, cur - buf - 1);
336 printk("=============gsl_load_fw end==============\n");
340 static void startup_chip(struct i2c_client *client)
349 gsl_ts_write(client, 0xf0, buf, sizeof(buf));
354 gsl_ts_write(client, 0x04, buf, sizeof(buf));
356 gsl_ts_write(client, 0xe0, &tmp, 1);
360 static void reset_chip(struct i2c_client *client)
365 gsl_ts_write(client, 0xe0, &tmp, sizeof(tmp));
368 gsl_ts_write(client, 0xe4, &tmp, sizeof(tmp));
370 gsl_ts_write(client, 0xbc, buf, sizeof(buf));
374 static void clr_reg(struct i2c_client *client)
376 u8 write_buf[4] = {0};
379 gsl_ts_write(client, 0xe0, &write_buf[0], 1);
382 gsl_ts_write(client, 0x80, &write_buf[0], 1);
385 gsl_ts_write(client, 0xe4, &write_buf[0], 1);
388 gsl_ts_write(client, 0xe0, &write_buf[0], 1);
392 static void init_chip(struct i2c_client *client)
394 gslX680_shutdown_low();
396 gslX680_shutdown_high();
401 startup_chip(client);
403 startup_chip(client);
406 static void check_mem_data(struct i2c_client *client)
408 u8 read_buf[4] = {0};
411 gsl_ts_read(client, 0xb0, read_buf, sizeof(read_buf));
413 if (read_buf[3] != 0x5a || read_buf[2] != 0x5a || read_buf[1] != 0x5a || read_buf[0] != 0x5a) {
414 printk("#########check mem read 0xb0 = %x %x %x %x #########\n", read_buf[3], read_buf[2], read_buf[1], read_buf[0]);
425 static void record_point(u16 x, u16 y , u8 id)
430 id_sign[id] = id_sign[id] + 1;
432 if (id_sign[id] == 1) {
437 x = (x_old[id] + x)/2;
438 y = (y_old[id] + y)/2;
441 x_err = x - x_old[id];
447 y_err = y - y_old[id];
449 y_err = y_old[id] - y;
452 if ((x_err > 3 && y_err > 1) || (x_err > 1 && y_err > 3)) {
471 if (id_sign[id] == 1) {
477 static void report_data(struct gsl_ts *ts, u16 x, u16 y, u8 pressure, u8 id)
481 print_info("#####id=%d,x=%d,y=%d######\n", id, x, y);
485 if (x > SCREEN_MAX_X || y > SCREEN_MAX_Y) {
486 #ifdef HAVE_TOUCH_KEY
487 report_key(ts, x, y);
492 #ifdef REPORT_DATA_ANDROID_4_0
493 input_mt_slot(ts->input, id);
494 input_report_abs(ts->input, ABS_MT_TRACKING_ID, id);
495 input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, pressure);
496 input_report_abs(ts->input, ABS_MT_POSITION_X, x);
497 input_report_abs(ts->input, ABS_MT_POSITION_Y, y);
498 input_report_abs(ts->input, ABS_MT_WIDTH_MAJOR, 1);
500 input_report_abs(ts->input, ABS_MT_TRACKING_ID, id);
501 input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, pressure);
502 input_report_abs(ts->input, ABS_MT_POSITION_X, x);
503 input_report_abs(ts->input, ABS_MT_POSITION_Y, y);
504 input_report_abs(ts->input, ABS_MT_WIDTH_MAJOR, 1);
505 input_mt_sync(ts->input);
509 static void process_gslX680_data(struct gsl_ts *ts)
515 touches = ts->touch_data[ts->dd->touch_index];
516 for (i = 1; i <= MAX_CONTACTS; i++) {
519 id_state_flag[i] = 0;
522 for (i = 0; i < (touches > MAX_FINGERS ? MAX_FINGERS : touches); i++) {
523 x = join_bytes((ts->touch_data[ts->dd->x_index + 4*i + 1] & 0xf), ts->touch_data[ts->dd->x_index + 4*i]);
524 y = join_bytes(ts->touch_data[ts->dd->y_index + 4*i + 1], ts->touch_data[ts->dd->y_index + 4*i]);
525 id = ts->touch_data[ts->dd->id_index + 4*i] >> 4;
527 if (1 <= id && id <= MAX_CONTACTS) {
529 filter_point(x, y, id);
531 record_point(x, y, id);
533 report_data(ts, x_new, y_new, 50, id);
534 id_state_flag[id] = 1;
538 for (i = 1; i <= MAX_CONTACTS; i++) {
539 if ((0 == touches) || ((0 != id_state_old_flag[i]) && (0 == id_state_flag[i]))) {
540 #ifdef REPORT_DATA_ANDROID_4_0
541 input_mt_slot(ts->input, i);
542 input_report_abs(ts->input, ABS_MT_TRACKING_ID, -1);
543 input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, false);
547 id_state_old_flag[i] = id_state_flag[i];
549 #ifndef REPORT_DATA_ANDROID_4_0
551 input_mt_sync(ts->input);
552 #ifdef HAVE_TOUCH_KEY
553 if (key_state_flag) {
554 input_report_key(ts->input, key, 0);
555 input_sync(ts->input);
561 input_sync(ts->input);
565 static void gsl_ts_xy_worker(struct work_struct *work)
568 u8 read_buf[4] = {0};
570 struct gsl_ts *ts = container_of(work, struct gsl_ts, work);
571 print_info("---gsl_ts_xy_worker---\n");
573 /* read data from DATA_REG */
574 rc = gsl_ts_read(ts->client, 0x80, ts->touch_data, ts->dd->data_size);
575 print_info("---touches: %d ---\n", ts->touch_data[0]);
578 dev_err(&ts->client->dev, "read failed\n");
582 if (ts->touch_data[ts->dd->touch_index] == 0xff) {
586 rc = gsl_ts_read(ts->client, 0xbc, read_buf, sizeof(read_buf));
588 dev_err(&ts->client->dev, "read 0xbc failed\n");
591 print_info("//////// reg %x : %x %x %x %x\n", 0xbc, read_buf[3], read_buf[2], read_buf[1], read_buf[0]);
593 if (read_buf[3] == 0 && read_buf[2] == 0 && read_buf[1] == 0 && read_buf[0] == 0) {
594 process_gslX680_data(ts);
596 reset_chip(ts->client);
597 startup_chip(ts->client);
603 static irqreturn_t gsl_ts_irq(int irq, void *dev_id)
605 struct gsl_ts *ts = dev_id;
607 print_info("==========GSLX680 Interrupt============\n");
609 disable_irq_nosync(ts->irq);
611 if (!work_pending(&ts->work)) {
612 queue_work(ts->wq, &ts->work);
620 static void gsl_timer_handle(unsigned long data)
622 struct gsl_ts *ts = (struct gsl_ts *)data;
625 printk("----------------gsl_timer_handle-----------------\n");
628 disable_irq_nosync(ts->irq);
629 check_mem_data(ts->client);
630 ts->gsl_timer.expires = jiffies + 3 * HZ;
631 add_timer(&ts->gsl_timer);
636 static int gsl_ts_init_ts(struct i2c_client *client, struct gsl_ts *ts)
638 struct input_dev *input_device;
639 #ifdef CONFIG_MACH_RK_FAC
640 struct tp_platform_data *pdata = client->dev.platform_data;
644 printk("[GSLX680] Enter %s\n", __func__);
646 ts->dd = &devices[ts->device_id];
648 if (ts->device_id == 0) {
649 ts->dd->data_size = MAX_FINGERS * ts->dd->touch_bytes + ts->dd->touch_meta_data;
650 ts->dd->touch_index = 0;
653 ts->touch_data = kzalloc(ts->dd->data_size, GFP_KERNEL);
654 if (!ts->touch_data) {
655 pr_err("%s: Unable to allocate memory\n", __func__);
660 input_device = input_allocate_device();
663 goto error_alloc_dev;
666 ts->input = input_device;
667 input_device->name = GSLX680_I2C_NAME;
668 input_device->id.bustype = BUS_I2C;
669 input_device->dev.parent = &client->dev;
670 input_set_drvdata(input_device, ts);
672 #ifdef REPORT_DATA_ANDROID_4_0
673 __set_bit(EV_ABS, input_device->evbit);
674 __set_bit(EV_KEY, input_device->evbit);
675 __set_bit(EV_REP, input_device->evbit);
676 __set_bit(INPUT_PROP_DIRECT, input_device->propbit);
677 input_mt_init_slots(input_device, (MAX_CONTACTS+1), 0);
679 input_set_abs_params(input_device, ABS_MT_TRACKING_ID, 0, (MAX_CONTACTS+1), 0, 0);
680 set_bit(EV_ABS, input_device->evbit);
681 set_bit(EV_KEY, input_device->evbit);
684 #ifdef HAVE_TOUCH_KEY
685 input_device->evbit[0] = BIT_MASK(EV_KEY);
686 for (i = 0; i < MAX_KEY_NUM; i++)
687 set_bit(key_array[i], input_device->keybit);
690 set_bit(ABS_MT_POSITION_X, input_device->absbit);
691 set_bit(ABS_MT_POSITION_Y, input_device->absbit);
692 set_bit(ABS_MT_TOUCH_MAJOR, input_device->absbit);
693 set_bit(ABS_MT_WIDTH_MAJOR, input_device->absbit);
694 #ifdef CONFIG_MACH_RK_FAC
695 input_set_abs_params(input_device, ABS_MT_POSITION_X, 0, pdata->x_max, 0, 0);
696 input_set_abs_params(input_device, ABS_MT_POSITION_Y, 0, pdata->y_max, 0, 0);
698 input_set_abs_params(input_device, ABS_MT_POSITION_X, 0, SCREEN_MAX_X, 0, 0);
699 input_set_abs_params(input_device, ABS_MT_POSITION_Y, 0, SCREEN_MAX_Y, 0, 0);
701 input_set_abs_params(input_device, ABS_MT_TOUCH_MAJOR, 0, PRESS_MAX, 0, 0);
702 input_set_abs_params(input_device, ABS_MT_WIDTH_MAJOR, 0, 200, 0, 0);
704 client->irq = ts->irq;
706 ts->wq = create_singlethread_workqueue("kworkqueue_ts");
708 dev_err(&client->dev, "Could not create workqueue\n");
709 goto error_wq_create;
711 flush_workqueue(ts->wq);
713 INIT_WORK(&ts->work, gsl_ts_xy_worker);
715 rc = input_register_device(input_device);
717 goto error_unreg_device;
722 destroy_workqueue(ts->wq);
724 input_free_device(input_device);
726 kfree(ts->touch_data);
732 static int gsl_ts_suspend(void)
734 struct gsl_ts *ts = g_gsl_ts;
735 printk("I'am in gsl_ts_suspend() start\n");
736 flush_workqueue(ts->wq);
738 printk("gsl_ts_suspend () : delete gsl_timer\n");
739 del_timer(&ts->gsl_timer);
741 disable_irq_nosync(ts->irq);
742 gslX680_shutdown_low();
746 static int gsl_ts_resume(void)
748 struct gsl_ts *ts = g_gsl_ts;
751 printk("I'am in gsl_ts_resume() start\n");
753 gslX680_shutdown_high();
755 reset_chip(ts->client);
756 startup_chip(ts->client);
757 check_mem_data(ts->client);
760 reset_chip(ts->client);
761 startup_chip(ts->client);
763 reset_chip(ts->client);
764 startup_chip(ts->client);
766 printk("gsl_ts_resume () : add gsl_timer\n");
767 init_timer(&ts->gsl_timer);
768 ts->gsl_timer.expires = jiffies + 3 * HZ;
769 ts->gsl_timer.function = &gsl_timer_handle;
770 ts->gsl_timer.data = (unsigned long)ts;
771 add_timer(&ts->gsl_timer);
774 for (i = 1; i <= MAX_CONTACTS; i++) {
775 if (0 != id_state_old_flag[i]) {
776 #ifdef REPORT_DATA_ANDROID_4_0
777 input_mt_slot(ts->input, i);
778 input_report_abs(ts->input, ABS_MT_TRACKING_ID, -1);
779 input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, false);
780 input_sync(ts->input);
784 id_state_old_flag[i] = id_state_flag[i] = 0;
790 static int gsl_ts_fb_event_notify(struct notifier_block *self,
791 unsigned long action, void *data)
793 struct fb_event *event = data;
795 if (action == FB_EARLY_EVENT_BLANK) {
796 switch (*((int *)event->data)) {
797 case FB_BLANK_UNBLANK:
803 } else if (action == FB_EVENT_BLANK) {
804 switch (*((int *)event->data)) {
805 case FB_BLANK_UNBLANK:
816 static struct notifier_block gsl_ts_fb_notifier = {
817 .notifier_call = gsl_ts_fb_event_notify,
822 int gslx680_config_hw(struct gsl_ts *ts)
824 struct device_node *np;
825 enum of_gpio_flags rst_flags;
826 unsigned long irq_flags;
827 unsigned int irq_gpio;
830 dev = &ts->client->dev;
833 irq_gpio = of_get_named_gpio_flags(np, "touch-gpio", 0, (enum of_gpio_flags *)&irq_flags);
834 ts->irq = gpio_to_irq(irq_gpio);
835 ts->reset_gpio = of_get_named_gpio_flags(np, "reset-gpio", 0, &rst_flags);
837 if (gpio_request(ts->reset_gpio, NULL) != 0) {
838 gpio_free(ts->reset_gpio);
839 printk("gslx680_init_platform_hw gpio_request error\n");
843 if (gpio_request(irq_gpio, NULL) != 0) {
845 printk("gslx680_init_platform_hw gpio_request error\n");
849 gpio_direction_output(ts->reset_gpio, GPIO_HIGH);
851 gpio_set_value(ts->reset_gpio, GPIO_LOW);
853 gpio_set_value(ts->reset_gpio, GPIO_HIGH);
860 static int gsl_ts_probe(struct i2c_client *client,
861 const struct i2c_device_id *id)
868 printk("GSLX680 Enter %s\n", __func__);
869 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
870 dev_err(&client->dev, "I2C functionality not supported\n");
874 ts = kzalloc(sizeof(*ts), GFP_KERNEL);
877 printk("==kzalloc success=\n");
881 ts->device_id = id->driver_data;
883 gslx680_config_hw(ts);
884 ts_global_reset_pin = ts->reset_gpio;
885 i2c_set_clientdata(client, ts);
887 rc = gsl_ts_init_ts(client, ts);
889 dev_err(&client->dev, "GSLX680 init failed\n");
890 goto error_mutex_destroy;
893 init_chip(ts->client);
894 check_mem_data(ts->client);
896 rc = request_irq(client->irq, gsl_ts_irq, IRQF_TRIGGER_RISING, client->name, ts);
898 printk("gsl_probe: request irq failed\n");
899 goto error_req_irq_fail;
902 disable_irq(client->irq);
904 ret = gsl_ts_read(client, 0xf0, &read_buf, sizeof(read_buf));
906 pr_info("gslx680 I2C transfer error!\n");
907 goto error_req_irq_fail;
911 printk("gsl_ts_probe () : add gsl_timer\n");
913 init_timer(&ts->gsl_timer);
914 ts->gsl_timer.expires = jiffies + 3 * HZ;
915 ts->gsl_timer.function = &gsl_timer_handle;
916 ts->gsl_timer.data = (unsigned long)ts;
917 add_timer(&ts->gsl_timer);
919 fb_register_client(&gsl_ts_fb_notifier);
921 printk("[GSLX680] End %s\n", __func__);
926 free_irq(ts->irq, ts);
929 input_free_device(ts->input);
934 static int gsl_ts_remove(struct i2c_client *client)
936 struct gsl_ts *ts = i2c_get_clientdata(client);
937 printk("==gsl_ts_remove=\n");
938 device_init_wakeup(&client->dev, 0);
939 cancel_work_sync(&ts->work);
940 free_irq(ts->irq, ts);
941 destroy_workqueue(ts->wq);
942 input_unregister_device(ts->input);
944 kfree(ts->touch_data);
950 static const struct i2c_device_id gsl_ts_id[] = {
951 {GSLX680_I2C_NAME, 0},
954 MODULE_DEVICE_TABLE(i2c, gsl_ts_id);
956 static struct of_device_id gslX680_dt_ids[] = {
957 { .compatible = "gslX680" },
960 static struct i2c_driver gsl_ts_driver = {
962 .name = GSLX680_I2C_NAME,
963 .owner = THIS_MODULE,
964 .of_match_table = of_match_ptr(gslX680_dt_ids),
966 .probe = gsl_ts_probe,
967 .remove = gsl_ts_remove,
968 .id_table = gsl_ts_id,
971 static int __init gsl_ts_init(void)
974 printk("==gsl_ts_init==\n");
975 ret = i2c_add_driver(&gsl_ts_driver);
976 printk("ret=%d\n", ret);
979 static void __exit gsl_ts_exit(void)
981 printk("==gsl_ts_exit==\n");
982 i2c_del_driver(&gsl_ts_driver);
986 module_init(gsl_ts_init);
987 module_exit(gsl_ts_exit);
989 MODULE_LICENSE("GPL");
990 MODULE_DESCRIPTION("GSLX680 touchscreen controller driver");
991 MODULE_AUTHOR("Guan Yuwei, guanyuwei@basewin.com");
992 MODULE_ALIAS("platform:gsl_ts");