aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/edt-ft5x06.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/edt-ft5x06.c')
-rw-r--r--drivers/input/touchscreen/edt-ft5x06.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 099d144ab7c..a9170157b44 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -491,14 +491,6 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode)
491DEFINE_SIMPLE_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get, 491DEFINE_SIMPLE_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get,
492 edt_ft5x06_debugfs_mode_set, "%llu\n"); 492 edt_ft5x06_debugfs_mode_set, "%llu\n");
493 493
494static int edt_ft5x06_debugfs_raw_data_open(struct inode *inode,
495 struct file *file)
496{
497 file->private_data = inode->i_private;
498
499 return 0;
500}
501
502static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file, 494static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file,
503 char __user *buf, size_t count, loff_t *off) 495 char __user *buf, size_t count, loff_t *off)
504{ 496{
@@ -579,11 +571,11 @@ out:
579 571
580 572
581static const struct file_operations debugfs_raw_data_fops = { 573static const struct file_operations debugfs_raw_data_fops = {
582 .open = edt_ft5x06_debugfs_raw_data_open, 574 .open = simple_open,
583 .read = edt_ft5x06_debugfs_raw_data_read, 575 .read = edt_ft5x06_debugfs_raw_data_read,
584}; 576};
585 577
586static void __devinit 578static void
587edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, 579edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
588 const char *debugfs_name) 580 const char *debugfs_name)
589{ 581{
@@ -600,7 +592,7 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
600 tsdata->debug_dir, tsdata, &debugfs_raw_data_fops); 592 tsdata->debug_dir, tsdata, &debugfs_raw_data_fops);
601} 593}
602 594
603static void __devexit 595static void
604edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) 596edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata)
605{ 597{
606 if (tsdata->debug_dir) 598 if (tsdata->debug_dir)
@@ -625,7 +617,7 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata)
625 617
626 618
627 619
628static int __devinit edt_ft5x06_ts_reset(struct i2c_client *client, 620static int edt_ft5x06_ts_reset(struct i2c_client *client,
629 int reset_pin) 621 int reset_pin)
630{ 622{
631 int error; 623 int error;
@@ -649,7 +641,7 @@ static int __devinit edt_ft5x06_ts_reset(struct i2c_client *client,
649 return 0; 641 return 0;
650} 642}
651 643
652static int __devinit edt_ft5x06_ts_identify(struct i2c_client *client, 644static int edt_ft5x06_ts_identify(struct i2c_client *client,
653 char *model_name, 645 char *model_name,
654 char *fw_version) 646 char *fw_version)
655{ 647{
@@ -683,7 +675,7 @@ static int __devinit edt_ft5x06_ts_identify(struct i2c_client *client,
683 pdata->name <= edt_ft5x06_attr_##name.limit_high) \ 675 pdata->name <= edt_ft5x06_attr_##name.limit_high) \
684 edt_ft5x06_register_write(tsdata, reg, pdata->name) 676 edt_ft5x06_register_write(tsdata, reg, pdata->name)
685 677
686static void __devinit 678static void
687edt_ft5x06_ts_get_defaults(struct edt_ft5x06_ts_data *tsdata, 679edt_ft5x06_ts_get_defaults(struct edt_ft5x06_ts_data *tsdata,
688 const struct edt_ft5x06_platform_data *pdata) 680 const struct edt_ft5x06_platform_data *pdata)
689{ 681{
@@ -697,7 +689,7 @@ edt_ft5x06_ts_get_defaults(struct edt_ft5x06_ts_data *tsdata,
697 EDT_ATTR_CHECKSET(report_rate, WORK_REGISTER_REPORT_RATE); 689 EDT_ATTR_CHECKSET(report_rate, WORK_REGISTER_REPORT_RATE);
698} 690}
699 691
700static void __devinit 692static void
701edt_ft5x06_ts_get_parameters(struct edt_ft5x06_ts_data *tsdata) 693edt_ft5x06_ts_get_parameters(struct edt_ft5x06_ts_data *tsdata)
702{ 694{
703 tsdata->threshold = edt_ft5x06_register_read(tsdata, 695 tsdata->threshold = edt_ft5x06_register_read(tsdata,
@@ -710,7 +702,7 @@ edt_ft5x06_ts_get_parameters(struct edt_ft5x06_ts_data *tsdata)
710 tsdata->num_y = edt_ft5x06_register_read(tsdata, WORK_REGISTER_NUM_Y); 702 tsdata->num_y = edt_ft5x06_register_read(tsdata, WORK_REGISTER_NUM_Y);
711} 703}
712 704
713static int __devinit edt_ft5x06_ts_probe(struct i2c_client *client, 705static int edt_ft5x06_ts_probe(struct i2c_client *client,
714 const struct i2c_device_id *id) 706 const struct i2c_device_id *id)
715{ 707{
716 const struct edt_ft5x06_platform_data *pdata = 708 const struct edt_ft5x06_platform_data *pdata =
@@ -830,7 +822,7 @@ err_free_mem:
830 return error; 822 return error;
831} 823}
832 824
833static int __devexit edt_ft5x06_ts_remove(struct i2c_client *client) 825static int edt_ft5x06_ts_remove(struct i2c_client *client)
834{ 826{
835 const struct edt_ft5x06_platform_data *pdata = 827 const struct edt_ft5x06_platform_data *pdata =
836 dev_get_platdata(&client->dev); 828 dev_get_platdata(&client->dev);
@@ -891,7 +883,7 @@ static struct i2c_driver edt_ft5x06_ts_driver = {
891 }, 883 },
892 .id_table = edt_ft5x06_ts_id, 884 .id_table = edt_ft5x06_ts_id,
893 .probe = edt_ft5x06_ts_probe, 885 .probe = edt_ft5x06_ts_probe,
894 .remove = __devexit_p(edt_ft5x06_ts_remove), 886 .remove = edt_ft5x06_ts_remove,
895}; 887};
896 888
897module_i2c_driver(edt_ft5x06_ts_driver); 889module_i2c_driver(edt_ft5x06_ts_driver);