diff options
author | Mark Brown <broonie@kernel.org> | 2022-06-20 17:23:13 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-06-24 20:47:38 +0200 |
commit | ac4f83482afbfd927d0fe118151b747cf175e724 (patch) | |
tree | 27da5ddfb1edcec1a58a5e2da8be6c1c9d447e7a /drivers/mtd | |
parent | mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path (diff) | |
download | linux-ac4f83482afbfd927d0fe118151b747cf175e724.tar.xz linux-ac4f83482afbfd927d0fe118151b747cf175e724.zip |
mtd: dataflash: 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>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220620152313.708768-1-broonie@kernel.org
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 134e27328597..25bad4318305 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -112,6 +112,13 @@ static const struct of_device_id dataflash_dt_ids[] = { MODULE_DEVICE_TABLE(of, dataflash_dt_ids); #endif +static const struct spi_device_id dataflash_spi_ids[] = { + { .name = "at45", }, + { .name = "dataflash", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(spi, dataflash_spi_ids); + /* ......................................................................... */ /* @@ -936,6 +943,7 @@ static struct spi_driver dataflash_driver = { .probe = dataflash_probe, .remove = dataflash_remove, + .id_table = dataflash_spi_ids, /* FIXME: investigate suspend and resume... */ }; |