Skip to contentSkip to conversation

Input: ads7846 - silent spi_device_id warnings

PATCH New Sean Nyekjaer 1 participant 1 message Nov 1, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: ads7846 - silent spi_device_id warnings

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

---
 drivers/input/touchscreen/ads7846.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/input/touchscreen/ads7846.c +11 -0
index d2bbb436a77d..30758fc0e029 100644
@@ -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,
 };
Signature · 1 line
2.42.0