* GNU General Public License for more details.
  */
 
-#include <linux/module.h>
 #include <linux/input.h>
+#include <linux/module.h>
+#include <linux/of.h>
 #include <linux/spi/spi.h>
 #include <linux/regmap.h>
 #include "tsc200x-core.h"
        return tsc200x_remove(&spi->dev);
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id tsc2005_of_match[] = {
+       { .compatible = "ti,tsc2005" },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, tsc2005_of_match);
+#endif
+
 static struct spi_driver tsc2005_driver = {
        .driver = {
                .name   = "tsc2005",
+               .of_match_table = of_match_ptr(tsc2005_of_match),
                .pm     = &tsc200x_pm_ops,
        },
        .probe  = tsc2005_probe,