aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/mchp48l640.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-02-02 14:34:04 +0000
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-02-07 16:31:22 +0100
commit69a6d06878f05d63673b0dcdc3c3ef1af2996d46 (patch)
treecdd913addbeccc65f4b94a8e00b61af9d605d15a /drivers/mtd/devices/mchp48l640.c
parentmtd: mchp23k256: Add SPI ID table (diff)
downloadlinux-dev-69a6d06878f05d63673b0dcdc3c3ef1af2996d46.tar.xz
linux-dev-69a6d06878f05d63673b0dcdc3c3ef1af2996d46.zip
mtd: mchp48l640: Add SPI 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 an id_table listing the SPI IDs for everything. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Michael Walle <michael@walle.cc> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220202143404.16070-4-broonie@kernel.org
Diffstat (limited to '')
-rw-r--r--drivers/mtd/devices/mchp48l640.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mtd/devices/mchp48l640.c b/drivers/mtd/devices/mchp48l640.c
index 4ec505b3f4a6..7ed32509b41a 100644
--- a/drivers/mtd/devices/mchp48l640.c
+++ b/drivers/mtd/devices/mchp48l640.c
@@ -359,6 +359,15 @@ static const struct of_device_id mchp48l640_of_table[] = {
};
MODULE_DEVICE_TABLE(of, mchp48l640_of_table);
+static const struct spi_device_id mchp48l640_spi_ids[] = {
+ {
+ .name = "48l640",
+ .driver_data = (kernel_ulong_t)&mchp48l640_caps,
+ },
+ {}
+};
+MODULE_DEVICE_TABLE(spi, mchp48l640_spi_ids);
+
static struct spi_driver mchp48l640_driver = {
.driver = {
.name = "mchp48l640",
@@ -366,6 +375,7 @@ static struct spi_driver mchp48l640_driver = {
},
.probe = mchp48l640_probe,
.remove = mchp48l640_remove,
+ .id_table = mchp48l640_spi_ids,
};
module_spi_driver(mchp48l640_driver);