diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2021-05-27 02:34:41 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-05-27 02:58:59 +0300 |
commit | 007704c99f52e22cd93bcc16c610d7c1a41fd9cd (patch) | |
tree | bd08261ffdc7ffcf9ed385f823474d4ec19a4920 /drivers/input/touchscreen/cyttsp_spi.c | |
parent | 4b48d935a5e027188d5fd6fd3ce2ee2da1811a0e (diff) | |
download | linux-007704c99f52e22cd93bcc16c610d7c1a41fd9cd.tar.xz |
Input: cyttsp - probe from compatibles
The driver (both SPI and I2C interface) should probe from the compatible
strings, cypress,cy8ctma340 etc when using device tree, not as now, where
it is probing implicitly from the I2C/SPI node name "cypress,cyttsp-i2c"
etc.
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210526230352.1433537-2-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp_spi.c')
-rw-r--r-- | drivers/input/touchscreen/cyttsp_spi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/cyttsp_spi.c b/drivers/input/touchscreen/cyttsp_spi.c index 54e410921d53..8715e5354d79 100644 --- a/drivers/input/touchscreen/cyttsp_spi.c +++ b/drivers/input/touchscreen/cyttsp_spi.c @@ -160,10 +160,18 @@ static int cyttsp_spi_probe(struct spi_device *spi) return 0; } +static const struct of_device_id cyttsp_of_spi_match[] = { + { .compatible = "cypress,cy8ctma340", }, + { .compatible = "cypress,cy8ctst341", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, cyttsp_of_spi_match); + static struct spi_driver cyttsp_spi_driver = { .driver = { .name = CY_SPI_NAME, .pm = &cyttsp_pm_ops, + .of_match_table = cyttsp_of_spi_match, }, .probe = cyttsp_spi_probe, }; |