diff mbox series

Input: ads7846 - silent spi_device_id warnings

Message ID 20231101150918.4157499-1-sean@geanix.com (mailing list archive)
State New
Headers show
Series Input: ads7846 - silent spi_device_id warnings | expand

Commit Message

Sean Nyekjaer Nov. 1, 2023, 3:09 p.m. UTC
Add spi_device_id entries to silent following warnings:
 SPI driver ads7846 has no spi_device_id for ti,tsc2046
 SPI driver ads7846 has no spi_device_id for ti,ads7843
 SPI driver ads7846 has no spi_device_id for ti,ads7845
 SPI driver ads7846 has no spi_device_id for ti,ads7873

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
 drivers/input/touchscreen/ads7846.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index d2bbb436a77d..30758fc0e029 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1377,6 +1377,16 @@  static void ads7846_remove(struct spi_device *spi)
 	ads7846_stop(ts);
 }
 
+static const struct spi_device_id ads7846_spi_ids[] = {
+	{ "tsc2046" },
+	{ "ads7843" },
+	{ "ads7845" },
+	{ "ads7846" },
+	{ "ads7873" },
+	{ },
+};
+MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
+
 static struct spi_driver ads7846_driver = {
 	.driver = {
 		.name		= "ads7846",
@@ -1384,6 +1394,7 @@  static struct spi_driver ads7846_driver = {
 		.pm		= pm_sleep_ptr(&ads7846_pm),
 		.of_match_table	= ads7846_dt_ids,
 	},
+	.id_table = ads7846_spi_ids,
 	.probe		= ads7846_probe,
 	.remove		= ads7846_remove,
 };