提交 2a2a7957 编写于 作者: M Mark Brown 提交者: Moritz Fischer

fpga: ice40-spi: Add SPI device ID table

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: 96c8395e ("spi: Revert modalias changes")
Signed-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NMoritz Fischer <mdf@kernel.org>
上级 5816b3e6
...@@ -192,12 +192,19 @@ static const struct of_device_id ice40_fpga_of_match[] = { ...@@ -192,12 +192,19 @@ static const struct of_device_id ice40_fpga_of_match[] = {
}; };
MODULE_DEVICE_TABLE(of, 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 = { static struct spi_driver ice40_fpga_driver = {
.probe = ice40_fpga_probe, .probe = ice40_fpga_probe,
.driver = { .driver = {
.name = "ice40spi", .name = "ice40spi",
.of_match_table = of_match_ptr(ice40_fpga_of_match), .of_match_table = of_match_ptr(ice40_fpga_of_match),
}, },
.id_table = ice40_fpga_spi_ids,
}; };
module_spi_driver(ice40_fpga_driver); module_spi_driver(ice40_fpga_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册