Skip to content

Commit

Permalink
fpga: ice40-spi: Add SPI device ID table
Browse files Browse the repository at this point in the history
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: 96c8395 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
  • Loading branch information
Mark Brown authored and Moritz Fischer committed Sep 27, 2021
1 parent 5816b3e commit 2a2a795
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/fpga/ice40-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2a2a795

Please sign in to comment.