--- zzzz-none-000/linux-3.10.107/drivers/mfd/stmpe-spi.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/mfd/stmpe-spi.c 2021-02-04 17:41:59.000000000 +0000 @@ -4,13 +4,14 @@ * Copyright (C) ST Microelectronics SA 2011 * * License Terms: GNU General Public License, version 2 - * Author: Viresh Kumar for ST Microelectronics + * Author: Viresh Kumar for ST Microelectronics */ #include #include #include #include +#include #include #include "stmpe.h" @@ -108,6 +109,17 @@ return stmpe_remove(stmpe); } +static const struct of_device_id stmpe_spi_of_match[] = { + { .compatible = "st,stmpe610", }, + { .compatible = "st,stmpe801", }, + { .compatible = "st,stmpe811", }, + { .compatible = "st,stmpe1601", }, + { .compatible = "st,stmpe2401", }, + { .compatible = "st,stmpe2403", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, stmpe_spi_of_match); + static const struct spi_device_id stmpe_spi_id[] = { { "stmpe610", STMPE610 }, { "stmpe801", STMPE801 }, @@ -122,7 +134,7 @@ static struct spi_driver stmpe_spi_driver = { .driver = { .name = "stmpe-spi", - .owner = THIS_MODULE, + .of_match_table = of_match_ptr(stmpe_spi_of_match), #ifdef CONFIG_PM .pm = &stmpe_dev_pm_ops, #endif @@ -146,4 +158,4 @@ MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver"); -MODULE_AUTHOR("Viresh Kumar "); +MODULE_AUTHOR("Viresh Kumar ");