Skip to contentSkip to conversation

fpga: xilinx-spi: Add missing spi_device_id table

PATCH Applied Fabio Estevam 2 participants 2 messages Oct 26, 2025 – Nov 3, 2025

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

PATCH 1/1 fpga: xilinx-spi: Add missing spi_device_id table

The "xlnx,fpga-slave-serial" devicetree compatible string currently misses its SPI device ID entry. Without an spi_device_id table, the driver still works with device tree, but triggers the following runtime warning when registered via SPI core:

SPI driver xlnx-slave-spi has no spi_device_id for xlnx,fpga-slave-serial

Fix it by adding a corresponding spi_device_id table entry.

---
 drivers/fpga/xilinx-spi.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/fpga/xilinx-spi.c +7 -0
index 8756504340de..26348a768bbc 100644
@@ -57,6 +57,12 @@ static int xilinx_spi_probe(struct spi_device *spi)
 	return xilinx_core_probe(core);
 }
 
+static const struct spi_device_id xilinx_spi_ids[] = {
+	{ "fpga-slave-serial" },
+	{ },
+};
+MODULE_DEVICE_TABLE(spi, xilinx_spi_ids);
+
 #ifdef CONFIG_OF
 static const struct of_device_id xlnx_spi_of_match[] = {
 	{
@@ -73,6 +79,7 @@ static struct spi_driver xilinx_slave_spi_driver = {
 		.of_match_table = of_match_ptr(xlnx_spi_of_match),
 	},
 	.probe = xilinx_spi_probe,
+	.id_table       = xilinx_spi_ids,
 };
 
 module_spi_driver(xilinx_slave_spi_driver)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 32 lines · Fabio Estevam

The "xlnx,fpga-slave-serial" devicetree compatible string currently misses its SPI device ID entry. Without an spi_device_id table, the driver still works with device tree, but triggers the following runtime warning when registered via SPI core:

SPI driver xlnx-slave-spi has no spi_device_id for xlnx,fpga-slave-serial

Fix it by adding a corresponding spi_device_id table entry.

---
 drivers/fpga/xilinx-spi.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/fpga/xilinx-spi.c +6 -0
index 8756504340de..26348a768bbc 100644
@@ -57,6 +57,12 @@ static int xilinx_spi_probe(struct spi_device *spi)
 	return xilinx_core_probe(core);
 }
 
+static const struct spi_device_id xilinx_spi_ids[] = {
+	{ "fpga-slave-serial" },
+	{ },
+};
+MODULE_DEVICE_TABLE(spi, xilinx_spi_ids);
+
 #ifdef CONFIG_OF
 static const struct of_device_id xlnx_spi_of_match[] = {
 	{

drivers/fpga/xilinx-spi.c static struct spi_driver xilinx_slave_spi_driver = { · line 82

Quoted 4 lines
drivers/fpga/xilinx-spi.c +1 -0
@@ -73,6 +79,7 @@ static struct spi_driver xilinx_slave_spi_driver = {
 		.of_match_table = of_match_ptr(xlnx_spi_of_match),
 	},
 	.probe = xilinx_spi_probe,
+	.id_table       = xilinx_spi_ids,

One whitespace is enough, I fixed it in place.

Others look good to me.

Applied to for-next, thanks

Quoted 7 lines
drivers/fpga/xilinx-spi.c +0 -0
 };
 
 module_spi_driver(xilinx_slave_spi_driver)
Signature · 1 line
2.34.1