diff mbox series

[v2,1/3] drm/panel-ilitek-il9322: Add SPI ID table

Message ID 20220202152352.20342-2-broonie@kernel.org
State New
Headers show
Series drm/panel: Ensure DT compatibles have SPI device IDs | expand

Commit Message

Mark Brown Feb. 2, 2022, 3:23 p.m. UTC
Currently autoloading for SPI devices does not use the DT ID table, it uses
SPI modalises. Supporting OF modalises is going to be difficult if not
impractical, an attempt was made but has been reverted, so ensure that
module autoloading works for this driver by adding an id_table listing the
SPI IDs for everything.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
index 8e84df9a0033..c7a980fd6406 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
@@ -935,6 +935,19 @@  static const struct of_device_id ili9322_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ili9322_of_match);
 
+static const struct spi_device_id ili9322_spi_ids[] = {
+	{
+		.name = "dir-685-panel",
+		.driver_data = (kernel_ulong_t)&ili9322_dir_685,
+	},
+	{
+		.name = "ili9322",
+		.driver_data = 0,
+	},
+	{ }
+};
+MODULE_DEVICE_TABLE(spi, ili9322_spi_ids);
+
 static struct spi_driver ili9322_driver = {
 	.probe = ili9322_probe,
 	.remove = ili9322_remove,
@@ -942,6 +955,7 @@  static struct spi_driver ili9322_driver = {
 		.name = "panel-ilitek-ili9322",
 		.of_match_table = ili9322_of_match,
 	},
+	.id_table = ili9322_spi_ids,
 };
 module_spi_driver(ili9322_driver);