mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
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 <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
83f66a6f08
commit
449aa83e69
1 changed files with 11 additions and 1 deletions
|
@ -18,8 +18,9 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include "tsc200x-core.h"
|
#include "tsc200x-core.h"
|
||||||
|
@ -77,9 +78,18 @@ static int tsc2005_remove(struct spi_device *spi)
|
||||||
return tsc200x_remove(&spi->dev);
|
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 = {
|
static struct spi_driver tsc2005_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "tsc2005",
|
.name = "tsc2005",
|
||||||
|
.of_match_table = of_match_ptr(tsc2005_of_match),
|
||||||
.pm = &tsc200x_pm_ops,
|
.pm = &tsc200x_pm_ops,
|
||||||
},
|
},
|
||||||
.probe = tsc2005_probe,
|
.probe = tsc2005_probe,
|
||||||
|
|
Loading…
Reference in a new issue