]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
fpga: ice40-spi: Add SPI device ID table
authorMark Brown <broonie@kernel.org>
Mon, 27 Sep 2021 13:44:03 +0000 (14:44 +0100)
committerMoritz Fischer <mdf@kernel.org>
Mon, 27 Sep 2021 21:00:41 +0000 (14:00 -0700)
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 a SPI ID table.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/ice40-spi.c

index 69dec5af23c366f7acb2e6198b2357d0e3316acb..029d3cdb918d12e83e332ae3d2ec7096ee201324 100644 (file)
@@ -192,12 +192,19 @@ static const struct of_device_id ice40_fpga_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ice40_fpga_of_match);
 
+static const struct spi_device_id ice40_fpga_spi_ids[] = {
+       { .name = "ice40-fpga-mgr", },
+       {},
+};
+MODULE_DEVICE_TABLE(spi, ice40_fpga_spi_ids);
+
 static struct spi_driver ice40_fpga_driver = {
        .probe = ice40_fpga_probe,
        .driver = {
                .name = "ice40spi",
                .of_match_table = of_match_ptr(ice40_fpga_of_match),
        },
+       .id_table = ice40_fpga_spi_ids,
 };
 
 module_spi_driver(ice40_fpga_driver);