From 24ad97add78999053042fde1b11b07fcfe669c12 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Sun, 17 Jan 2021 14:09:19 -0800 Subject: [PATCH] Input: wacom_i2c - Add device tree support to wacom_i2c Allow the wacom-i2c device to be exposed via device tree. Signed-off-by: Alistair Francis --- drivers/input/touchscreen/wacom_i2c.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c index 1afc6bde2891..dd3fc54d3825 100644 --- a/drivers/input/touchscreen/wacom_i2c.c +++ b/drivers/input/touchscreen/wacom_i2c.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #define WACOM_CMD_QUERY0 0x04 @@ -262,10 +263,17 @@ static const struct i2c_device_id wacom_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, wacom_i2c_id); +static const struct of_device_id wacom_i2c_of_match_table[] = { + { .compatible = "wacom,i2c-30" }, + {} +}; +MODULE_DEVICE_TABLE(of, wacom_i2c_of_match_table); + static struct i2c_driver wacom_i2c_driver = { .driver = { .name = "wacom_i2c", .pm = &wacom_i2c_pm, + .of_match_table = wacom_i2c_of_match_table, }, .probe = wacom_i2c_probe,