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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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);
 
-- 
2.30.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux