Commit fc226eb2 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Dmitry Torokhov

Input: edt-ft5x06 - enable ACPI enumeration

ACPI allows to enumerate specific devices by using compatible strings.
Enable that enumeration for EDT touchscreen devices.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 44466306
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <linux/input/mt.h> #include <linux/input/mt.h>
#include <linux/input/touchscreen.h> #include <linux/input/touchscreen.h>
#include <linux/of_device.h>
#define WORK_REGISTER_THRESHOLD 0x00 #define WORK_REGISTER_THRESHOLD 0x00
#define WORK_REGISTER_REPORT_RATE 0x08 #define WORK_REGISTER_REPORT_RATE 0x08
...@@ -1073,7 +1072,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, ...@@ -1073,7 +1072,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
return -ENOMEM; return -ENOMEM;
} }
chip_data = of_device_get_match_data(&client->dev); chip_data = device_get_match_data(&client->dev);
if (!chip_data) if (!chip_data)
chip_data = (const struct edt_i2c_chip_data *)id->driver_data; chip_data = (const struct edt_i2c_chip_data *)id->driver_data;
if (!chip_data || !chip_data->max_support_points) { if (!chip_data || !chip_data->max_support_points) {
...@@ -1254,7 +1253,6 @@ static const struct i2c_device_id edt_ft5x06_ts_id[] = { ...@@ -1254,7 +1253,6 @@ static const struct i2c_device_id edt_ft5x06_ts_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id); MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id);
#ifdef CONFIG_OF
static const struct of_device_id edt_ft5x06_of_match[] = { static const struct of_device_id edt_ft5x06_of_match[] = {
{ .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data }, { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
{ .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data }, { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
...@@ -1266,12 +1264,11 @@ static const struct of_device_id edt_ft5x06_of_match[] = { ...@@ -1266,12 +1264,11 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match); MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match);
#endif
static struct i2c_driver edt_ft5x06_ts_driver = { static struct i2c_driver edt_ft5x06_ts_driver = {
.driver = { .driver = {
.name = "edt_ft5x06", .name = "edt_ft5x06",
.of_match_table = of_match_ptr(edt_ft5x06_of_match), .of_match_table = edt_ft5x06_of_match,
.pm = &edt_ft5x06_ts_pm_ops, .pm = &edt_ft5x06_ts_pm_ops,
}, },
.id_table = edt_ft5x06_ts_id, .id_table = edt_ft5x06_ts_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment