]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Input: eeti - add device tree matching table
authorDaniel Mack <daniel@zonque.org>
Wed, 4 Jul 2018 15:45:47 +0000 (15:45 +0000)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Jul 2018 16:07:56 +0000 (16:07 +0000)
Provide a match table so that the driver can be used in devicetree setups.
More properties are added in a later patch.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/eeti_ts.c

index 2facad75eb6da10ac53c4c539b964a602d7f9604..cc4fd33f9d6daa539811de09c55014612ab7694a 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/i2c.h>
 #include <linux/timer.h>
 #include <linux/gpio/consumer.h>
+#include <linux/of.h>
 #include <linux/slab.h>
 #include <asm/unaligned.h>
 
@@ -262,10 +263,18 @@ static const struct i2c_device_id eeti_ts_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, eeti_ts_id);
 
+#ifdef CONFIG_OF
+static const struct of_device_id of_eeti_ts_match[] = {
+       { .compatible = "eeti,exc3000-i2c", },
+       { }
+};
+#endif
+
 static struct i2c_driver eeti_ts_driver = {
        .driver = {
                .name = "eeti_ts",
                .pm = &eeti_ts_pm,
+               .of_match_table = of_match_ptr(of_eeti_ts_match),
        },
        .probe = eeti_ts_probe,
        .id_table = eeti_ts_id,