From: Dmitry Torokhov Date: Fri, 10 Feb 2017 23:12:20 +0000 (-0800) Subject: Input: tsc2005 - add OF device table X-Git-Tag: MMI-PSA29.97-13-9~4395^2~76^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=449aa83e69ff10d77fe088eadacafe1e97937c14;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Input: tsc2005 - add OF device table To be prepared for SPI module loading using full compatible strings from device tree, let's add OF module device table data. Reviewed-By: Sebastian Reichel Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index f2c5f0e47f77..e02b69f40ad8 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -18,8 +18,9 @@ * GNU General Public License for more details. */ -#include #include +#include +#include #include #include #include "tsc200x-core.h" @@ -77,9 +78,18 @@ static int tsc2005_remove(struct spi_device *spi) 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,